可扩展的 API 服务器,带有 Restlet?
我们正在规划一个新的 API 服务器,它将主要提供 JSON 响应,并具有 RESTful 接口。我们担心规模和可用性。我们使用 Restlet 和 Jetty(或其他连接器)的方式是否正确?
我们要问的一个问题是,Java 世界里有没有像 Phusion Passenger 这样的东西?例如,用于保持服务器实例正常运行的预构建解决方案?
We're planning a new API server that will mainly serve JSON responses, with a RESTful interface. We're concerned about scale and availability. Are we on the right track using Restlet with Jetty (or another connector)?
One question we're asking is, is there anything in the Java world like Phusion Passenger? For example, a pre-built solution for keeping server instances up and healthy?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的问题实际上并不是关于 Restlet,而是关于设计一个高可扩展性、高可用性的站点。我们发现 Restlet 在正确的系统架构下可以很好地扩展。
一般来说,您希望:
REST 是一种非常适合此类设置的架构风格。
正如 @matt 提到的,您确实需要注意原始性能,但通常您首先关心的应该是获得可扩展、高可用性的架构。
一些很好的资料来源是:
特别是:
Overstock.com 运营着一个大规模的网站,使得大量使用 Restlet 来做到这一点。
Your question actually is not as much about Restlet as it is about designing a high-scalability, high-availability site. We find that Restlet does scale very well with the right system architecture.
Generally speaking you want to:
REST is an architectural style that is ideal for this type of setup.
As @matt mentions you do need to watch out for raw performance, but generally your first concern should be to get the scalable, high availability architecture in place.
Some good sources on this are:
and especially:
Overstock.com runs a highly scaled web site and makes heavy use of Restlet to do it.
可扩展性和性能最终将更多地取决于处理这些请求的应用程序的设计方式、其算法、是否有效地访问数据库、如何/是否缓存数据等,而不是 servlet 容器或框架的选择。
The scalability and performance is ultimately going to depend much much more on how the application handling these requests is designed, its algorithms, if it accesses a database efficiently, how/if you cache data, etc than the choice of servlet containers or frameworks.