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:
Post a Comment