google-cloud-memorystore

How to connect to Redis instance (memorystore) from Google's Standard App Engine (Python 3.7)

久未见 提交于 2020-07-07 05:41:38
问题 I've been trying to get a connect to a Redis instance from an App Engine instance without any luck. I get a connection time out. I've set the host and port in my app.yaml: env_variables: REDIS_HOST: '10.0.0.3' REDIS_PORT: '6379' And try to connect as specified in the examples: redis_host = os.environ.get('REDIS_HOST', 'localhost') redis_port = int(os.environ.get('REDIS_PORT', 6379)) redis_client = redis.StrictRedis(host=redis_host, port=redis_port) But it's not working, some documentation

Close redis connection on google cloud function end

大城市里の小女人 提交于 2020-05-18 01:54:07
问题 How do you close the connection to a redis memory store from a cloud function when the cloud function instance terminates? (I believe to close I need to call redis.quit(), but I just don't know when, and I cannot close them immediately after a function returns because the function instance can be reused) Because I'm just leaving the connections open, right now I am getting "ECONNRESET" errors. Alternatively if something like this is not possible: process.on("exit", function(){//also process

Close redis connection on google cloud function end

不羁岁月 提交于 2020-05-18 01:53:08
问题 How do you close the connection to a redis memory store from a cloud function when the cloud function instance terminates? (I believe to close I need to call redis.quit(), but I just don't know when, and I cannot close them immediately after a function returns because the function instance can be reused) Because I'm just leaving the connections open, right now I am getting "ECONNRESET" errors. Alternatively if something like this is not possible: process.on("exit", function(){//also process

Unable to telnet to GCP MemoryStore

一曲冷凌霜 提交于 2020-04-16 04:12:33
问题 I have created an instance of the Memory store in my project but I am unable to telnet / connect to it, either from my local or the Google Cloud Shell. Searching online, I see that other people have been granted the same host IP as mine so I am a little confused (10.0.0.3). Some assistance on how to proceed here would be great. Do I have to expose something here? I have completed the following: Recreated my VM on the same region as the memory store Created a new instance of the memory store

Accessing GCP Memorystore from local machines

坚强是说给别人听的谎言 提交于 2020-01-09 10:03:12
问题 Whats the best way to access Memorystore from Local Machines during development? Is there something like Cloud SQL Proxy that I can use to set up a tunnel? 回答1: You can spin up a Compute Engine instance and use port forwarding to connect to your Redis machine. For example if your Redis machine has internal IP address 10.0.0.3 you'd do: gcloud compute instances create redis-forwarder --machine-type=f1-micro gcloud compute ssh redis-forwarder -- -N -L 6379:10.0.0.3:6379 As long as you keep the

Accessing GCP Memorystore from local machines

穿精又带淫゛_ 提交于 2020-01-09 10:02:29
问题 Whats the best way to access Memorystore from Local Machines during development? Is there something like Cloud SQL Proxy that I can use to set up a tunnel? 回答1: You can spin up a Compute Engine instance and use port forwarding to connect to your Redis machine. For example if your Redis machine has internal IP address 10.0.0.3 you'd do: gcloud compute instances create redis-forwarder --machine-type=f1-micro gcloud compute ssh redis-forwarder -- -N -L 6379:10.0.0.3:6379 As long as you keep the

Google cloud memorystore and Google AppEngine standard with python 3

∥☆過路亽.° 提交于 2019-12-13 00:53:25
问题 Is it possible to use memorystore with python 3 on GAE standard env? From faq at https://cloud.google.com/memorystore/docs/redis/faq it is clear that it can’t be use with GAE standard but since restrictions are different between python 3 and 2, it might be usable? Python 3 env is not supporting mecache right now and redislab requires another account /subscription managed. 回答1: Unfortunately currently it is not possible to access Memorystore from AppEngine Standard environment (even with

Accessing GCP Memorystore from local machines

天涯浪子 提交于 2019-11-30 11:44:28
Whats the best way to access Memorystore from Local Machines during development? Is there something like Cloud SQL Proxy that I can use to set up a tunnel? You can spin up a Compute Engine instance and use port forwarding to connect to your Redis machine. For example if your Redis machine has internal IP address 10.0.0.3 you'd do: gcloud compute instances create redis-forwarder --machine-type=f1-micro gcloud compute ssh redis-forwarder -- -N -L 6379:10.0.0.3:6379 As long as you keep the ssh tunnel open you can connect to localhost:6379 I created a vm on google cloud gcloud compute instances