System Design and Architecture Flashcards
7 cards from real CodeSignal Technical Assessment practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 System Design and Architecture flashcards as text
Which database isolation level prevents dirty reads but still allows non-repeatable reads?
Answer: Read Committed
Read Committed prevents reading uncommitted data but allows a second read in the same transaction to see changes committed by others since the first read.
A multi-region active-active deployment handles concurrent writes to the same record from two regions simultaneously. What core problem must the architecture resolve?
Answer: Write-write conflict resolution
When two regions write to the same record without coordination, a conflict resolution strategy such as last-write-wins or CRDTs must determine the final value.
You need to store 10 TB of rarely-accessed audit logs where only full-file retrieval is needed. Which storage class minimizes cost?
Answer: Object storage with cold/archive tier
Object storage archive tiers cost cents per GB-month for infrequently accessed data where retrieval latency of hours is acceptable.
In a CQRS architecture, what is the primary motivation for separating the read model from the write model?
Answer: To independently optimize read and write paths for their different access patterns
CQRS lets you scale and optimize reads (denormalized, cached, eventually consistent) separately from writes (normalized, transactional) without compromise.
A GraphQL API resolves a list of 100 posts and each post resolver independently queries the database for its author. What anti-pattern is this?
Answer: N+1 query problem
The N+1 problem occurs when fetching N items triggers N additional queries (one per item), which DataLoader solves by batching them into a single query.
Which technique allows a relational database to serve analytical queries on large tables without blocking OLTP operations?
Answer: Read replica with MVCC snapshot reads
MVCC on a read replica lets long-running analytical queries read a consistent snapshot without blocking transactional writes on the primary.
A load balancer must route users to the same backend server for the duration of their session. Which algorithm achieves this?
Answer: Sticky sessions (session affinity)
Sticky sessions use a cookie or IP hash to pin a client to a specific backend, ensuring session state stored locally on that server remains accessible.