关于为基于 Servlet 的 Java Web 应用程序设置负载平衡和故障转移的书籍/资源

发布于 2024-07-08 19:17:06 字数 678 浏览 8 评论 0原文

我们正在使用 Java 和 Servlet 技术(实际上是用于表示层的 Wicket)创建一个 Web 系统,并且我们需要我们的系统几乎始终可用,因为我们的客户将非常依赖它。

这促使我们寻找一本专注于该主题的好书或其他资源来解释如何为我们的系统建立更加冗余和故障安全的架构。

我们目前遇到的一系列非排他性问题:

  • 您如何拥有一个域名(例如 http://www.google .com)实际上是由多台具有负载平衡功能的服务器提供服务来分配用户的? 在这样的解决方案中,是否总有一个较弱的点(在他们的例子中,google.com 的两个[因为不能有更多] DNS 服务器)?
  • 使用多个数据库服务器来实现冗余和负载平衡似乎是个好主意。 这是如何设置的?
  • 如果我们的一台网络服务器出现故障,我们希望进行某种故障转移并让用户使用仍在运行的服务器。 除此之外,会话必须以某种方式同步。 这是如何设置的?
  • 我们还需要某种同步事务吗?
  • 亚马逊计算机云对我们来说是一个不错的选择吗? 我们如何在那里设置它? 有没有经济有效的替代方案?
  • 我们是否需要在 JBoss 或 Glassfish 等 Java EE 容器中运行?

We're creating a web system using Java and Servlet technology (actually Wicket for the presentation layer) and we need our system to be available nearly always as our customers will be quite dependent on it.

This has lead us to look for a good book focusing on the subject or another resource which explains how to set up a more redundant and fail safe architecture for our system.

A non exclusive list of questions we have at the moment:

  • How do you have one domain name (like http://www.google.com) which are actually served by several servers with load balancing to distribute the users? Isn't there always a point which is weaker in such a solution(the two [as there can't be more] DNS servers for google.com in their case)?
  • It seems like a good idea to have several database servers for redundancy and load balancing. How is that set up?
  • If one of our web servers goes down we would like to have some kind of fail over and let users use one that is still up. Amongst other things the sessions have to be synchronized in some way. How is that set up?
  • Do we need some kind of synchronized transactions too?
  • Is Amazon Computer Cloud a good option for us? How do we set it up there? Are there any alternatives which are cost effective?
  • Do we need to run in a Java EE container like JBoss or Glassfish?

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

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

发布评论

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

评论(6

国粹 2024-07-15 19:17:06

对于 GlassFish,通过管理 GUI 进行集中管理对于需要管理多个应用程序服务器实例的环境来说是一个很大的帮助。 “永远可用”已经超载了。 它可以是服务可用性,在失败时不保留会话,也可以是指备份会话信息的数据可用性。 当然,GlassFish 两者都可以。 有关 GlassFish 和高可用性的一些资源可能会有所帮助:

GlassFish 高可用性指南:
http://www.sun.com/offers/details/glassfish_HAref_config.html

在 10 分钟内设置 GlassFish 集群:
http://blogs.oracle.com/jclingan/entry/glassfish_clustering_in_under_10

约翰·克林根, GlassFish 集团产品经理

Regarding GlassFish, centralized administration through the admin GUI is a big help for environments with more than one appserver instance to manage. "Always available" is overloaded. It can be service availability with no session retention on failure, or it can mean data availability with session information backed up. Of course, GlassFish can do both. A couple of resources that may be of help regarding GlassFish and high availability:

Guide to GlassFish High Availability:
http://www.sun.com/offers/details/glassfish_HAref_config.html

Setting up a GlassFish Cluster in 10 minutes:
http://blogs.oracle.com/jclingan/entry/glassfish_clustering_in_under_10

John Clingan, GlassFish Group Product Manager

玩心态 2024-07-15 19:17:06

Liferay wiki 有一个高可用性指南 条目概述了可以作为起点的架构。

The Liferay wiki has a high availability guide entry outlining an architecture that could serve as a starting point.

静赏你的温柔 2024-07-15 19:17:06

这可能是一种简单化的方法,但我最近实现了类似的负载平衡和高可用性解决方案。
我的应用程序使用 Tomcat 作为 Web 容器和 MySQL 数据库。 我在 Tomcat 中使用了 Apache Http Server,并使用 Apache mod_jk2 模块作为处理负载平衡和故障转移的接口。

从 Apache 文档开始,网络上提供了大量资源。 以下是一些:

http://tomcat.apache.org/connectors-doc /reference/workers.html

http://www.redhat.com/docs/manuals/rhaps/jonas-guide/s1-load-balancing.html

http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

对于 MySQL,请查看 MySQL 代理以实现负载平衡和故障转移。 拥有多个数据库服务器来实现负载平衡和故障转移是一个好主意。 一组数据库可用于读取,另一组可用于写入。 根据卷的大小,您可能需要分配更多/更少的服务器用于读/写。 您的数据库文档也可能对您的配置有所帮助。

HTH。

This is probably a simplistic approach, but I've implemented a similar kind of load balancing and high availability solution recently.
My application had Tomcat as the web container and MySQL database. I've fronted Tomcat with the Apache Http Server and used the Apache mod_jk2 module as the interface to handle load balancing and failover.

Plenty of resources are available on the web starting from the Apache documentation. Here are a few:

http://tomcat.apache.org/connectors-doc/reference/workers.html

http://www.redhat.com/docs/manuals/rhaps/jonas-guide/s1-load-balancing.html

http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

For MySQL, check out MySQL proxy for load balancing and failover. Its a good idea to have more than one database servers for load balancing and fail over. one set of databases can be for reads and the other set for writes. Depending upon the volume, you might want to allocate more/less servers for read/writes. Your database documentation might also help you in the configuration.

HTH.

千仐 2024-07-15 19:17:06

我的一位朋友说,构建可扩展的网站是关于主题:

A friend of mine says that Building Scalable Web Sites is the definitive book on the subject:

方圜几里 2024-07-15 19:17:06

Theo Schlossnagle 的可扩展互联网架构也可能令人感兴趣。

Scalable Internet Architectures by Theo Schlossnagle might also be of interest.

卖梦商人 2024-07-15 19:17:06

我刚刚读完 构建企业解决方案:基于互联网的高性能系统的模式。 对我来说,关于企业系统的可扩展性、可用性、性能、安全性以及许多其他方面的精彩介绍

I just finished reading Architecting Enterprise Solutions: Patterns for High-Capability Internet-based Systems. Excellent introduction for me on scalability, availability, performance, security, and a whole lot of other aspects for Enterprise Systems

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