Right now I have a slew of server entries defined like so:
server cn0136 10.33.125.17:8008 check
server cn0137 10.33.136.20:8008 check
server cn0138 10.33.124.23:8008 check
server cn0139 10.33.135.13:8008 check
server cn0140 10.33.137.23:8008 check
server cn0141 10.33.132.30:8008 check
All of these IPs are defined in DNS and I'd like for my server list to be updated automatically when DNS is updated. Ideally my server specification in the configs would simplify to something like:
servers cn_foo foo.bar.com:8000 check
Based on my reading of the docs and the answer to this ServerFault question it looks like this is not possible. Has anyone patched haproxy to handle this? Are there any other work arounds than using another templating system bolted on the side?
If you use a newer version of haproxy, it will support it in a smart way. Just read chapter 5.3 of the documentation.