Load Balancing

Latest response

Hi,

We have 3 servers (2 Tomcat and 1 Database) which all works on Red hat 7. We would like to have a Load Balancing active/active on the 2 Tomcat Servers without adding a third server to do load balancer.

Does it possible to have a Load Balancing with only 2 servers ?? !

I tried with Pacemaker/Corosync but I don't think is the good way (only active/passive from RHEL documentation). Then I trying CLUSTERIP (IPtables module) but I am not able to have an active/active cluster and no way to manage the weights.

So i need some help to find a solution, I don't really need HA (because we already have 2 servers) but LB !

Thanks you,

Eric SCHMITT's picture

Responses

Eric, it is advisable for a LB to be separate from the worker nodes (2 Tomcat servers). It enables you to distribute work load by applying a range of load balancing algorithms (examples below) suitable for your needs.

Round Robin, Weighted Round Robin, Least connections, Weighted least connections, Random, URL hash.

Hi Sam,

In this simple case I do not agree with you.

I would advise Eric to look at HAProxy

Kind regards,

Jan Gerrit Kootstra

Jan, every day is a school day. On which of his existing servers do you recommend installing HAProxy? Please also explain how it will work.

I found this article https://www.certdepot.net/rhel7-configure-high-available-load-balancer/ I used piranha in the past, that installed fine on the Tomcat nodes themselves.

From that link [https://www.certdepot.net/rhel7-configure-high-available-load-balancer/] the first line reads "you need 2 virtual/physical servers for the load-balancers and 2 virtual/physical servers to load-balance."

I'm interested to learn about your load balancing method whereby the load balancing server and the load balanced server is the same node.

It does not state that the first and the latter have to be different. The only extra resource you need is the VIP address and extra ip-adresses on the servers to service the keep alive network. The example is more complicated then needed.

It states a requirement for 2 HAProxy servers and 2 servers to be load balanced. Are you able to provide an example for your method whereby the load balancing server and the load balanced server is the same node?

A VIP address is necessary. Please explain how the VIP address will be configured on both Tomcat servers without IP address conflict?

Sam we have two Mysql database and two apache server in two data center .we need to make active -active database and application load balancing kindly help

Was this helpful?

We appreciate your feedback. Leave a comment if you would like to provide more detail.
It looks like we have some work to do. Leave a comment to let us know how we could improve.
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.