[MXS-411] need to shard by table name Created: 2015-10-16  Updated: 2018-03-26  Resolved: 2018-03-26

Status: Closed
Project: MariaDB MaxScale
Component/s: schemarouter
Affects Version/s: None
Fix Version/s: N/A

Type: New Feature Priority: Minor
Reporter: Rick James (Inactive) Assignee: markus makela
Resolution: Won't Do Votes: 0
Labels: None


 Description   

The client has _tables _named foo_yyyy_mm_dd (yeah, that is yucky), and would like to direct activity to a particular backend server based on the tablename. They are willing to write one rule per table, but it is not clear how to do even that.



 Comments   
Comment by markus makela [ 2015-10-16 ]

The current implementation of the schemarouter only shards on the schema level. It was never intended to shard on the table level so I've changed this from a bug report to a feature request.

I believe this could be done with a separate module instead of trying to make the schemarouter shard on the table level.

Comment by markus makela [ 2015-10-19 ]

Table level sharding can be achieved with regexfilter and schemarouter.We can match queries that target a specific table by replacing the table name with a fully qualified name which has a database name that is located on a different shard.

An example would be a two shard cluster with database db1 on shard A and db2 on shard B. If we want to route all queries to table tbl1 to the shard B, we need to match all queries that target tbl1 and replace them with db2.tbl1. This way applications should be able to continue functioning in a sharded environment without a need to change them.

Comment by markus makela [ 2018-03-26 ]

Outside of the scope of the schemarouter.

Generated at Thu Feb 08 03:59:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.