-
Notifications
You must be signed in to change notification settings - Fork 4
Collection Routing #21
Open
Assignees
Labels
Description
Concepts:
- A collection is a namespace for a KV, Log or Object store
- A collection ID is a sequence of bytes that represent a prefix for all keys in a collection
- A range is a lexicographic partition that holds some range of keys, possibly spanning multiple collections
- A key is an identifier for an element of a collection
- An absolute key is the collection ID + key bytes. If the collection
user_postsmapped to\x58\x29and a request would like to access the keydog plays with catthen the absolute key would be\x58\x29dog\x20plays\x20with\x20cat.
Requests contain:
- collection+key in the form of
user_accounts/alice - operation {read, write, CAS, watch, subscribe}
When a server receives a request, it should do one of four things:
- handle it, because the leader of the range containing the absolute key is on the local server
- return a redirect to a known leader of the containing range
- query the meta range for current leader information for the collection if we have not already done so for this collection in a specified rate-limiting period
- return an error communicating that the collection was queried within the rate-limiting period unsuccessfully