google-app-engine
Accessing an exposed port on an appengine flex instance
How do I access an exposed port on an appengine flex instance? As an example I tried to setup redis on a manual scaled, 1-instance, project. I know that gae flex is no sensible setup for redis due to restarts etc, but I use it as an example. Dockerfile: FROM redis COPY redis.conf /usr/local/etc/redis/redis.conf CMD ["redis-server", "/usr/local/etc/redis/redis.conf"] app.yaml: runtime: custom env: flex service: redis manual_scaling: instances: 1 network: forwarded_ports: - 6379 health_check: enable_health_check: False Docker image runs fine locally. Deployment works fine and according to logs the redis server seems to be started. I now expected to be able to access the deployed redis server, via redis-cli, by redis-cli -g <instanceid>-dot-<versionid>-dot-redis-<myproject>.appspot.com ping but no. Not from outside gae and not from inside the project (via nodejs/redis). Shorter versions, w/o instanceid or versionid also does not work. For the shorter version of urls the command just hangs. For the full url, I get "Could not connect to Redis at ... nodename nor servname provided, or not known" Is my configuration for port forwarding wrong? The url format is supposed to work according to https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed Could I be using the wrong instanceid? I use what the console says is the id (which is also what is shown in the logs)
I work on App Engine. You really don't want to use App Engine to try running something like redis. App Engine is really meant for stateless HTTP services. There are a few reasons you should probably avoid this: We do not offer layer 3 or 4 load balancing. All of the App Engine load balancing today is layer 7, meaning you only get HTTP(S). Requests are meant to be load balanced because we could shut down an instance at any time. You can't rely on the lifetime of an instance, since we restart them for patches, maintenance, or because of scale down events. With no L3 load balancing, and a focus on load balanced services over individual instances - we don't offer a way to address a single instance. Today each instance gets an ephemeral public IP, but in the future that may actually change (to NAT). TL;DR: App Engine just isn't a good fit for this kind of thing. I would consider using Redis Labs or using a redis image in the launcher.
Related Links
Golang GAE, aestest.NewContect not working on local machine. Could not find python interpreter
Downloading my existing project in google cloud using Gcloud SDK
Google app engine css not found/deployed
CI for ASP.Net using Jenkins on Google Cloud
Can the GAE Servlet code be accessest by anyone
Is there a way of checking if a Web Application or Website using the Google App Engine?
google endpoints on flex app engine
Deploy to Google App Engine via a GitHub Repo
Using App Engine Datastore over MySQL for a CRM System
Geospatial Query at Google App Engine Datastore
how to put in the top as a ad My website in google?
Google Cloud Datastore vs Cloud SQL
Flow when recording the audio in the client, keeping a copy in the server, process it using Speech API, and returning the text back to the client?
Unable to deploy project to google app engine
Google App Engine How to convert Json API result into Python display?
App Engine - How to create project in region us-central