Re:Scaling Pinterest - From 0 to 10s of Billions of Page Vie...
by jnankin on Tuesday April 16, 2013 @11:33AM
(#5558723)
2 questions:
1) What do they do with the Pinterest-generated ID? Do they store it with each row in addition to the local ID?
2) Why randomly select a shard? Shouldn't you do this based on DB size across all boxes, or at least based on physical space left across all boxes?
[ Parent
| on HN ]
Re:Scaling Pinterest - From 0 to 10s of Billions of Page Vie...
by yashh on Tuesday April 16, 2013 @12:18PM
(#5559012)
We decompose 64 bit ids to shard_id, type and local_id. We connect to the shard go to the table and read the local_id.
We randomly select a shard for a new user only. Ofcourse we capacity plan this and open new shards and even out users eventually.