>DevOps Interview KB

Databases Interview Questions

10 questions

Database operations questions for DevOps and SRE roles — backup strategy, replication, and the failure modes that come up when you're responsible for a database's uptime, not just its schema.

Related technologies:DatabasesMysqlPostgresql

What would you do differently for a large-table backfill migration if the table were actively receiving high write throughput during the migration window?

ExpertPostgresql8 min

How would you monitor a batched backfill in production to know it's progressing safely, not falling behind, and not causing replication lag?

AdvancedPostgresql7 min

How would the safe-migration approach for adding a NOT NULL column to a large table differ on MySQL versus PostgreSQL, given their different online-DDL capabilities?

AdvancedMysqlPostgresql8 min

How do you safely add a NOT NULL column to a large production table without locking it for the duration of a slow backfill?

AdvancedPostgresql9 min

Your database backups have been running successfully every night for two years, but nobody has ever actually restored one. Why is that a real risk, and how would you fix it?

IntermediateDatabases6 min

Under a traffic spike, your application starts throwing 'too many connections' errors from the database, even though the database itself isn't under heavy CPU or memory load. What's happening?

IntermediateDatabases7 min

A user updates their profile, immediately reloads the page, and sees their old data — but only sometimes. What's causing this, and how do you fix it?

AdvancedDatabases8 min

How would you design the actual mechanism that decides whether a given database query goes to the primary or a read replica, for an application that wasn't originally built with this split in mind?

AdvancedDatabases8 min

During a network partition, both your old primary and a newly promoted replica briefly accept writes at the same time. How does automatic failover cause this, and how do you design against it?

ExpertDatabases8 min

What's the actual trade-off between synchronous and asynchronous database replication, and how would you decide which to use for a payments system versus an analytics dashboard?

AdvancedDatabases7 min