Answer the question
In order to leave comments, you need to log in
Virtual shards in Postgresql: mapping a key to a shard, how do you do it?
Tell me pliz:
1) how do you give the key an identifier? is it a unique identifier from the global sequence or is it a composite identifier from the server identifier and the server sequence? is it a random ObjectId from mongodb?
2) how do you bind the key identifier to the virtual shard? some (for example, Badoo here - youtube.com/watch?v=MhGO7BBqSBU from 49:07) say that they not only move virtual shards between servers, but also separate keys between virtual shards. How and where do you store this mapping between key id and virtual shard? Maybe in a separate service in SQL or mongodb? How?
I used to hash the key name and determine the shard from the last bits of the hash, they used the shard calculation function instead of mapping to a virtual shard. Please share your experience on how you do it with virtual shards. Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question