All jobs / Backend developer / Architecture

Backend developer interview question · 5+ years

The interviewer asks: “How do you isolate tenants in a multi-tenant backend?” Strongest answer?

The strongest answer

Pick a model on purpose: row-level with a mandatory tenant predicate (and tests that fail closed), schema-per-tenant, or db-per-tenant for the ones that need it. I never “remember to add WHERE tenant_id” in each query by folklore.

Why it works

Exactly. Isolation is a security property. ORM global filters, row-level security, or separate stores — plus tests that try to read another tenant and must fail.

What a good answer covers

Answers that fall short

Who gets asked this

More Architecture questions