官术网_书友最值得收藏!

Clustered high available money TransferWebApp

In this section, Doctor JBoss and his assistant have the critical mission to build a proof of concept showing a clustered money transfer web application. The client will rely on this application to improve their money transfer portal.
The customer wants to see failover processes and confirm the transaction data is not lost when a node goes down.
A clustered application is a distributed application running on one or many server instances with the specificity that user data is also replicated on one or more nodes.
Web applications deployed on the JBoss Application Server must explicitly activate the clustering by adding the <distributable> tag in their web.xml descriptor.
This tag activates clustering on the the JBoss Application Server when the following subsystems are available:

  • Infinispan: This subsystem provides the replicated cache to store objects: httpsessions and ejbs
  • JGroups: This provides communication mechanisms used by nodes to discover each other and make exchanges
  • Modcluster: The subsystem provides capabilities to communicate with the Apache HTTP server when Apache acts as a load balancer

Since user sessions are replicated on various nodes, while hitting the application URL for node1 or node2, the user should see exactly the same content, including dynamic data stored in the session:

Session replication

If one node goes down, replication is not possible with the failing node; only users connected on the active node will be able to perform their transactions. At the same time, users previously connected on the failing node will face an error unless they have switched to a working node:

Session replication: a node goes down

To automatically switch clients to working nodes in case of a failure node, load balancers can be used; their main purpose is to listen for incoming client requests and redirect them to one active node. Load balancers also serve as a single entry point, hiding the multiple backend URLs to the final users.

If a user was previously connected to the failing node just before the break, by refreshing its browser or sending a new request, it should be switched by the load balancer to an active node where it resumes its session:

Load balancer in clustered application
主站蜘蛛池模板: 鹤壁市| 台中市| 大英县| 随州市| 乐安县| 肃宁县| 兴宁市| 高邮市| 囊谦县| 定陶县| 策勒县| 漳平市| 左云县| 淅川县| 荣昌县| 西藏| 锦州市| 绥阳县| 沈阳市| 新绛县| 赣榆县| 云浮市| 浦县| 确山县| 广汉市| 平乡县| 民乐县| 延寿县| 昌平区| 荃湾区| 襄樊市| 巴里| 原平市| 眉山市| 姜堰市| 西和县| 牡丹江市| 岚皋县| 高邮市| 阳朔县| 余江县|