Splitter is a control-plane service for assigning work to connected clients. Its primary focus is coordination for stateful sharded services.
- Uses UUID spaces as work domains: splits them into shards and assigns to clients.
- Emphasizes exclusive shard ownership in a steady state using leases. Optional dual ownership during shard transitions for advanced use cases.
- Promotes an easier programming model in comparison to coordinators that provide eventual consistency in shard assignments.
- Shard management is handled centrally in Splitter, using Raft for storage and coordination.
- Assumes that client instances are dynamic and can come and go.
- Region-aware assignments for multi-regional services.
- Automatic propagation of routing information to client instances.
- Can be used for leadership election by client instances.
- Provides authoritative shard alignment information for external services interested in arranging data and compute across multiple regions.
- Built with no external dependencies and only requires persistent storage to store metadata.
- Sharding Model describes motivation behind stateful services and explains Splitter's approach.
- Guide describes Splitter model and its features.
- Engineering blog post about Splitter
To see Splitter in action, check out an example that illustrates how to manage connected robots. Only requires Docker and Bazel.
The example shows how to integrate Splitter with Bazel projects. Splitter Go client library can also be used in native Go projects.
To build and load a Docker image:
bazel run //:loadAfter starting Splitter in a container, it can be controlled using splitterctl:
docker exec <container> /usr/local/bin/splitterctlSee CONTRIBUTING.md