Blog calendar

RSS feed from Michal Frackowiak's blog

subscribe to the RSS feed

— or —

get my blog posts via email

michal-frackowiakmichal-frackowiak
SquarkSquark
shark797039shark797039
Arotaritei VladArotaritei Vlad
AlokranjanAlokranjan
RefutnikRefutnik
TRT- Vipul SharmaTRT- Vipul Sharma
yerihyoyerihyo
Matt GentileMatt Gentile
HirelawyerHirelawyer
Helmut_pdorfHelmut_pdorf
Sven StettnerSven Stettner
michalf23michalf23
leigerleiger
srivercxsrivercx
Brian PasBrian Pas
Joshua DarbyJoshua Darby
lil g easylil g easy
Mr ShaggyMr Shaggy
Chen XXChen XX

... and more

Watch: site | category | page

Blog tags

Welcome to my blog — place for ideas, comments, interesting hacks and boring personal stuff. Enjoy!


HAProxy and Chef - dynamic backend server list

20 Nov 2014 10:02

After the recent load balancer upgrade at Wikidot people asked me about the magic behind automatic HAProxy configuration — namely, how do we solve dynamical addition and removal of backend servers. It's not that complex, we use Chef.

Below I will tell you how we do it.

Assumptions:

  1. We have a working Chef server.
  2. All nodes run Ubuntu, but it's not really important.
  3. All nodes run chef-client periodically (in our case, every 3 minutes).
  4. All web nodes have role web.

As a result will develop a minimal haproxy cookbook to be run on the HAProxy node that:

  1. Will set up HAproxy service.
  2. Will discover and connect to all backend servers.

read more...

Tags: chef haproxy wikidot

Comments: 25


asdad