0

Is there a way to monitor/get the value of the current maxconn and based on that value add more instances ?

Currently I have a setup of 3 HAProxy with maxconn 1000 I have recached the limit at a point that the stats page is not even reachable.

So would like to know/prevent how to scale horizontally whenever I am close to reach that limit.

Any ideas?

nbari
  • 548
  • 1
  • 8
  • 25

2 Answers2

1

You can use stats socket if you have it enabled to get information about HAProxy instance and based on this you can make some actions.

Possibility of horizontal scalling depends on your environment, basically you will take value from stats socket, do some evaluations and - if needed - will call your environment API for start a new instance of HAProxy, setup it and connect to your app.

Ondra Sniper Flidr
  • 2,623
  • 11
  • 18
0

Look into mesos haproxy https://github.com/mesosphere/marathon-lb. It takes some time to configure, but afterwards you can scale it horizontally.

Alex H
  • 1,814
  • 11
  • 18