Code Monkey home page Code Monkey logo

proxysql-orchestrator-sync's Issues

When using query rules for split reads from writes script will remove master from reads

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.

https://github.com/sysown/proxysql/wiki/ProxySQL-Read-Write-Split-(HOWTO)#basic-readwrite-split-using-regex

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.