top | item 36227793

(no title)

nimrody | 2 years ago

My take: have a few database instances (machines) each holding the data for a group of customers. With postgres you can even put different customers on the same database instances but in different schemas.

This way you get all the benefits of the relational model (you can use foreign keys, transactions consisting of multiple tables, etc.) and the performance benefits of additional machines that are not just read-replicas.

Centralized shared tables can be in a separate database which can also hold the mapping between customer-ids and database instances.

Only drawback is that management is more difficult -- backup, migrations, etc. Specifically, you need to handle the case where some customers have migrated their database and others had not yet.

discuss

order

No comments yet.