1

I've been tasked to explore ways of building a very fail-resistant configuration for a professional application developed for JBoss.

I have a somewhat fixed hardware configuration (servers have already been selected and they are meant to handle thousands of connections per second) and much more freedom for the software side.

I initially meant to use VRRP, either with dedicated L3 switches or via keepalived, and haproxy to provide access to Apache in a fail-over, loadbalanced configuration.

(Ref:

It is the first time i need to deploy JBoss so while doing homework i read that mod_jk essentially has a loadbalancer itself that would work between one instance of apache and multiple instances of JBoss.

My question is: If i configured both the http loadbalancing with HAProxy and the AJP/JBoss loadbalancing with mod_jk would i get any benefit? would it screw up the loadbalancing or even the functionality of the app server in any way?

Here is a diagram of the intended configuration:

JBoss+HAProxy Loadbalancing

We are still well into the design phase so this is why there are no more details. I can provide them if needed but i believe this to be a general question about the workings of different load-balancing mechanics when deploying JBoss + Apache.

I haven't taken databases into consideration as well, it is the next step we're gonna tackle.

ItsGC
  • 905
  • 7
  • 12

2 Answers2

3

My question is: If i configured both the http loadbalancing with HAProxy and the AJP/JBoss loadbalancing with mod_jk would i get any benefit?

I would do it by using either HAProxy or mod_jk, not both. I don't see any benefit from using multiple tiers load balancer.

Another option is using mod_cluster. Give it a try.

quanta
  • 50,327
  • 19
  • 152
  • 213
  • If i had to use one or the other, i'd go with HAProxy because realistically i would get many many more hits on the frontend (especially the homepage)rather than the application server (only a very tiny fraction of all the users will use many resources making big queries and such). But without using mod_jk, how would you go about providing failover between apache and the app server? what if JBoss crashes? – ItsGC Sep 06 '12 at 08:45
0

I don't see any benefit from using multiple tiers load balancer.

Ajp is binary protocol much faster than http, so if you use Haproxy in front in tcp mode (faster than http) to Apache and then mod_jk between Apache and Jboss you will notice some boost. comparing to Haproxy http mode to Jboss.