Overview
The Router + Coordinator deployment is the recommended setup for production environments. It provides centralized metadata management, dynamic configuration updates, and support for multiple router instances. In this deployment mode:- A Coordinator manages the sharding metadata and configuration
- QDB (etcd cluster) stores the cluster metadata persistently
- Multiple Routers connect to the Coordinator and share the same configuration
- Routers must be registered and unregistered with the Coordinator
- Configuration can be updated dynamically without router restarts
Setup
1. Deploy etcd Cluster
Set up an etcd cluster to serve as the QDB. For production, we recommend using a 3-node cluster. Example: Single-node etcd (for testing)2. Configure the Coordinator
Create a coordinator configuration file:coordinator.yaml
3. Start the Coordinator
4. Configure Sharding Rules
Connect to the Coordinator’s admin console:5. Configure the Router
Create a router configuration file:router.yaml