3 ms·
That’s not what they’re doing. They are sharding horizontally on the user. ID’s are 64 bits with the db location (logical shard id) in the first 16 bits. This w
by jokull 13y ago
That’s not what they’re doing. They are sharding horizontally on the user. ID’s are 64 bits with the db location (logical shard id) in the first 16 bits. This will allow anyone with an ID to go to the right db for querying, granted they have logical to physical shard mappings.
- js2 13y agoFrom the article: User table is unsharded. They just use a big database and have a uniqueness constraint on user name and email. Inserting a User will fail if it isn’t unique. Then they do a lot of writes in their sharded database. Get the user name from the URL. Go to the single huge database to find the user ID. I believe the parent is correct.
- jokull 13y agoI see. We tackle the same issue by having a redis keyspace with emails. It can get pretty huge without any problems.