[英]How to share cache between multiple Google App Engine instances which each have multiple vCPUs?
SITUATION: 情况:
I am trying to implement caching for rate-limited third-party API requests my website needs to make. 我正在尝试为我的网站需要进行的限速第三方API请求实施缓存。
Apparently, basic solutions such as: 显然,基本解决方案包括:
https://www.npmjs.com/package/node-cache https://www.npmjs.com/package/node-cache
won't even share cache between CPUs, much less between instances ? 甚至不共享CPU之间的缓存,更不用说实例之间的共享了?
Is that correct ? 那是对的吗 ?
And if it is, how can I share cache between instances so that I have one unified cache for my website across instances ? 如果是的话,如何在实例之间共享缓存,以便在实例之间为我的网站提供一个统一的缓存?
After googling for a while, it seems Redis would be a solution. 经过一段时间的搜寻后,Redis似乎是一个解决方案。 But from what I gathered, I would have to host Redis on it's own dedicated instance for the cache to be unique across my website VM instances ?
但是从我收集的数据来看,我将不得不在它自己的专用实例上托管Redis,以使缓存在我的网站VM实例中是唯一的?
What if the instance hosting Redis is overloaded and also needs to be auto-scaled to multiple instances ? 如果托管Redis的实例过载并且还需要自动缩放到多个实例怎么办?
QUESTION: 题:
How can I implement shared cache between VM instances of my website ? 如何在网站的VM实例之间实现共享缓存?
You could add to your GAE application a 1st generation standard environment service which would: 您可以将第一代标准环境服务添加到您的GAE应用程序中,该服务将:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.