tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

1086 bites

More in Backend Dev — page 12

Databases & Architecture76 sec read

Durable write path in a sharded KV store

WHAT IT TESTS: end-to-end durable write design. OUTLINE: route by key hash to the shard leader, append to WAL and fsync, replicate to two followers, ack on quorum, then confirm. RED FLAG: confirming the client before any durable persistence.

Databases & Architecture69 sec read

What is eventual consistency?

WHAT IT TESTS: consistency-model tradeoffs. OUTLINE: replicas converge to the same value if writes stop, allowing temporary staleness for higher availability and lower latency. RED FLAG: claiming it means data is wrong or never converges.

Databases & Architecture71 sec read

Leader-follower vs multi-leader replication

WHAT IT TESTS: replication topology tradeoffs. OUTLINE: single-writer leader-follower is simple but a write bottleneck; multi-leader accepts writes in many regions for latency and availability. RED FLAG: ignoring that multi-leader needs conflict resolution.

Databases & Architecture2 min read

Range-based vs hash-based sharding trade-offs?

WHAT IT TESTS: choosing a shard strategy by query pattern. OUTLINE: range sharding keeps ordered keys together, great for range scans but prone to hot spots on sequential keys; hash sharding spreads keys evenly, avoiding hot spots but killing efficient range…

Databases & Architecture2 min read

Apply the CAP theorem to a real system

WHAT IT TESTS: applying CAP to concrete systems. OUTLINE: define C, A, P; note partitions are unavoidable, so the real choice during one is consistency versus availability; then classify a system as CP or AP with reasoning.

Databases & Architecture2 min read

What is sharding and why shard over vertical scaling?

WHAT IT TESTS: horizontal partitioning rationale. OUTLINE: sharding splits one dataset across servers by a shard key so each holds a subset; you shard because vertical scaling hits hardware ceilings, gets costly, and remains a single point of failure.

Databases & Architecture85 sec read

What is database replication and why use it?

WHAT IT TESTS: basics of copying data across nodes. OUTLINE: replication keeps copies of data on multiple servers; primary benefits are high availability through failover and improved read scalability by spreading reads.

Databases & Architecture2 min read

What is an OLAP cube and its operations?

WHAT IT TESTS: multidimensional analysis concepts. OUTLINE: a cube pre-aggregates measures across dimensions; operations are slice, dice, drill-down, roll-up, and pivot.

Databases & Architecture2 min read

Why separate storage and compute in a cloud warehouse?

WHAT IT TESTS: understanding decoupled warehouse architecture. OUTLINE: data lives in cheap shared object storage while independent compute clusters scale separately, enabling elastic, concurrent, isolated workloads and pay-per-use.

Databases & Architecture2 min read

What is a Type 2 slowly changing dimension?

WHAT IT TESTS: preserving history in dimensional models. OUTLINE: an SCD handles dimension attributes that change over time; Type 2 inserts a new row per change with a surrogate key and validity dates, marking one current.

Databases & Architecture2 min read

How does columnar storage speed up analytics?

WHAT IT TESTS: physical storage layout versus query type. OUTLINE: columnar stores each column contiguously, so aggregations read only needed columns, scan far less data, and compress better with vectorized execution.

Databases & Architecture88 sec read

Star schema vs snowflake schema trade-offs?

WHAT IT TESTS: dimensional design trade-offs. OUTLINE: star keeps dimensions denormalized for fewer joins and faster simpler queries; snowflake normalizes dimensions into sub-tables saving space and easing maintenance but adding joins.

Databases & Architecture85 sec read

What is the difference between ETL and ELT?

WHAT IT TESTS: knowing where transformation runs in a pipeline. OUTLINE: ETL transforms before loading, on a separate engine; ELT loads raw then transforms inside a scalable warehouse. Choose ELT with cloud warehouses and large raw or schema-on-read data.

Databases & Architecture84 sec read

What is a star schema?

WHAT IT TESTS: dimensional modeling fundamentals. OUTLINE: a central fact table of measures and foreign keys surrounded by denormalized dimension tables of descriptive attributes, joined in one hop for fast, simple analytical queries.

Databases & Architecture80 sec read

What is the difference between OLTP and OLAP?

WHAT IT TESTS: understanding two opposite workload profiles. OUTLINE: OLTP handles many short read-write transactions on normalized current data; OLAP runs few large analytical scans over denormalized historical data.

Databases & Architecture87 sec read

What consistency do you sacrifice in an AP system?

WHAT IT TESTS: precise reasoning about consistency models and anomaly handling. OUTLINE: you give up linearizability and often sequential consistency, accepting stale reads and conflicts, then mitigate with quorums, vector clocks or CRDTs, and…

Databases & Architecture88 sec read

How do you keep consistency without multi-document transactions?

WHAT IT TESTS: maintaining integrity across services without distributed ACID. OUTLINE: a Saga runs a sequence of local transactions, each with a compensating action to undo on failure, coordinated via choreography or orchestration.

Databases & Architecture86 sec read

Why fit Cassandra to a high-read, high-write workload?

WHAT IT TESTS: mapping Cassandra's masterless architecture to throughput needs. OUTLINE: consistent-hash partitioning spreads load, replication and no single master give availability, log-structured writes are fast, tunable consistency balances per query.

Databases & Architecture81 sec read

What are eventual consistency and the BASE model?

WHAT IT TESTS: trading consistency for availability per feature. OUTLINE: eventual consistency means replicas converge given no new writes; BASE is Basically Available, Soft state, Eventually consistent.

Databases & Architecture86 sec read

Embed or reference likes in a document database?

WHAT IT TESTS: document modeling driven by access patterns and growth. OUTLINE: embedding is fast for small bounded lists but unbounded likes hit document size limits; referencing scales for high-cardinality, write-heavy likes.