I'm working on a sharding problem, and I need to ensure that the servers covering the shards have the following properties:
- A primary and a secondary server is nominated to host each shards.
- The primary and secondary server for each shard should be in separate data centers.
- The shards should be relatively evenly distributed across each server.
I poked around and that sounds like a rules framework would be useful. I dug into Pyke but I'm having a hard time figuring out how to frame the above in the rules Pyke exposes. Am I barking up the wrong tree? Any other recommendations?