Skip to content
tezvyn:

Databases & Architecture

SQL, NoSQL, system design, microservices, APIs

151 bites

Test yourself: Top 30 intermediate Databases & Architecture interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Intermediate everything in Databases & Architecture, page 2

intermediate1 min read

Denormalization: trading write cost for read speed

Duplicate or precompute data to avoid joins, accept harder writes and consistency risk, justify by read-heavy access.

intermediate1 min read

Upgrading a stateful Flink job without losing state

Take a savepoint, stop with drain, deploy new jar, restore from savepoint with matching operator UIDs.

intermediate1 min read

Tuning a database connection pool

Max size, min idle, connection and max-lifetime timeouts; size from cores and latency, not guesswork.

intermediate1 min read

The N+1 query problem and how to fix it

One query for a list plus one per item for its relation, fix with eager loading or a batched join.

intermediate1 min read

Synchronous vs asynchronous replication trade-offs

Sync waits for replica ack giving zero data loss but higher latency; async acks immediately, faster but risks losing recent writes on failover.

intermediate1 min read

Choosing a good shard key and avoiding hot spots

High cardinality, even write distribution, query alignment; monotonic keys send all writes to one shard.

intermediate1 min read

When a graph database beats relational or document stores

Deeply connected data, variable-depth traversals, fraud or recommendation paths, index-free adjacency.

intermediate1 min read

SQL isolation levels and the anomalies they prevent

Read Uncommitted allows dirty reads; Read Committed blocks them; Repeatable Read blocks non-repeatable reads; Serializable blocks phantoms.

intermediate1 min read

Zero-downtime schema migration on a hot table

Expand-migrate-contract phases, dual-write and backfill, decouple deploys from migrations.

intermediate1 min read

The analysis phase: tokenizers and token filters

Analysis turns raw text into index terms via a tokenizer that splits text into tokens then token filters that transform them, like lowercasing or stemming.

intermediate1 min read

Vector embeddings and vector databases

An embedding is a learned dense vector capturing semantic meaning, and vector DBs use ANN indexes like HNSW for fast similarity search that relational B-trees cannot provide.

intermediate1 min read

Cache-aside pattern pros and cons

App reads cache, on miss loads DB and populates, invalidates on write; pros are resilience and lean cache, cons are stale windows and app-managed invalidation.

intermediate1 min read

Exactly-once semantics in stream processing

Exactly-once means each event affects state once despite retries, it is hard because of failures between processing and committing, and you achieve it via idempotency or atomic…

intermediate1 min read

Clickstream architecture for real-time and batch

Ingest events into a log like Kafka, fan out to a real-time path for dashboards and a batch path to a lake for ad-hoc analysis.

intermediate1 min read

How Spanner achieves global external consistency

TrueTime gives bounded-uncertainty clocks via GPS and atomic sources, Spanner commit-waits out that uncertainty, and Paxos replicates each shard.

intermediate1 min read

Cache-aside pattern with Redis and RDS

App checks cache, on miss reads DB and populates, writes invalidate the key, and consistency is eventual.

intermediate1 min read

Near-zero-downtime database migration to cloud

Assess and provision, do a full load then continuous CDC replication with a tool like DMS, validate, then cut over with a rollback plan.

intermediate1 min read

Aurora Serverless v2 for spiky traffic

Serverless v2 autoscales capacity in fine-grained ACU steps near-instantly, you pay per-ACU-second, and provisioned is fixed cost regardless of load.

intermediate1 min read

Transaction isolation levels and their tradeoffs

Isolation levels control which concurrency anomalies (dirty/non-repeatable reads, phantoms) are allowed; higher levels mean stronger consistency but more blocking and less concurrency.

intermediate1 min read

Eager vs lazy loading in an ORM

Eager fetches related data up front (joins/extra query); lazy defers until accessed. Lazy in a loop causes the N+1 query problem.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles