diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index 5e9831aae..6a69a0170 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -21,6 +21,7 @@ * Transaction load balancing for normal transactions * Support for runtime router reconfiguration * Experimental resultset concatenation router, `cat` +* The schema router is now capable of sharding tables. For more details, please refer to: diff --git a/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md index 557377158..f81d196b4 100644 --- a/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md @@ -205,6 +205,11 @@ for details. The `source` parameter can now contain a list of comma separated addresses. +### Table Sharding + +The SchemaRouter is now capable of sharding tables. Please see the SchemaRouter +[documentation](../Routers/SchemaRouter.md) for details. + ### Interactive Mode for MaxCtrl ### ReadWriteSplit diff --git a/Documentation/Routers/SchemaRouter.md b/Documentation/Routers/SchemaRouter.md index 1c5344840..262aa3db1 100644 --- a/Documentation/Routers/SchemaRouter.md +++ b/Documentation/Routers/SchemaRouter.md @@ -8,6 +8,9 @@ database-based sharding, the schemarouter router also enables cross-node session variable usage by routing all queries that modify the session to all nodes. +From 2.3.0 onwards, the SchemaRouter is capable of sharding tables, in +addition to sharding databases. + ## Routing Logic If a command line client is used, i.e. `mysql`, and a direct connection to @@ -114,6 +117,29 @@ refresh_databases=true refresh_interval=60 ``` +## Table Sharding + +This functionality was introduced in 2.3.0. + +If the same database exists on multiple servers, but the database contains +different tables in each server, the SchemaRouter is capable of +transparently routing queries to the right server, depending on which table +is being addressed. + +For instance, suppose the database `db` exists on servers _server1_ and +_server2_, but that the database on _server1_ contains the table `tbl1` and +on _server2_ contains the table `tbl2`. + +In that case, the query +``` +SELECT * FROM db.tbl1 +``` +will be routed to _server1_ and the query +``` +SELECT * FROM db.tbl2 +``` +will be routed to _server2_. + ## Router Options **Note:** Router options for the Schemarouter were deprecated in MaxScale 2.1.