NoSQL and Redis interview questions
100 Backend Engineering practice questions. Read what a strong answer covers, then practise it out loud against the clock.
Practise NoSQL and Redis questionsBeginner
- Atomic counters in Redis
- Can Redis lose data?
- Cassandra basics for backend developers
- Consistency in NoSQL databases
- Designing a MongoDB schema for a blog
- DynamoDB basics
- DynamoDB throttling errors
- Embedding vs referencing in MongoDB
- Expiry in Redis
- Feature flags in Redis
- Finding nearby stores with Redis
- Implementing cache-aside with Redis
- Managing Redis memory
- Modelling a simple DynamoDB table
- Modelling chat messages in Cassandra
- MongoDB basics
- Naming Redis keys
- Partition key and sort key in DynamoDB
- Query-first data modelling
- Redis data structures
- Redis pub/sub
- Redis replication and clustering
- Schema changes in schemaless databases
- Simple queues with Redis lists
- Simple rate limiter with Redis
- Slow MongoDB queries
- Sorted sets for leaderboards
- Storing one-time passwords
- Storing sessions in Redis
- Storing shopping carts in Redis
- What happens when the cache is down?
- What Redis is used for in backends
- What to cache in Redis
- When to choose a NoSQL database
Intermediate
- Atomic operations in document stores
- Atomic updates across DynamoDB items
- Cache stampede on a hot key
- Cassandra consistency levels
- Cassandra reads slow after many deletes
- Choosing a MongoDB shard key
- Choosing a Redis eviction policy
- Cost of secondary indexes in NoSQL
- Distributed locks with Redis
- DynamoDB hot partition on a date key
- DynamoDB Streams
- GSI vs LSI in DynamoDB
- HyperLogLog for unique counts
- Jobs lost from a Redis list queue
- Leaderboard with ties and time-based tie-breaking
- Migrating data from MongoDB to Postgres
- MongoDB aggregation pipeline
- MongoDB document keeps growing
- Multi-key commands fail in Redis Cluster
- New query pattern in DynamoDB
- Reacting when keys expire
- Redis bitmaps
- Redis client connection management
- Redis memory usage suddenly jumps
- Redis pipelining
- Redis Streams
- Redis transactions and Lua scripts
- Sessions lost after Redis restart
- Single-table design in DynamoDB
- Stale reads from MongoDB secondaries
- Supporting a new query in Cassandra
- The problem with big keys in Redis
- Transactions in MongoDB
Experienced
- AOF fsync policies
- Backing up NoSQL databases
- Cache and database diverge after failures
- Cassandra compaction strategies
- Changing a DynamoDB key design
- Choosing between DynamoDB, MongoDB and Cassandra
- Controlling DynamoDB costs
- Deleting a huge Redis key froze the server
- Diagnosing Redis latency spikes
- Elasticsearch as a secondary data store
- Graph databases in backend systems
- Hot partition in Cassandra
- How DynamoDB partitions and adaptive capacity work
- Idempotent writes in DynamoDB
- Keeping denormalised copies consistent in NoSQL
- KEYS command in production
- Mixed document versions in MongoDB
- MongoDB working set exceeds memory
- MongoDB write and read concerns
- Monitoring Redis in production
- Moving from single Redis to Redis Cluster
- Multi-region NoSQL replication
- One tenant floods a shared Redis
- Paginating DynamoDB queries
- Pitfalls of Lua scripts in Redis
- Reacting to changes with MongoDB change streams
- Redis failover loses recent writes
- Scaling Redis pub/sub for WebSocket servers
- Securing a Redis instance
- Sliding window rate limiter in Redis
- The Redlock debate
- Time-series data in DynamoDB
- Using lightweight transactions in Cassandra