Andriy Kopachevskyy
Andriy Kopachevskyy

Reputation: 7706

HAProxy dynamic configuration

Here is my setup:

Basically:

 sub1.mydomain.com -> latest-load-balancer
 sub2.mydomain.com -> older-load-balancer

The problem is how to setup this routing, we can't stop/start haproxy for each new subdomain. And it could be more them 10k of that subdomains in future.

Upvotes: 3

Views: 5236

Answers (1)

Ross Presser
Ross Presser

Reputation: 6265

  1. haproxy can use maps to decide which backend (internal load balancer) to use, based on the domain.
  2. haproxy can be reloaded instead of restarted when the map changes.
  3. If you do not wish to even reload, you could pass map commands to the unix socket, thus changing the map in realtime.

Upvotes: 5

Related Questions