I am trying to implement JBoss AS7 clustered environment with mod_cluster as load-balancer. Can anyone explain how to dispatch requests based on URL params to specific JBoss Node using mod_cluster?
1 Answers
could you elaborate more on what do you actually need to achieve? mod_cluster is a smart load balancer that dynamically registers worker nodes and their contexts, so, for instance, if I had this cluster:
worker_0, contexts: houby/, ocet/, houbyaocet/
worker_1, contexts: houby/, ocet/, devtest/
worker_2, contexts: houby/, ocet/, devtest/
and this mod_cluster httpd load balancer:
http://mycompany.example.com
then requests to either houby/
or ocet/
could be balanced among all workers, whereas devtest/
could be handled by worker_1
and worker_2
only. Any request to houbyocet/
will end up on worker_0
, because that is the only worker that registered this context.
You don't configure this whole logic, it's done automatically by mod_cluster. Worker nodes send special configuration messages to the balancer regarding which applications they have deployed, whether they are overloaded or not, whether tehy are shutting down/undeploying..etc.
HTH
Karm

- 414
- 6
- 24