在 EC2 上重新部署/故障转移 Glassfish 集群?

发布于 2024-11-10 07:07:13 字数 463 浏览 6 评论 0原文

我有一个 Tapestry 应用程序(WAR,没有 EJB)......

  • 我想部署在 2 个 EC2 小型实例上(用于故障转移)。
  • ...使用Spring Security
  • ...是有状态(非常小的会话状态)
  • ...应该部署在Glassfish 3.1上(似乎有最好的集群支持?)
  • ...并且有一个弹性负载均衡器,前面有粘性会话

我如何配置集群以实现最小(“否”)如果 A) 节点发生故障 和 B) 我部署新版本,用户体验会中断吗?

I have a Tapestry application (WAR, no EJB) that ...

  • ... I want to deploy on 2 EC2 small instances (for failover).
  • ... uses Spring Security
  • ... is stateful (very small session state)
  • ... should be deployed on Glassfish 3.1 (seems to have best cluster support?)
  • ... and has an elastic load balancer with sticky session in front of it

How can I configure a cluster to achieve minimal ('no') interruptions for the user experience in case A) a node fails and B) I deploy a new version?

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

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

发布评论

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

评论(1

余生一个溪 2024-11-17 07:07:13

一切都在这里解释:http://download. oracle.com/docs/cd/E18930_01/html/821-2426/docinfo.html#scrolltoc

基本上,您设置一个 DAS (=master),它控制带有实例的节点。您可以在同一台计算机上完成所有这些操作(1 个 DAS、1 个具有多个实例的节点),不过最好至少有 2 个。

然后您应该至少有一个负载均衡器(apache、物理负载均衡器、任何)。

A) 如果节点发生故障,负载均衡器可以将所有流量重定向到其他节点

B)

  • 部署应用程序,禁用,使用新版本(请参阅“应用程序版本控制”)
  • 将服务器 A 标记为不可用
  • 在服务器 A 上启用新版本
  • 标记服务器 A为可用且服务器 B 为不可用
  • 在服务器 B 上启用新版本
  • 将服务器 B 标记为可用

Everything is explained here: http://download.oracle.com/docs/cd/E18930_01/html/821-2426/docinfo.html#scrolltoc

Basically, you setup a DAS (=master), which control nodes with instances on it. You could do all of this on the same machine (1 DAS, 1 node with multiple instances), although it would be a good idea to have at least 2.

You should then have at least one load balancer (apache, physical load balancer, whatever).

A) if a node fails, the load balancer can redirect all traffic to the other node

B)

  • deploy application, disabled, with new version (see "application versioning")
  • mark server A as unavailable
  • enable the new version on server A
  • mark server A as available and server B as unavailable
  • enable the new version on server B
  • mark server B as avalilable
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文