I'm trying to implement a mariadb sharding for learning purpose. I have looked into database sharding in general and found mariadb spider storage engine support sharding. I do not want spider storage engine and like to test tokudb storage engine due to it's high performance. I plan to shard a simple database over two separate VM instances. My questions are,

  1. Can someone point me good tutorial or book to archive this ?
  2. PostgreSQL support connection pooling and load balancing tools ( ex: pg-pool) . Does mariadb has tools like this ?

1 Answer 1


I think the answer to both of your question could be MaxScale. MariaDB MaxScale is a database proxy which supports connection pooling, load balancing, automatic failover, query routing, read-write splitting and more. The query routing feature is used to achieve sharding. For a tutorial, try e.g. this one.

An alternative solution could be ProxySQL, which is a competing database proxy product with some of the same features, including sharding. One advantage of ProxySQL over MaxScale is the license GPLv3 vs BSL, although BSL software becomes GPL after a certain amount of time. MaxScale 2.1 became GPL on 1. July 2019.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.