On 5/20/2019 6:58 AM, Jeff Abrahamson wrote:
We set up an haproxy instance to front several rails servers. It's
working well, so we're quickly wanting to use it for other services.
Since the load on the haproxy host is low (even miniscule), we're
tempted to push everything through a single haproxy instance and to let
haproxy notice based on requested hostname to which backend to dispatch
requests.
Is there any good wisdom here on how much to pile onto a single haproxy
instance or when to stop?
I'm just a user, not connected with the project in any way. This
message is not intended to contradict any of the other replies you've
gotten.
The haproxy software is amazingly efficient. Some people are setting up
proxies on raspberry pi hardware with excellent results.
There's a page on haproxy.org about 10 gig performance:
http://www.haproxy.org/10g.html
In 2009, this test was done with a Core 2 Duo processor on the haproxy
machine, and it easily saturated the 10gig connection. The E8200
processor was introduced in Q1-2008, so it's over 11 years old.
Any modern laptop would probably have more CPU power than the machine
used in that test. A desktop or server-class system would do even better.
As for when to stop adding load ... I don't know for sure on that. The
program is typically more CPU-bound than memory-bound, so if you have
CPU capacity left, it could probably handle more traffic. Memory for
each active session is required, though, so don't neglect that. A few
gigabytes should handle a lot of traffic, though.
If your haproxy is handling TLS/SSL, you can do more traffic by using a
CPU that can do encryption offloading, and making sure your encryption
library (usually openssl) is compiled with the option to take advantage
of that capability.
Thanks,
Shawn