Data Modeling hard
Which Multi-Tenancy model offers the highest security/isolation but the lowest resource efficiency (highest cost)?
- A Discriminator Column (Shared Table), where a single `tenant_id` column is used to filter all data at the application or query layer.
- B Schema-per-Tenant (Shared Database), where each customer is assigned a separate, logical namespace but shares the same underlying physical instance.
- C Logical Sharding, where tenant data is automatically partitioned across several nodes based on a high-cardinality hashing algorithm to ensure uniform load.
- D Database-per-Tenant (Silo), where each individual client is provisioned with their own dedicated and physically isolated database instance.
Answer: D. Database-per-Tenant (Silo), where each individual client is provisioned with their own dedicated and physically isolated database instance.
The 'Silo' model (Database-per-tenant) offers the highest level of isolation, eliminating 'Noisy Neighbor' effects and the risk of cross-tenant data leaks due to buggy SQL. However, it is the most expensive and complex to manage, as every schema migration, backup, and infrastructure update must be performed N times across the entire fleet of databases.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When modeling a Distributed Transaction using the Saga Pattern (Choreography or Orchestration), what type of consistency do you achieve?
- Which practice prevents SQL Injection attacks?
- What is 'Bi-Temporal' data modeling (e.g., in SQL:2011 standard)?
- Adding an Index to a database column generally improves Read performance. What is the negative trade-off?
- Log Systems Merge (LSM) Trees (used in RocksDB, Cassandra) optimize for fast writes. What is their primary downside regarding Disk I/O?
- What is the primary objective of normalizing a relational database schema (e.g., to 3NF)?