https://github.com/github/mysql-haproxy-xinetd
Context aware MySQL Replica pools via HAProxy, sample configs & scripts
https://github.com/github/mysql-haproxy-xinetd
Last synced: 5 months ago
JSON representation
Context aware MySQL Replica pools via HAProxy, sample configs & scripts
- Host: GitHub
- URL: https://github.com/github/mysql-haproxy-xinetd
- Owner: github
- License: mit
- Archived: true
- Created: 2016-06-30T09:45:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-08T11:47:50.000Z (over 9 years ago)
- Last Synced: 2024-09-29T00:20:57.667Z (over 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 106
- Watchers: 12
- Forks: 31
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.