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.

HI,

I am running haproxy for load balancing .. i have 2 web server behind the LB. My requirement is , to go 70% load to server 1 and remaining 30% to server2 ,

Please share the Configuration details if its possible,

share|improve this question
add comment

2 Answers

You need to use the weight keywork to specify the server weight.

weight <weight>

You can try the algorithm static-rr.

share|improve this answer
add comment

HaProxy implements a few different load portioning algorithms. The one we use is the least connections one "that picks the backend with the fewest pending connections." as discussed in this article:

http://affectioncode.wordpress.com/2008/06/11/comparing-nginx-and-haproxy-for-web-applications/

The algorithm is smarter than just applying a ratio a la nginx - it should portion out load based on what your back-ends can handle.

share|improve this answer
add comment

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.