thijsferyn / proxysql-orchestrator-sync Goto Github PK
View Code? Open in Web Editor NEWSynchronize MySQL master & slave data from GitHub Orchestrator into ProxySQL
Synchronize MySQL master & slave data from GitHub Orchestrator into ProxySQL
Hey Feryn,
this is script is amazing and it's working like a charm. It's not really an issue but for testing purpose, I used the simple read-write split between HG from the Proxysql.
I am facing a problem when you have only 1 master and 1 slave. The Script will remove the
slave form the HG 1. Now when reads/writes a split between HG0 and HG1 you will face read block, since there is no one left in the HG01.
Since the script not automatically adds the Master to HG1. I made a small script adjustment here:
$proxySqlServer->query("INSERT INTO
mysql_servers (
hostgroup_id,
hostname,
port) VALUES ('0','".$master."','3306'), ('1','".$master."','3306')");
Now every time the script does the insert, the master will be automatically also added to the HG1. Which becomes a reader as well.
Which makes reads available again. Otherwise, it's blocked because it's only looking into HG1. Now we should have the possibility to weight the master when a slave comes back online so reads get primarily distributed to the slave first, but that's another story.
Again it's not a issue but needs to be considered when there is no slave left in HG1.
Best,
Eddi
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.