Orchestrating Proxysql with OCP
Avi Apelbaum, Wix
linkedin/aviapelbaum github.com/wix aviap@wix.com
Orchestrating Proxysql with OCP Avi Apelbaum, Wix aviap@wix.com - - PowerPoint PPT Presentation
Orchestrating Proxysql with OCP Avi Apelbaum, Wix aviap@wix.com linkedin/aviapelbaum github.com/wix Hi. I am Eyal DBA Team Leader @WIx.com Wix in a Minute Our main production DBs Version 5.6.x & 5.7.x 3.2.12 3.0.9 DB instances
Avi Apelbaum, Wix
linkedin/aviapelbaum github.com/wix aviap@wix.com
I am Eyal DBA Team Leader @WIx.com
Version 5.6.x & 5.7.x 3.2.12 3.0.9 DB instances ~574/30TB ~174/1.7TB ~43/Few GB
Most of them are multiple instances on a single physical server All DB’s are replicated with at least 2 DC’s replicas
Austin
Main masters DC
Tampa
Secondary masters DC
Amazon
In 2 availability zones
Amsterdam
Used now for read-only dev access
Austin & Tampa DCs have two instances for HA Most instances have dedicated BI slaves in Austin
I am Avi DBA & DevOPS @WIx.com
Standard Solutions for Standard Problems Network Split Architecture Case OCP
github.com/github/orchestrator
github.com/github/orchestrator
www.proxysql.com
github.com/github/orchestrator
www.proxysql.com
Knows your MySQL topology Handles failover
github.com/github/orchestrator
www.proxysql.com
Knows your MySQL topology Handles failover
What happens here? Master-Slave changes
github.com/github/orchestrator
www.proxysql.com
Knows your MySQL topology Handles failover
Someone wakes up in the middle of the night Master-Slave changes Manual configuration
Someone wakes up in the middle of the night Master-Slave changes Manual configuration
DC 2 DC 1 Master Slave Slave ProxySQL Orchestrator Master Slave Slave Orchestrator ProxySQL
between 2 DCs
DC 2 DC 1 Master Slave Slave ProxySQL Orchestrator Master Slave Slave Orchestrator ProxySQL
RW RO
we have to stop reads to one of the DCs
we have to notify/update all proxysql servers
DC 1 DC 1 Master Slave Slave ProxySQL Orchestrator Master Slave Slave Orchestrator Slave
github.com/github/orchestrator
www.proxysql.com
Knows your MySQL topology Handles failover
github.com/hashicorp/consul-template
Populates values from Consul into the file system.
github.com/github/orchestrator
www.proxysql.com
Knows your MySQL topology Handles failover
github.com/hashicorp/consul-template
Populates values from Consul into the file system.
OCP script
Gets Orchestrator to update a change in topology
github.com/github/orchestrator
www.proxysql.com
Knows your MySQL topology Handles failover
github.com/hashicorp/consul-template
Populates values from Consul into the file system.
OCP script
Gets ProxySQL to sample for a change...
C
s u l T e m p l
...and in case
download new topology
Demo
Application Servers
Connected directly to DB clusters Connected to an abstraction layer
Application Servers Local Health Check
Connected directly to DB clusters Connected to an abstraction layer Upon failure, app servers wait for resume Upon failure, app servers can still work (bcp)
Application Servers Local Health Check Configuration Change
Connected directly to DB clusters Connected to an abstraction layer
Manually Automatically Upon failure, app servers wait for resume Upon failure, app servers can still work (bcp)
Application Servers Local Health Check Configuration Change DB Failover
~1.5 minutes ~0.5 second Connected directly to DB clusters Connected to an abstraction layer Manually Automatically Upon failure, app servers wait for resume Upon failure, app servers can still work (bcp)
Getting Started
github.com/github/orchestrator www.proxysql.com
Knows your MySQL topology Handles failover
github.com/hashicorp/consul-template
Populates values from Consul into the file system.
OCP script OCP script
NEW
ProxySQL Cluster
OCP
Connects 3 existing solutions (Orchestrator, Consul template & ProxySQL)
NEW
ProxySQL Cluster OCP script OCP script
+ Orchestrator
DB recovery time? Less moving parts
OCP
Connects 3 existing solutions (Orchestrator, Consul template & ProxySQL)
What’s your topology? How can you make it update automatically? How much DB recovery time will be saved?
NEW
ProxySQL Cluster OCP script OCP script
+ Orchestrator
DB recovery time? Less moving parts
Lithuania Ukraine
Vilnius Kyiv Dnipro
Wix Engineering Locations
Israel
Tel-Aviv Be’er Sheva
aviap@wix.com