启动在线应用程序:我使用 CDN、亚马逊服务还是专用服务器?
我的网络应用程序需要尽可能少的延迟。我曾尝试将其托管在专用服务器上,但世界另一端的用户抱怨延迟问题。
因此,我正在考虑使用 CDN 或 Amazon 服务...可以帮助解决此问题吗?
该应用程序使用大量 AJAX,因此延迟可能是一个问题。
My web application requires as little lag as possible. I have tried hosting it on a dedicated server, but users on the other side of world have complained about latency issues.
So I am considering using CDN or Amazon services.... would either help resolve this?
The application uses a lot of AJAX, so latency can be an issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Amazon 的 Cloudfront 是您可以购买的 Amazon Web Services (AWS) 的一部分, CDN(内容分发网络)——所以问是否使用亚马逊或“CDN”对我来说是一个奇怪的问题,类似于问你是否应该喝可乐或“苏打水”(假设可口可乐是“苏打水”)。相反,您应该问“我应该使用 Amazon 还是另一个 CDN?”就像您会问“我应该喝可乐还是另一种苏打水?”。
您在 CDN 中做出的决定必须基于许多参数 - 成本、可靠性、便利性、速度等等。不幸的是,我没有 CloudFront 的第一手经验;然而,从理论上讲,它的使用似乎特别简单(特别是如果您已经在使用其他 AWS 组件,因为从 S3 到 CloudFront 等获取数据确实快速且便宜;-),而且价格合理(基于使用情况)。但我对其正常运行时间记录或交付速度没有任何经验。
Amazon's Cloudfront, part of the Amazon Web Services (AWS) that you can purchase, is a CDN (Content Delivery Network) -- so asking whether to use Amazon or "a CDN" strikes me as a weird question, akin to asking whether you should drink Coke or "a soda" (given that Coke is "a soda"). Rather you should ask "should I use Amazon or another CDN?" just like you'd ask "should I drink Coke or another soda?".
Your decision among CDNs must be based on many parameters - cost, reliability, convenience, speed, and so forth. Unfortunately I have no first-hand experience of CloudFront; however, on paper, it seems particularly simple to use (especially if you're already using other AWS components, since getting data e.g. from S3 to CloudFront is fast and cheap indeed;-), and reasonably priced (based on usage). But I have no experience about its uptime record or delivery speed.
内容交付网络是加速静态内容(图像、JavaScript 等)交付的好主意。如果需要,您甚至可以将其与专用服务器结合使用。
您还可以考虑使用 YSlow 等工具来分析可能导致延迟问题的原因。
A content delivery network is a great idea to speed up delivery of static content (images, javascript, etc). You could even use this in combination with a dedicated server if you want.
You may also consider using a tool such as YSlow to analyze what may be causing your latency issues.
CDN 只会提高静态内容的性能 - 如果您的 Ajax 代码需要活动内容,那么它对此无济于事。
Amazon AWS可能提供帮助,但这取决于您的应用程序的详细信息。亚马逊并不是以提供低延迟解决方案而闻名。
大多数需要低延迟的应用程序最终都会从多个方向解决该问题。 CDN 和专用服务器的组合无疑是一种方法。关键是为您的服务器选择正确的数据中心(低延迟集线器)。
如果它可能有帮助,我写了一本关于这个主题的书: Ultra-Fast ASP.NET ,其中包括对客户端问题、硬件基础设施、CDN、缓存以及许多其他可能影响延迟的问题的讨论。
A CDN will only improve the performance of your static content -- if your Ajax code requires active content, then it won't help for that.
Amazon AWS might help, but it depends on the details of your application. Amazon isn't particularly well-known for delivering a low-latency solution.
Most apps that require low latency end up addressing the issue from many directions. A combination of a CDN and dedicated servers is certainly one approach. One key there is choosing the right data center for your servers (a low-latency hub).
In case it might help, I wrote a book about this subject: Ultra-Fast ASP.NET, which includes a discussion of client-side issues, hardware infrastructure, CDNs, caching, and many other issues that can impact latency.