Data partioning schemes for social media platforms

Hello! I have a couple questions regarding data partioning schemes used by social media platforms like Twitter, Facebook, Instagram etc. I watched few videos where the idea was to partition users by region (US, EMEA) to avoid cross continent writes and also to take advantage of the data locality. My question is regarding partition schemes employed with in a certain region which can have multiple data centers, for e.g FB has three or more data centers in US. If all the data is replicated across all data centers and reads can be served from the nearest one to reduce latency, can we also divide the users into logical partitions (where there are thousand of logical partitions) and distribute these logical partitions across data centers such that the primary replicas of each of these logical partitions are now in different data centers. Apart from the overhead of maintaining an external system to keep a mapping of the primary replicas to Data centers, what other problems do you guys think this will pose? IMO, the writes are also now uniformly distributed across multiple DC. I also understand that having this uniform distribution of writes is also a hard problem to solve and that FB/Twitter/Instagram are all read heavy systems and the round trip latency to write is also not that big of a deal. I am just looking to understand if there are any major flaws with this design? I tried finding information online to understand how writes are distributed, more specifically if all the writes in these big distrubuted systems are all served in one data center with the others just acting as read proxies, all I could find was the pros and cons of hashing the user ID vs tweet ID/Post ID/ photo ID which was not very helpful.

Thanks!

Comments (0)