Re:Lessons learned from sharding Postgres at Notion
by varyherb on Thursday October 07, 2021 @02:09AM
(#28782755)
Are you at all concerned about the selection of the workspace ID as the partition key? With every workspace on a single partition, couldn't a high-throughput workspace create a "hot" partition that will negatively impact other workspaces on that partition?
Re:Lessons learned from sharding Postgres at Notion
by jayd16 on Thursday October 07, 2021 @02:41AM
(#28782985)
Perhaps this is why they have 15 logical shards per physical machine. Seems like if one logical shard gets too hot, it could be moved to a new physical machine.
At the cost of potentially introducing more cross-partition queries, you might benefit from splitting up high-throughput workspaces. See strategy in https://d0.awsstatic.com/whitepapers/Multi_Tenant_SaaS_Stora..., pages 17-20.