Undertow mod_cluster proxy: Basic setup in Wildfly 10

by karm
GNU/Linux ◆ xterm-256color ◆ bash 10545 views

Overview

The simplest possible setup with Undertow mod_cluster proxy Wildfly 10 laod balancer and two Wildfly 10 workers.

Balancer

  • we configure advertising socket binding; the UDP multicast address and port the balacner advertises its precence on
  • we configure Undertow mod_cluster filter
  • we add this filter to Undertow’s http host so as it can receive mod_cluster protocol messages from worker nodes; note that this is not secure. In a production environment we would have a dedicated, secured host configured in Undertow so as we receive mod_cluster special messages only from trusted networks.

Workers

  • there is no configuration needed but for adjusting mod_cluster socket binding, so as worker nodes know the UDP address:port where the balancer advertises its presence
  • one worker has two and the other has a one web application deployed
  • note that the balancer correctly forwards requests to the one node that offers that particular application context
  • note that with the application that is deployed on both nodes a failover is possible
  • watch JSESSIONIDs and jvmRoutes in the curl output to get the gist of the functionality

Cheers -K- http://modcluster.io