Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Context aware MySQL Replica pools via HAProxy, sample configs & scripts

License

Notifications You must be signed in to change notification settings

github/mysql-haproxy-xinetd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql-haproxy-xinetd

This repository contains sample config files and scripts used for setting up a context aware MySQL replication pool on HAProxy.

A context aware pool is a pool of backend MySQL servers, such that each tells HAproxy whether it should be included in the pool or not.

HAProxy-wise, the pool is fixed, and MySQL server state changes are not reflected in its config. This setup is resilient to service haproxy reload/restart.

A backend server is able to tell HAProxy:

  • I'm good to participate in a pool (HTTP 200)
  • I'm in bad state; don't send traffic my way (HTTP 503)
  • I'm in maintenance mode. No error on my side, but don't send traffic my way (HTTP 404)

The servers respond to an explicit request (check) type sent by HAProxy, such as /check-lag or /ignore-lag.

HAProxy uses a main backend pool and a backup backend pool, such that the backup pool is activated when the main pool runs out of capacity. HAProxy uses different check types for the two pools.

About

Context aware MySQL Replica pools via HAProxy, sample configs & scripts

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published