Portal:Cloud VPS/Admin/Haproxy

This page contains information about our HAProxy configuration in the CloudVPS environment.

OpenStack API Endpoints

Backend HA Status

Backend services that are full active / active will automatically be pooled and depooled by HAProxy. As long as there is one instance available there will be no interruption in service.

EQIAD1

Serviceactive backendsstandby backendsnotes
Designatecloudservices1003
cloudservices1004
NA
Glance APIcloudcontrol1003cloudcontrol1004Waiting on shared storage (CEPH) for full active/active
Glance Registrycloudcontrol1003cloudcontrol1004Waiting on shared storage (CEPH) for full active/active
Keystonecloudcontrol1003
cloudcontrol1004
NA
Neutroncloudcontrol1003
cloudcontrol1004
NA
Novacloudcontrol1003
cloudcontrol1004
NA

Port Mappings

ServiceBackend PortFrontend Port
Designate API90019001
Glance API192929292
Glance Registry191919191
Keystone Admin150005000
Keystone Public4535735357
Neutron196969696
Nova API187748774
Nova Metadata187758775

Load Balancing and Session Handling

Backend connections for each service are dynamically directed to the server with the least amount of connections using the `leastconn` load balancing algorithm.

Session persistence is maintained with HAProxy stick tables using the IP address of the client. This will ensure new client connections get forwarded to the same server every time.

Monitoring

Icinga

Icinga is configured with the following HAProxy process checks:

  • nrpe_check!check_haproxy_alive!10
  • nrpe_check!check_haproxy!10

Prometheus

The prometheus haproxy exporter is collecting haproxy backend and frontend metrics directly from haproxy through the URL http://localhost:9900/stats;csv. This URL is read-only and only provides statistic information through the loopback interface.

Grafana dashboard: https://grafana.wikimedia.org/d/tanisM2Zz/wmcs-openstack-eqiad1-api-stats

Troubleshooting

Monitoring

HAProxy statistics and metrics can be queried through the "stats socket" at `/run/haproxy/haproxy.sock`.

Process information:

echo "show info" | sudo socat /run/haproxy/haproxy.sock stdio

Statistics:

echo "show stat" | sudo socat /run/haproxy/haproxy.sock stdio

Log files

  • /var/log/haproxy/haproxy.log

Primary Failover

Design

Each controller is running HAProxy with no cross dependencies on other controllers or HAProxy instances. Each load balancer is operating on its own with no shared information like client sessions between them.

DNS

Each region has a dedicated FQDN (openstack.<region>.wikimediacloud.org) which maps to one of the OpenStack controllers running HAProxy. In the event of failure or maintenance this DNS entry will need to be remapped to the other controller in the operations/dns git repository at https://gerrit.wikimedia.org/r/admin/projects/operations/dns


This article is issued from Wikimedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.