nginx v varnish v haproxy

140 views
Skip to first unread message

Anna C

unread,
May 17, 2016, 5:34:19 PM5/17/16
to OpenTSDB
Hello All

I'm about to try out some different caching and load balancing options infront of my read TSDBs. Been doing a little reading on nginx vs varnish vs haproxy. Who out there is currently running each of these in production and can tell me some good and bad points about each, possibly share some performance numbers, and any gotchas you have run into?

To put it into context our environment is currently very small,  a couple thousand datapoints being written per second. However, this will scale up to about 250K/sec in the next 3-4 months. The read side is very light right now, and I  don't have a good idea what read/sec numbers will be - only that is fully accessible by a wide variety of consumers and the last hour worth of metrics will be the heaviest read.

Thanks!

Izak Marais

unread,
May 19, 2016, 1:18:10 AM5/19/16
to OpenTSDB
Will also be interested to hear feedback on this. 

Luis Torres

unread,
May 19, 2016, 7:56:44 PM5/19/16
to Anna C, OpenTSDB
I have all three in production right now but as LB's and/or caching for HTTP requests. Not sure how many concurrent connections you expect but in our environments we have anywhere from 500 to 2500 requests per second.

We run all three on RHEL 6 and 7.

a. HAProxy
Pros: Pretty simple configuration file. 
  Fast with low overhead.
  Great output from stats plugin if enabled.

Cons: Runs as a single thread by default and changing to multithreaded operation is not recommended (per the docs). This caused performance issues when dealing with 1500+ requests per second. CPU usage was vastly superior vs NGINX.
  No caching capabilities AFAIK.
  Not as many logging options as NGINX.

b. NGINX
Pros: Really stable. Multithreaded, can handle considerable workloads on commodity hardware w/o running into performance issues.
  Logging can be augmented by using dynamic variables which is nice to get performance stats and for debugging.
  Lots of added functionality by compiling with optional modules

Cons:
  Stats page provides minimal feedback although there's a commercial plugin in LUA that does a really nice job.


c. Varnish
We use this in a smaller deployment mostly for caching and because we wanted to evaluate it. I can't really provide a lot of feedback here since it hasn't gotten as much traffic as the others however on the few tweaks we wanted to perform we found the configuration more difficult than HAProxy or NGINX.

Good luck!
--
Luis Torres
VP of Information Technology & Security

Nicholas Whitehead

unread,
May 19, 2016, 8:05:16 PM5/19/16
to Luis Torres, Anna C, OpenTSDB

Thanks Luis. Good info.

Reply all
Reply to author
Forward
0 new messages