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

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
主站蜘蛛池模板: 柯坪县| 茂名市| 丰城市| 西盟| 北宁市| 晋江市| 南平市| 霍邱县| 奉贤区| 嵊州市| 通州市| 开江县| 陆河县| 通城县| 嵊泗县| 库尔勒市| 周口市| 海城市| 武山县| 新丰县| 扎兰屯市| 古浪县| 修水县| 区。| 西畴县| 锡林浩特市| 怀远县| 金堂县| 江源县| 息烽县| 苏尼特右旗| 桃江县| 张家口市| 道孚县| 大丰市| 万宁市| 甘德县| 桓仁| 丽水市| 石城县| 奉新县|