3

I would like to do load balancing.

To do this I would like to use LVS and apache as load balancer.

My configuration will be like this :

users -> internet -> LVS load balancer -> Apache balancer -> Real servers

Do you think it's possible?

In this configuration I don't know if I need two load balancers or only one with LVS & Apache together.

Thanks

tranen
  • 31
  • 2
  • 1
    Why do you want an apache load balancer (assuming mod_proxy_balancer)? Having LVS **AND** mod_proxy_balancer is redundant, and one of your balancers would be wasting CPU. – phemmer Feb 11 '11 at 02:31
  • Lvs is layer 4 and mod_proxy is layer 7. I read that if we do the both, the architecture is more scalable and can evoluate easier. does it true or you think only one balancer is enough? – tranen Feb 11 '11 at 03:13
  • It may be enough depending on your needs. – Khaled Feb 11 '11 at 07:38
  • As mentioned in the comments that apache load balancing in your setup might be unnecessary. To what level are you trying to scale? – Sameer Feb 15 '11 at 03:46

2 Answers2

1

Haproxy would replace both the LVS and Apache mod_proxy. It can do load balancing generically at Layer 4 (any TCP port) and Layer 7 with an indepth understanding of HTTP. Persistancy is no problem.

Wim Kerkhoff
  • 901
  • 1
  • 5
  • 12
0

It is definitely possible. We have LVS sitting in front to balance all requests, including email, web, etc. Then on the web nodes we have Apache mod_proxy sending back to Oracle servers. LVS doesn't cut it with multiple web node Oracle servers because of how persistence works, where Apache works just fine.

We have two LVS balancers (one acting as failover) and two Apache servers, but only one Apache server balances back to Oracle. We have this set up through the front-end balancers as they pass one routable IP to standard web traffic on both servers, and a second routable IP to pass Oracle traffic to a single Apache node. We then weight the non-Oracle Apache node higher since it is not handling Oracle balancing (and SSL encryption to Oracle for that matter).

Standard traffic:
Users -> Internet -> Firewall -> LVS -> Apache0 (Weighted heavier)
                                     -> Apache1
                                     -> Email0
                                     -> Email1
                                     -> Other Services

Oracle traffic:
Users -> Internet -> Firewall -> LVS -> Apache1 -> Oracle Web0
                                                -> Oracle Web1
gabedoss
  • 1
  • 1