Glance load balancing
Let's scale one more service to make sure there isn't confusion with updating the endpoints. The second service we looked at earlier in Chapter 4, Image Management was Glance. Start by updating the glance-api.conf
and glance-registry.conf
files to set bind_host
to the primary IP address of the host that the Glance services are running on:
bind_host=192.168.123.101
Make sure you do this for both the glance-api.conf
and glance-registry.conf
files. Next, add the glance frontends and backends to the /etc/haproxy/haproxy.conf
file:
frontend glance-frontend bind 192.168.122.111:9292 bind 192.168.123.111:9292 mode http default_backend glance-backend frontend glance-registry-frontend bind 192.168.122.111:9191 bind 192.168.123.111:9191 mode http default_backend glance-registry-backend backend glance-backend balance roundrobin mode http server control 192.168.123.101:9292 check inter 10s server control-deux 192.168.123.201:9292 check inter 10s backend glance-registry-backend balance...