HAproxy 添加多個配置文件

Here is how I manage this :

I write a different frontend/backend file for each frontend :

https://github.com/StevenLeRoux/webhub/blob/master/src/genconf.py

then when I start :

https://github.com/StevenLeRoux/webhub/blob/master/src/haproxyctl

is doing : CPPPCI  HAPROXY_CONFDIR/HAPHOSTI  HAPROXY_CONFDIR/backend -IHAPROXY C ONFDIR/frontendo  HAPROXY_CONF $HAPROXY_CPP

which basically rebuild one config file. Very fast and you still have
the flexibility to manually remove a frontend quickly.

Note that the genconf.py is old now and need to be fixed (header
manipulations…)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章