Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently am using mod_proxy_balance in Apache for load balancing. I have a client emulator which creates 100 threads and emulates user activities like browse the website. I tried making the client talk to the webserver directly and also through the load balancer. Here is what I found.

When client talks directly to webserver:

  • delay = 28ms

When client talks to webserver through a loadbalancer (only one backend webserver):

  • delay = 53ms

When client talks to webserver through a loadbalancer with two backend webservers:

  • delay = 113ms

The delay keeps increasing, is there a way to get this delay down? It is a very important aspect to provide agreeable SLO.

share|improve this question
    
Can you set up the load balancer specifically to deal with DNS and do round robins with the internal IPs of the servers? (All one network with one external server, or do they all have net access?) Please let me know if they are all public or just the one. –  U4iK_HaZe Aug 31 '11 at 19:58
    
They are all public. They all have net access. –  sethu Aug 31 '11 at 20:11
    
Why not run a BIND server and then set up A-records for whatever the internal addresses are for the hosting servers? This will get you direct connections. The DNS server can even be run on the primary web server if you aren't getting too many hits. –  U4iK_HaZe Aug 31 '11 at 20:47

3 Answers 3

up vote 0 down vote accepted

You should switch to a load balancer like ha_proxy which is much better suited and performant than mod_proxy_balancer.

mod_proxy_balancer is inefficient and has a number of bugs.

share|improve this answer

I don't think mod_proxy_balancer is epoll-based, but it's better to check. If it's not based on epoll system call the cause of this delay is obvious, select system call and Apache synchronous processing model are not proper tools for balancing. You should try HAProxy or nginx instead.

share|improve this answer

Use a better load balancer, really. Your webserver is very good at serving requests, rather than proxy them hither and yon. A good load balancer has packet delays in the sub-millisecond range for existing connections, and shouldn't increase latency just because there's more than one backend.

I use IPVS for load balancing wherever I can, because it is fast and super-efficient. If it's a bit much of a stretch for you, though, you can at least use haproxy to provide good-quality load balancing to your backends.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.