在海外访问 Google App Engine 的延迟

发布于 2024-12-02 12:20:06 字数 288 浏览 1 评论 0 原文

我即将开始在新西兰为新西兰市场开发一个网络应用程序,可扩展性是该市场的关键要求。我正在考虑使用 Google Apps Engine,我过去曾将其用于较小的项目,其中延迟不是一个大问题,因为一半的应用程序是客户端 Java 脚本。

然而,新项目需要快速的 AJAX 响应时间。当地的网络应用公司对专用服务器的收费约为 175 美元/月(比我想象的美国要高得多)。

如果我使用 Google Apps Engine(我猜托管在美国?)与在新西兰托管的本地托管公司相比,AJAX 请求的延迟之间是否可能存在显着差异?如果有的话有多大?

I am about to begin development of a web app in New Zealand for a NZ market for which scalability is a key requirement. I am contemplating using Google Apps Engine which I have used in the past for smaller projects where latency was not a big issue, because half the apps are client side Java script.

However, the new project requires fast AJAX response times. The local web-app companies charge about $175/month (much more than in the US I would imagine) for a dedicated server.

Is there likely to be a significant difference between the latency for AJAX requests if I use Google Apps Engine (hosted in the US I presume??) vs the local hosting company who host here in New Zealand? If so how big?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

最终幸福 2024-12-09 12:20:06

在这种情况下,您可能感兴趣的服务是 CloudSleuth。他们测量多个位置的页面加载时间。但位置选择亚洲/大洋洲。然后深入了解 GAE 以查看不同位置的页面加载时间。不幸的是,最接近的是悉尼,目前 GAE 的页面加载时间几乎为 20 秒。

A service which may interest you in this context is CloudSleuth. They measure page load times from multiple locations. But select Asia/Oceania for Location. Then drill down for GAE to see page load time from various location. Unfortunately the closest will be Sydney, where page load for GAE currently is almost 20s.

π浅易 2024-12-09 12:20:06

根据您的解释,您希望使用 App Engine 作为后端,除了您的应用程序加载和服务请求所需的时间之外,不应存在任何延迟问题。但正如他们所说,没有比您自己做的测试更好的测试了,所以继续使用 App Engine 并亲自看看吧!

快乐编码!

From your explanation you would like to use App Engine as your backend, there should not be any latency problems other that the time your app would take to load and serve a request. But as they say, there is no better test like the one you do it yourself, so go ahead play with App Engine and see it for yourself!

Happy coding!

云归处 2024-12-09 12:20:06

在其他条件相同的情况下,新西兰境内的请求延迟将不可避免地低于发送至美国并返回的请求的延迟。不过,有几个缓解因素需要考虑:

  • 光速延迟对于您的应用程序可能并不重要。往返美国的时间低于100毫秒;您的应用程序为请求提供服务所产生的延迟可能足够大,因此这不是最终用户延迟的重要因素。
  • 尽管您的应用程序在任何时候都只位于一个位置,但 Google 在世界各地都有缓存前端。请求通常会路由到最近的请求,如果您的应用程序生成可缓存的响应,前端可能能够立即从其缓存返回响应,而无需将请求发送到您的应用程序。
  • 一些 ISP,特别是在新西兰等国际带宽昂贵的地方,运行透明代理。同样,组织也是如此,您的浏览器本身也有缓存。如果响应是可缓存的,其中任何一个都可以在比往返更短的时间内满足请求。

最后的问题是,这额外的 100 毫秒左右是否可以接受。通常情况下,答案是肯定的,而且值得权衡的是不必自己处理机器配置、维护等。

It's unavoidably the case that the latency for a request within New Zealand is going to be lower than the latency for a request to the US and back, all else being equal. There are several mitigating factors to consider, though:

  • The speed-of-light delay may not be significant for your application. The round trip time to the US and back is under 100 milliseconds; the latency generated by your app serving the request may be large enough that this is not a significant factor on the end-user latency.
  • Although your app is only in a single location at any one time, Google has caching frontends all around the world. Requests typically get routed to the closest one, and if your app generates cacheable responses, the frontend may be able to return a response from its cache immediately, without having to ever send the request to your app.
  • Some ISPs, particularly in places like NZ where international bandwidth is expensive, run transparent proxies. Likewise, so do organisations, and your browser itself has a cache. Any of these can satisfy the request in less time than a roundtrip, if the response is cacheable.

In the end, the question is whether or not the extra 100 milliseconds or so is acceptable. More often than not, the answer is yes, and it's worth the tradeoff of not having to handle machine provisioning, maintenance, etc etc yourself.

攒眉千度 2024-12-09 12:20:06

App Engine 不是全球分布的。
整个应用程序默认托管在北美各地。

如果您支付服务费用,则可以请求在欧洲托管,但无法选择任何其他区域(来自 https://developers.google.com/appengine/docs/python/gettingstartedpython27/uploading)。

App Engine is not globally distributed.
The whole application is hosted around North America by default.

It you pay for the service you may request hosting within Europe instead, but there is no option to select any other regions (from https://developers.google.com/appengine/docs/python/gettingstartedpython27/uploading).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文