Two frontents but a single backend a good idea?



I’m running HAProxy 1.5.x

I have a pair of web servers running multiple websites, so far so good.

I have the need to run an extra site on its own separate IP address, I was wondering if I re-use the same back end definition and just add a new front end, is this advisable? would it cause problems?

Or is it best practice/better to have both a separate front end with its separate back-end?

The reasoning for having a single backend is because as the web servers are the same for all the websites, I would like HAProxy to consider that the server capacity available is what I have currently defined in the existing back-end.

If I add two back-ends will I end sort of duplicating the number of possible connections? IE two back-ends using: maxconn 4000 will led HAProxy to try to fit maxconn 4000 x 2 = 8000

If someone could clarify this to me it will be great.


2 frontends pointing to the same backend is a perfectly fine configuration, I don’t see anything wrong with that.

Indeed, duplicating the backend would be suboptimal for the exact reasons you mentioned.


Hi lukastribus,

Many thanks for your answer, I could not find much information online regarding this particular aspect, nor in favour or against.

When I think about it, is kind of obvious, however I did not manage to find any single example online of more than one front end vs one single back-end which led me to think that perhaps I was missing something.

Thanks again.