Databases and caching
293 practice items · needed by 14 roles
Easy 65Medium 119Hard 109
Practice questions
- no-cache versus no-storeeasy
- What a 304 response meanseasy
- Unit of max-ageeasy
- Main benefit of a CDNeasy
- What Vary doeseasy
- Page not restored on Backmedium
- stale-while-revalidatemedium
- Caching the HTML pagemedium
- Origin load from hit ratiomedium
- Low CDN hit ratiomedium
- Changing a file at the same URLmedium
- Polling an API that rarely changesmedium
- Serving AVIF from one URLmedium
- Old version after deploy with a service workerhard
- High TTFB only in the Gulfhard
- No Cache-Control headerhard
- User data cached at the CDNhard
- Vary: User-Agent at the CDNhard
- Version in a query stringhard
- Origin outage resiliencehard
- Many edges hitting the originhard
- Redis TTL after SET with EXeasy
- Embed or reference in MongoDBeasy
- Building SQL from user inputeasy
- What atomicity guaranteeseasy
- WHERE column = NULL finds nothingeasy
- COUNT(*) versus COUNT(column)easy
- Column type for priceseasy
- Storing order times for two countrieseasy
- Students and courses table designeasy
- What a foreign key doeseasy
- Rows come back in a new ordereasy
- Search with a leading wildcardeasy
- Deleting a customer with ON DELETE CASCADEeasy
- Missing numbers in order idseasy
- Where to keep product photoseasy
- Inserts fail at 2.1 billioneasy
- Checking if any rows existeasy
- What is inside a MongoDB ObjectIdeasy
- MongoDB's maximum document sizeeasy
- Updating a counter in MongoDBeasy
- Fields vanish after an updateeasy
- Counting API calls in Rediseasy
- KEYS * freezes production Rediseasy
- Storing a user profile in Rediseasy
- What TTL returns for a keyeasy
- Naming Redis keyseasy
- Cache empty after a Redis restarteasy
- Deleting old sessions in MongoDBeasy
- Finding products by tageasy
- Missed Redis pub/sub messageseasy
- Create the document if it is missingeasy
- A simple job queue in Rediseasy
- What a 92% cache hit ratio meanseasy
- Which key an LRU cache evictseasy
- Why cache entries have a TTLeasy
- Arabic text shown to English userseasy
- What a write-through cache doeseasy
- Slow responses after a cache restarteasy
- An address changed in one place onlyeasy
- RPO versus RTOeasy
- Backups that nobody has restoredeasy
- Database busy with report querieseasy
- SQLite says 'database is locked'easy
- Redis Pub/Sub for jobseasy
- Serving images to far-away userseasy
- The cache-aside patterneasy
- Scaling a read-heavy databaseeasy
- Cost of adding indexeseasy
- A live game leaderboardeasy
- The N+1 query problemmedium
- Cache-aside patternmedium
- Response to a matching If-None-Matchmedium
- Redis structure for a leaderboardmedium
- Keeping a cached price freshmedium
- CDN serves one user's profile to anothermedium
- What a dirty read ismedium
- The same row read twice gives two valuesmedium
- PostgreSQL's default isolation levelmedium
- MySQL InnoDB's default isolation levelmedium
- FOR UPDATE that locks nothing usefulmedium
- Several workers taking jobs from a tablemedium
- Page view counter loses countsmedium
- Insert or update in one statementmedium
- Two accounts with one emailmedium
- Case-insensitive lookup ignores the indexmedium
- Phone lookup does a full table scanmedium
- A query answered from the index alonemedium
- Indexing only the pending ordersmedium
- Index on a true/false columnmedium
- Deleting a customer takes minutesmedium
- Pool runs dry after some errorsmedium
- A list page loads huge rowsmedium
- One query escapes the transactionmedium
- Importing 100,000 rows slowlymedium
- Rows skipped with created_at cursorsmedium
- findOneAndUpdate returns the old valuemedium
- Speeding up read-only Mongoose queriesmedium
- A new field is never savedmedium
- Ordering fields in a MongoDB indexmedium
- A slow aggregation pipelinemedium
- A chat document keeps growingmedium
- Reads from secondaries miss new datamedium
- A confirmed write disappears after failovermedium
- Case-insensitive unique emails in MongoDBmedium
- Logging in with an operator as passwordmedium
- Heavy $lookup on every pagemedium
- Rate limit key that never expiresmedium
- Redis cache errors when memory is fullmedium
- 500 Redis calls per requestmedium
- A Redis transaction does not roll backmedium
- Cached keys stop expiringmedium
- Counting daily unique visitorsmedium
- Durable events with Redismedium
- Releasing a Redis lock safelymedium
- One huge key slows Redismedium
- Average read time with a 90% hit ratiomedium
- Thousands of keys expiring togethermedium
- Requests for ids that do not existmedium
- Updating or deleting the cache on writemedium
- Different prices on different serversmedium
- Serving slightly old data while refreshingmedium
- Dates break after cachingmedium
- A memoised function eats memorymedium
- Clearing all catalogue cache keys at oncemedium
- The risk of a write-behind cachemedium
- Copying the author name into postsmedium
- Querying inside a JSONB columnmedium
- Searching article text with LIKEmedium
- Committed orders missing after failovermedium
- A dashboard shows yesterday's totalsmedium
- Why databases index with B-treesmedium
- In-memory Map cache across many serversmedium
- App keeps failing after failovermedium
- Serving stale data during an outagemedium
- Replicas do not protect from bad deletesmedium
- Rollback breaks after a migrationmedium
- Write-through caching trade-offmedium
- Average latency with a cachemedium
- Stale data from a read replicamedium
- Paging through a huge feedmedium
- What a Bloom filter answersmedium
- A like counter on a viral postmedium
- Cache stampede on a hot keyhard
- Connection pools and autoscalinghard
- Profile shows old data after savinghard
- Adding a fifth cache nodehard
- Sharding orders by creation datehard
- Stale value returns after cache deletehard
- Trusting a Bloom filter answerhard
- Inserts slow down with UUID keyshard
- Pool exhausted during paymentshard
- Range updates mixed with range querieshard
- Removed admin can still delete usershard
- A transaction spread across connectionshard
- Features that break behind PgBouncerhard
- Errors under Serializable isolationhard
- Deadlocks in money transfershard
- Both doctors go off callhard
- Tables grow though rows are deletedhard
- Adding an index without blocking writeshard
- Which new column rewrites the tablehard
- Backfilling a new column on a big tablehard
- Migrations run on every pod starthard
- Order saved but event never senthard
- A queue message applied twicehard
- One counter row slows every salehard
- Two admins edit the same producthard
- A bad query takes the database downhard
- Two workers both think they hold the lockhard
- CROSSSLOT errors after moving to Clusterhard
- Eviction policy set, but writes still failhard
- Jobs lost when workers crashhard
- Transactions fail on a local MongoDBhard
- One write escapes a MongoDB transactionhard
- Billions of tiny sensor documentshard
- Some orders never match a queryhard
- One Redis key gets half of all traffichard
- How much data AOF everysec can losehard
- Keeping wallet balances only in Redishard
- Keeping only the last 50 notificationshard
- All inserts land on one shardhard
- Two payment retries run at oncehard
- A Lua script stalls every clienthard
- Sharding by tenant with one giant tenanthard
- A report across all shardshard
- Search shows deleted productshard
- Deleting old log rows every nighthard
- Two kinds of database timeouthard
- The connection dropped during COMMIThard
- New code crashes on old cache entrieshard
- A join across two services' databaseshard
- A query with 20,000 ids in IN (...)hard
- Emoji in reviews fail to savehard
- 'José' blocked because 'Jose' existshard
- BFS over a graph stored in SQLhard
- Detecting a database deadlockhard
- Same request, two cache entrieshard
- One key overloading a cache shardhard
- Designing an O(1) LFU cachehard
- Hash index vs B-tree indexhard
- The cache becomes criticalhard
- Queries keep running after the client quitshard
- Errors cached at the edgehard
- Reliable job queue on Redis listshard
- Requests for keys that do not existhard
- Risk of a write-back cachehard
- Random UUIDs as primary keyshard
- Designing a wallet ledgerhard
- Throttling on one partition keyhard
- What an index costseasy
- Revalidating a page every houreasy
- Default caching of fetcheasy
- What use cache doeseasy
- Caching one fetch for 10 minuteseasy
- The N+1 query problemmedium
- Offset vs cursor paginationmedium
- Renaming a column safelymedium
- Caching hashed static filesmedium
- Old title after savingmedium
- Moving credits between accountsmedium
- Composite index column ordermedium
- Rate limiter that does not limitmedium
- Serving private invoice PDFsmedium
- GraphQL author lookupsmedium
- Revalidating by tagmedium
- First visitor after revalidate timemedium
- Setting how long use cache lastsmedium
- Tagging cached datamedium
- Two different revalidate timesmedium
- Two buyers, one item lefthard
- Keeping a cache in synchard
- Too many database connectionshard
- Saved profile shows old datahard
- Cache expiry takes down the databasehard
- Payment call inside a transactionhard
- Reading cookies inside use cachehard
- Seeing your own edit at oncehard
- Cached data shown to the wrong userhard
- Build error with Cache Componentshard
- Prebuilt plus fresh pageshard
- Returning to a dynamic listhard
- Replacing unstable_cachehard
- Revalidating a dynamic routehard
- CDN caches an attacker's script URLhard
- Profile cached as a .css filehard
- Showing data instantly on openmedium
- Looping over a mappingeasy
- Removing an item from an arraymedium
- Buffering UART datamedium
- Ring buffer index with a maskmedium
- A lock-free ISR ring bufferhard
- Migrations run by every replicahard
- What kind of database DynamoDB iseasy
- Reporting queries slow the main databasemedium
- Choosing a DynamoDB partition keymedium
- Query vs Scan in DynamoDBmedium
- Capacity mode for unpredictable trafficmedium
- Looking up orders by statusmedium
- How Aurora differs from standard RDSmedium
- Cosmos DB consistency levelsmedium
- Expiring old session items automaticallymedium
- Who is responsible on a managed database?hard
- Storing big documents in DynamoDBhard
- Two users book the same seathard
- Estimating Cosmos DB throughputhard
- A new item missing from the indexhard
- Timeouts with a healthy databasemedium
- A hot cache key expireshard
- Rollback blocked by a schema changehard
- COLLSCAN in a MongoDB planeasy
- Order of fields in a MongoDB indexeasy
- Writes lost after Redis failovermedium
- MongoDB covered querymedium
- Cache shows a rolled-back pricemedium
- Semantic cache gives wrong answersmedium
- Same question asked againeasy
- SageMaker Pipelines step cachemedium
- Reusing a shared system promptmedium
- Prefix cache hit rate is lowmedium
- Building a step cache keyhard
- Downstream steps never cachehard
- Savings from cached prompt tokenshard
- Row store or column storeeasy
- A 304 responsemedium
- Finding the slow SQLmedium
- Too many pods for the databasemedium
- High iowait during the testhard
- Spikes every ten minuteshard
- Fast in staging, slow in productionhard
- One page, 101 querieshard
- Stale data under heavy writeshard
- Soak test slows with flat CPU and memoryhard