Redis Interview Questions 2026
36 Redis interview questions from Swiggy, Zomato, Razorpay, PhonePe. All difficulty levels, all roles. Upvoted by engineers who were asked them.
Redis Questions by Company
Swiggy (6)
Design Swiggy's real-time order tracking system. A customer should see their delivery agent's location update every 5 seconds on a map. Cover: location ingestion from agents, WebSocket vs SSE for pushing updates to clients, data store choices, and how you scale to 100k concurrent orders during peak hours.
Design Swiggy's restaurant search and ranking system. How do you index 200k restaurants? Discuss full-text search (Elasticsearch), geospatial filtering, personalised ranking signals (past orders, ratings, delivery time), and how to refresh the index when a restaurant updates its menu.
Design Swiggy's delivery partner assignment algorithm. When an order is placed, how do you assign the optimal nearby delivery partner within 2 minutes considering distance, current load, and restaurant prep time?
Implement a rate limiter for Swiggy's API gateway using the token bucket algorithm. Handle 1000 requests/second per user. Code the solution and explain how you'd deploy it across multiple API servers with Redis.
Design Swiggy's notification system. When an order status changes (Confirmed, Picked Up, Arriving), send push notification, SMS, and in-app notification reliably with at-least-once delivery. Cover fan-out and handling inactive devices.
Design the data model for Swiggy's menu system. A restaurant has categories, items, add-ons, variants, and availability windows (breakfast/lunch/dinner). How do you model this in PostgreSQL and handle real-time menu updates?
Zomato (3)
Design Zomato's surge pricing engine. When demand spikes (rain, IPL final), delivery fees increase automatically. Cover: demand signals, pricing formula, fairness constraints, A/B testing pricing strategies, and how to avoid customer backlash.
Design Zomato's delivery time prediction system. Before placing an order, show "Delivers in 35 minutes". The estimate must account for restaurant preparation time, distance, traffic, and number of parallel orders the partner is handling.
Design Zomato Pro (subscription). Members get free delivery, discounts, and priority support. Cover: subscription lifecycle, prorated upgrades/downgrades, cohort-based analytics to measure retention, and how you handle payment failures.
Razorpay (3)
Design Razorpay's payment retry system. When a payment fails due to a transient error (bank timeout, network blip), how do you retry safely without double-charging the customer? Cover: idempotency keys, exponential backoff with jitter, dead-letter queues, and reconciliation with bank statements.
Design Razorpay's payout system (RazorpayX). Businesses send bulk payouts to thousands of vendor accounts simultaneously. Cover: batching, bank API rate limits, real-time status tracking, and failure handling.
Design Razorpay's dashboard for merchants. A merchant wants to see real-time revenue, transaction success rates, and refund trends. How do you aggregate millions of transactions into live charts with under 5-second latency?
PhonePe (5)
Design PhonePe's UPI transaction system to handle 1 billion transactions per day. Cover: request routing to the correct bank, NPCI integration, handling duplicate transactions, consistency vs availability trade-offs, and how you build a reliable audit trail for regulatory compliance.
Design PhonePe's switch - the internal routing layer that forwards UPI requests to the correct bank. It must be highly available (99.999%), handle 50k TPS, and complete each request within 30 seconds (NPCI timeout). Cover: circuit breakers, retries, and bank-specific timeouts.
Explain how PhonePe handles transaction deduplication. A user taps "Pay" twice due to network lag. The same debit must not happen twice. Walk through idempotency at the API level, database level, and bank integration level.
Design PhonePe's merchant settlement system. Thousands of merchants receive daily settlements of their collected payments minus fees. How do you compute net payables, batch into bank transfers, and provide a reconciliation report?
You use Redis to cache OTPs with a 5-minute TTL. How does Redis actually expire keys internally — does it scan the whole keyspace on a timer?
Paytm (2)
Design Paytm's wallet system that supports deposits, withdrawals, peer-to-peer transfers, and merchant payments. Ensure ACID properties for all transfers, discuss optimistic vs pessimistic locking, and explain how you handle a split-brain scenario where two nodes disagree on a wallet balance.
Design Paytm's cashback system. When a user completes a transaction, they may receive cashback based on complex rules (merchant, time, amount, user segment). The cashback is credited to their wallet. Cover: rule engine, deduplication, and fraud prevention.
Uber (5)
Design Uber's driver-rider matching system. How do you match the nearest available driver to a rider within 200ms at global scale? Cover: geospatial indexing (H3/S2), the dispatch algorithm, how you handle supply-demand imbalances, and what happens when a matched driver rejects the trip.
Design Uber's dynamic pricing (surge) system. When supply is low and demand is high in a geofenced zone, prices increase automatically. Explain the data pipeline, the pricing model, how you prevent oscillations (price going up → drivers rush in → price drops → drivers leave), and regulatory constraints.
Design Uber Eats' order batching system. A single delivery partner picks up orders from multiple nearby restaurants and delivers to multiple customers in one trip. How do you optimise the route and assignment?
Uber uses H3 hexagonal geospatial indexing. Explain why hexagons are better than squares or lat/lng grids for proximity searches. How do you find all drivers within 2km of a rider using H3 resolution levels?
You need to track the top 10 most active drivers by trip count, updated in real time. Which Redis data structure fits this, and why not just a plain hash with manual sorting?
Airbnb (2)
Design Airbnb's search and availability system. A guest searches for "Paris, 3 nights, 2 guests" and sees ranked listings. Cover: availability calendar storage, real-time inventory updates (when host blocks dates), geospatial search, ranking signals (price, reviews, Superhost status), and how you handle the thundering herd on popular dates.
Design Airbnb's review system. Guests and hosts review each other after a stay. Reviews are revealed simultaneously to prevent bias. Cover: the blind reveal mechanism, preventing fake reviews, and abuse detection.
Google (1)
Design Google Search autocomplete. As a user types "wea", suggest "weather", "weather today", "weather London". Cover: trie vs inverted index, personalisation, freshness, latency budget (<100ms), and how you handle offensive query suggestions.
Flipkart (2)
Design Flipkart's product search and ranking system. A user searches "wireless earphones under 2000". How do you retrieve, rank, and filter 10,000+ matching products in under 200ms?
Design a coupon/discount system for Flipkart Big Billion Days. The system must validate, apply, and prevent double-use of millions of coupons with high concurrency. Cover idempotency and distributed locking.
Meta (1)
Design Instagram Stories. A story disappears after 24 hours and is shown in a ring around profile pictures. Cover: upload pipeline, storage with TTL, efficient delivery to followers, and view count tracking at scale.
Oracle (1)
Design Oracle Cloud's IAM (Identity and Access Management) system. Thousands of customers, each with their own users, groups, and policies. How do you evaluate a permission check in under 10ms for every API call?
LinkedIn (2)
Design LinkedIn's feed. Each user sees posts from their connections, pages they follow, and sponsored content. Posts must be ranked by relevance. Cover: fan-out-on-write vs fan-out-on-read, feed generation for users with 30k connections, and freshness.
How does LinkedIn's "Who viewed your profile" feature work? What data is stored, how long is it retained, and how do you provide the feature to free users (last 5 viewers) vs Premium (full list) without exposing premium-only data?
Stripe (1)
Design a distributed rate limiter that works across 100 API servers. A user is allowed 1000 requests per minute.
LTIMindtree (1)
How would you reduce application load and downtime using caching strategies?
Grab (1)
How does Redis's GEO command family (GEOADD, GEORADIUS) let you find nearby drivers efficiently, and what data structure underlies it?
Practice these questions with AI feedback
Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.
Build my study plan →