简体   繁体   English

如何在不浪费CPU资源的情况下在Google App Engine中使用后端?

[英]How to use backends in google app engine without wasting cpu resources?

While processing data in datastore using backends, app engine is using my cpu resources completely. 在使用后端处理数据存储区中的数据时,应用引擎完全使用了我的CPU资源。 How do i process my data without wasting CPU resources? 如何处理我的数据而不浪费CPU资源?

Can i have the entire app on a backend without wasting cpu resources? 我可以在不浪费CPU资源的情况下将整个应用程序放在后端吗?

am i missing something.. if the question is too vague, ask me to clarify.. thanks 我是否想念一些东西..如果问题太含糊,请让我澄清一下..谢谢

The general advice for optimizing CPU usage is to minimize RPCs, understand how to use the datastore efficiently and use appstats to find your bottlenecks. 优化CPU使用率的一般建议是最大程度地减少RPC,了解如何有效使用数据存储区以及使用appstats查找瓶颈。 For specific optimization advice, we would need to see some code. 对于特定的优化建议,我们将需要查看一些代码。

While backends can be configured to handle public requests, they aren't intended to replace normal instances. 尽管可以将后端配置为处理公共请求,但它们并不打算替代普通实例。 Backends are designed for resource-intensive offline processing. 后端旨在用于资源密集型脱机处理。 Normal instances are created and destroyed automatically in response to request volume; 普通实例是根据请求量自动创建和销毁的; backends have to be configured and instantiated explicitly by an administrator, thus they are not well-suited to handling traffic spikes. 后端必须由管理员显式配置和实例化,因此它们不适合处理流量高峰。

They're also more expensive: keeping a backend instance online for 24 hours will cost you $3.84, whether the instance is handling requests or not. 它们也更昂贵:将后端实例在线24小时将花费$ 3.84,无论实例是否在处理请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM