Engineering Decisions · Senior · Question 9 of 14

A SaaS has 5,000 small customers and 3 enterprise clients who contractually require isolated data. How do you lay out tenants?

Show the answer

Correct answer: Shared tables with RLS, dedicated databases for the 3

Explanation

A hybrid keeps small customers cheap and meets the contracts of the three that need real isolation. A database per tenant fits a few high-value customers, but 5,000 of them mean heavy costs for migrations and connections. Shared tables fit a uniform customer base, but they break the contract here, no matter how strict the filtering is.

Further reading

Problem with a question

Engineering Decisions · Senior · question 9

Test yourself

Take the Engineering Decisions · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz