Thursday, June 29, 2017

Schema Sharding With MariaDB MaxScale 2.1 (Part 2)

DZone Database Zone
Schema Sharding With MariaDB MaxScale 2.1 (Part 2)

In this second installment of schema sharing with MariaDB MaxScale to combine SchemaRouter and ReadWriteSplit MaxScale routers, we'll go through the details of implementing it in order to shard databases among many pairs of master/slave servers.

Before we move forward, I would like to highlight that you need to remove any duplicate database schemas (schemas present on both shards). Schemas should exist in just one of the shards, as when the SchemaRouter plugin starts, it’s going to read all the database schemas that exist on all the shards to get to know where the query will be routed. Take care to use mysql_secure_instalation and remove test database schema to avoid the below error when sending queries to MaxScale that will resolve them with the backend database servers (note: this rule to avoid having duplicate databases among shards does not apply for MySQL system database):

No comments:

Fun With SQL: Functions in Postgres

DZone Database Zone Fun With SQL: Functions in Postgres In our previous  Fun with SQL  post on the  Citus Data  blog, we covered w...