10:00 am in India
It is 9:59 am. Kabir has two browser tabs open: the IRCTC Tatkal page for his mother’s ticket home, and the TiffinGo dashboard, where lunch orders are about to spike. At 10:00 both pages slow down. He books the ticket after a short wait in a queue, pays by UPI in two seconds, and opens the cricket stream on his phone during lunch, where crores of people are watching the same over.
Sir, our app struggles with a few thousand lunch orders a minute. How does UPI handle 80 crore payments a day? How does IRCTC survive Tatkal?
They use the same ideas you’ve learnt in this course, at a bigger size: partitioning, replication, queues, caches, streams and lakes. Today we’ll open up four Indian systems and see which ideas carry the weight.
Do we know exactly how they’re built inside?
Good question, Riya. Only partly. NPCI, IRCTC and the streaming and e-commerce companies publish some numbers and talks, but not their full designs. So we’ll be careful: published figures are marked with sources, and the rest is the standard pattern any engineer would use for that problem.
So I can learn to design for crores of users by studying these four?
Yes. And you’ll do the arithmetic yourself: turning “80 crore a day” into requests per second, peaks and terabytes is the first skill interviewers check.
Big data at Indian scale
Large-scale systems serve very high numbers of users and transactions with strict requirements on throughput, latency, availability and correctness. Designing them involves estimating load (average and peak requests per second, data volume), and applying distributed-systems techniques: horizontal scaling, partitioning, replication, caching, content delivery networks, asynchronous messaging, rate limiting and load shedding, together with streaming and batch data platforms that capture every event for monitoring, fraud detection, analytics and audit.
A system is at India scale when crores of people use it, often at the same moment. To survive, it spreads work over many machines, keeps copies, answers repeated questions from caches, makes people wait in fair queues during rushes, and records every action as data for later analysis.
Words you’ll meet in this lesson
Published figures used in this lesson
| UPI, September 2026 | 24.07 billion transactions worth ₹29.37 lakh crore; about 80.2 crore a day on average (August 2026 set the record at 24.51 billion) |
|---|---|
| IRCTC | peak of 37,410 tickets booked in one minute (16 Aug 2025); record 18.4 lakh tickets in a day (19 Aug 2025); about 89% of reserved tickets booked online |
| Live streaming | 5.9 crore peak concurrent viewers on Disney+ Hotstar for the 2023 ICC World Cup final, India vs Australia |
Sources are listed at the end of the Real-world use section. Internal designs of these systems are not fully public: the architecture shown here is the standard pattern for each problem, not a confirmed blueprint.
India-scale systems at three levels
Beginner What “India scale” means
- Many users at the same moment: Tatkal at 10 am, the last over of a final, midnight sale launches. The problem is the peak, not the daily average.
- Every request matters: a lost payment or a double-booked berth is a serious failure, so correctness is as important as speed.
- Huge variety of devices and networks: cheap phones, 2G to 5G, many languages. Systems must be light and tolerant of slow connections.
- All of it creates data: each payment, booking and video second becomes an event for fraud checks, dashboards, recommendations and reports.
Intermediate The patterns behind each system
- UPI: a central switch (NPCI) routes requests between payment apps and banks; it is an online transaction system that needs strong consistency for money, with streaming fraud checks beside it.
- IRCTC: a short, extreme peak; standard answers are waiting rooms, rate limits, caching of read-heavy pages (availability, fares), and a carefully protected seat-allocation core.
- Live streaming: video is cut into small segments and pushed through CDNs (servers close to viewers), with adaptive bitrate; event data streams into analytics for ads and quality.
- E-commerce sales: catalogue and search served from caches and search clusters, inventory and orders sharded and protected, clickstream into Kafka and a lakehouse for real-time dashboards and recommendations.
Advanced Design trade-offs at peak
- Peak-to-average ratio: design capacity for the peak (often several times the average) plus headroom; pre-scale for known events instead of relying only on autoscaling, which may react too slowly.
- Backpressure and load shedding: admit at a safe rate (queues, tokens), degrade gracefully (turn off recommendations before checkout), and fail fast instead of piling up timeouts.
- Consistency where it matters: money and seats need strong consistency and idempotency (a retried payment must not debit twice); counters, views and recommendations can be eventually consistent.
- Hot keys: one train, one match or one product can overload a single partition; caching, request coalescing and splitting hot keys spread the load.
- Data platform behind it: every event goes to streams (for fraud, live dashboards) and to the lake (for reconciliation, reports, ML), often under data-residency rules.
Exam tip: For a case study, give scale figures (with source and date), convert them to TPS at average and peak, then explain the techniques used: horizontal scaling, partitioning, replication, caching/CDN, queues and rate limiting, and how events flow to a streaming and batch analytics platform.
Payments, booking rushes, live streaming and sale days
Payments: UPI
Short, critical transactions between apps and banks via a central switch. Needs strong consistency, idempotency and fraud checks within the payment flow.
MoneyBooking rush: IRCTC
Huge spikes at fixed times (Tatkal opens at 10 am for AC classes and 11 am for non-AC). Limited inventory, so fairness and no double-booking matter.
SpikesLive streaming: cricket
Crores watch the same content at the same moment. Read-only, so CDNs and caching carry the load; the challenge is bandwidth and sudden joins.
BandwidthE-commerce sales
Midnight launches with huge browsing, cart and checkout traffic, limited stock of hot deals, and real-time dashboards for the business.
MixedWhich big data ideas carry each system
| System | Main challenge | Key techniques | Data platform behind it |
|---|---|---|---|
| UPI | Correct money movement at thousands of TPS, high availability | Central switch, partitioned and replicated transaction stores, idempotent request IDs, timeouts and reversals | Streaming fraud and risk scoring; daily settlement and reconciliation; regulatory reports |
| IRCTC | A very short, extreme peak on limited seats | Waiting room and rate limiting, cached availability and fares, protected seat-allocation core, captcha and bot controls | Booking and search logs for demand forecasting, fraud (bots, agents) and capacity planning |
| Live cricket | Crores of concurrent viewers joining in minutes | Segmented video, adaptive bitrate, multi-CDN, pre-scaling before key moments, graceful degradation | Playback events streamed for quality of experience and ads; concurrency dashboards |
| Sale day | Browsing, carts and checkout spike; hot products | Caching catalogue and search, sharded inventory and orders, queues for order processing, feature flags to switch off extras | Clickstream into Kafka and a lakehouse; live sales dashboards; recommendations and pricing |
Every one of these systems separates the critical path (pay, book, play, order) from everything else (analytics, recommendations, notifications). Under pressure, the extras are queued or switched off so the critical path survives.
From a headline number to a design
Start from a published number
Monthly or daily totals sound huge, but systems are designed in requests per second. 24 billion a month is about 9,300 per second on average.per_month = 24.07e9 per_day = per_month / 30 print(f"{per_day / 1e7:.1f} crore a day") print(f"{per_day / 86_400:,.0f} per second on average")80.2 crore a day 9,286 per second on averageEstimate the peak
Traffic is not flat: evenings, salary days, festivals and sale launches are much busier. Designers use a peak-to-average ratio from history and add headroom on top.avg_tps = 9_286 for ratio in [2, 3, 5]: print(f"peak x{ratio}: {avg_tps * ratio:,} TPS")peak x2: 18,572 TPS peak x3: 27,858 TPS peak x5: 46,430 TPSFind the critical path
For UPI: app → switch → payer bank → payee bank → confirmations. For IRCTC: search → availability → seat allocation → payment. Only these steps must succeed in real time.
Everything else (rewards, notifications, analytics) can be asynchronous through queues, so it never slows the critical path.Spread and protect the load
Partition data and traffic (by account, train, region), replicate for failures, cache what is read often, and put a queue or rate limiter in front of anything that can be overwhelmed.
These are the Module 3 ideas: scale out, shard, replicate, choose consistency per data type.Size the data platform
Each transaction creates events for fraud checks, dashboards and audit. Even small events add up to terabytes a year, before replication and logs.tps, bytes_per_event = 9_286, 1_000 gb_per_day = tps * 86_400 * bytes_per_event / 1e9 print(f"{gb_per_day:,.0f} GB of events a day, {gb_per_day * 365 / 1e3:,.0f} TB a year")802 GB of events a day, 293 TB a yearRehearse the big day
Load-test at the expected peak plus margin, pre-scale capacity before the event, prepare switches to turn off non-essential features, and watch live dashboards during the event.
Known peaks (Tatkal, a final, a sale) are planned like launches, with game days and runbooks, not left to chance.
One UPI payment: what Riya sees, and what happens behind
Step through the six frames. Left: Riya paying a tiffin shop. Right: a simplified view of the request moving through the UPI network.
- Riya scans the tiffin shop’s QR code and taps Pay for ₹120.
- She enters her UPI PIN.
- The app shows “Processing”.
- Still processing, under two seconds so far.
- Payment successful, with a reference number.
- The shop’s speaker announces the payment and her bank sends an SMS.
- Her UPI app creates a payment request with a unique transaction ID, so a network retry can never debit her twice.
- The request, with the PIN encrypted, goes to NPCI’s UPI switch, which routes it to Riya’s bank based on her UPI handle.
- Riya’s bank checks the PIN and balance and debits ₹120, then responds to the switch.
- The switch sends a credit request to the shop’s bank. If the credit fails or times out, the debit is reversed: money must never vanish.
- Confirmations go back to both sides. This is one of roughly 9,300 UPI payments in an average second in September 2026, and many more at peak.
- Every step is recorded. These events feed fraud and risk models, live monitoring, daily settlement between banks and dispute handling. (Simplified flow; real UPI has more checks and messages.)
Real-time scenarios: rush, retry and live stream
Three live scenarios: the Tatkal waiting room (real numbers from the program below), a payment retry at peak that must not debit twice, and an advanced look at serving crores of live cricket viewers.
Real-time scenario 1Tatkal at 10 am: a waiting room protects the booking system
These figures come from the program in “Run it on your PC” below: 30,000 users arrive in one minute, but the booking system admits only 250 per second. Watch the queue absorb the spike.
- Just before 10 am the booking system is ready. Load tests say it can safely handle about 250 users entering the booking flow per second (an illustrative number).
- At 10:00 thousands arrive every second. Instead of letting them all hit the servers (which would make everything time out), a waiting room queues them and admits 250 per second.
- After one minute 30,000 users have arrived. Half have been admitted; the rest see a progress message with their position.
- No new users arrive after the first minute, and the queue drains at a steady 250 per second.
- Everyone is admitted after 120 seconds. The median user waited 30 seconds and the unluckiest 60, while the booking servers never saw more than 250 users a second. A fair, predictable wait beats a crash.
A retry at peak must not debit twice
At peak, slow links and timeouts are normal. Watch how a unique transaction ID makes a retry safe, which is the core reason payment systems can scale out without losing money.
- It is a salary-day evening and traffic is far above average. A ₹500 request with transaction ID 7781 goes from the app through the switch to the bank.
- The bank debits ₹500, but its response is delayed by congestion somewhere on the path.
- The app (or switch) times out and retries the request, carrying the same transaction ID.
- The bank stores processed IDs; it recognises 7781 and returns the earlier result instead of debiting again.
- The user is charged exactly once. In real UPI, status-check and reversal flows plus daily reconciliation catch any remaining mismatch. Idempotency keys are a standard pattern in every payment system.
Crores join the same match in minutes
Live streaming is the opposite of payments: everyone reads the same data. The hard parts are bandwidth, sudden joins and keeping quality up. Watch the standard design at work.
- The live video is encoded into short segments (a few seconds each) at several qualities. Edge servers of content delivery networks cache segments close to viewers, so the origin serves each segment only a few times.
- Big moments are predictable, so capacity is reserved in advance across more than one CDN, instead of waiting for autoscaling to react.
- In the 2023 ICC World Cup final, Disney+ Hotstar reported a peak of 5.9 crore concurrent viewers. At even 2.5 Mbps each, that is roughly 148 Tbps of video (our program’s estimate), which only a wide CDN footprint can deliver.
- If one edge or network is overloaded, traffic is steered elsewhere and adaptive bitrate lowers quality instead of freezing. Non-essential features (comments, extra stats) can be switched off.
- Every player sends events (start, buffering, bitrate changes, ad views) into a streaming pipeline, powering live concurrency dashboards, quality alerts and ad billing, and later the lake for analysis.
Four systems, four lessons
1. UPI: correctness at thousands of TPS
A central switch connects hundreds of banks and many payment apps. Each payment is small but must be exactly-once in effect; streams of events feed fraud checks and settlement.
2. IRCTC: survive a fixed-time rush
Tatkal creates a predictable spike on limited seats. Waiting rooms, caching of availability, bot controls and a protected booking core keep it fair; IRCTC has announced upgrades for higher booking rates.
3. Live cricket: bandwidth and sudden joins
Segmented video and multi-CDN delivery serve crores of identical reads. Playback events stream into analytics for quality and ad billing.
4. Sale days: protect checkout
E-commerce sales (such as Flipkart’s Big Billion Days and Amazon’s Great Indian Festival) cache the catalogue, shard inventory and orders, queue order processing and switch off extras, while clickstream feeds live dashboards.
Sources for the figures
- UPI monthly volumes (August and September 2026): NPCI data as reported by StartupTalky, September 2026 and StartupTalky, August 2026.
- 5.9 crore concurrent viewers, 2023 World Cup final: exchange4media, November 2023.
- IRCTC peaks (37,410 tickets per minute; 18.4 lakh tickets in a day) and online share: Indian Railways figures as reported by IANS and Free Press Journal (2025–26); planned upgrade to over 1 lakh bookings a minute reported by Outlook Money, August 2026.
- Figures are as published; check the latest NPCI and IRCTC releases before quoting them.
Turn headline numbers into engineering numbers
A few published figures are converted into average transactions per second and a design peak. Then try the challenges: peak ratios, event volumes, waiting-room maths, CDN bandwidth and hot keys.
figures = { # (count, seconds it covers)
"UPI, Sep 2026 (month)": (24.07e9, 30 * 86_400),
"IRCTC record day": (18.4e5, 86_400),
"IRCTC peak minute": (37_410, 60),
}
PEAK_RATIO = 3 # assumption for daily or monthly averages
for name, (count, seconds) in figures.items():
tps = count / seconds
print(f"{name:22}: {tps:8,.0f} per second")
print(f"UPI design peak at x{PEAK_RATIO}: {24.07e9 / (30 * 86_400) * PEAK_RATIO:,.0f} TPS")tps = count / secondsEvery design starts here: divide a total by the seconds it covers.PEAK_RATIO = 3 # assumption for daily or monthly averagesAverages hide peaks. A peak minute is already a peak, so the ratio is applied only to long averages.
Run it on your PC: India-scale load and a Tatkal waiting room
This program converts published UPI, IRCTC and live-streaming figures into per-second load and bandwidth, then simulates a virtual waiting room: 30,000 users arrive in one minute and are admitted at 250 per second. Change the arrival count or admit rate and run it again. Save it as indian_scale.py.
From headlines to TPS, and a waiting room
"""India-scale numbers turned into per-second rates, and a Tatkal-style
virtual waiting room that admits users at a safe rate."""
import random
published = {
# figure, unit, source (see the lesson's Sources list)
"UPI, September 2026": (24.07e9, "transactions in the month"),
"IRCTC, peak minute (16 Aug 2025)": (37_410, "tickets in one minute"),
"Live cricket, 2023 World Cup final": (5.9e7, "concurrent viewers"),
}
upi_per_s = 24.07e9 / (30 * 86_400)
irctc_per_s = 37_410 / 60
viewers = 5.9e7
bitrate_mbps = 2.5 # assumption: an average mobile stream
print(f"UPI average : {upi_per_s:,.0f} transactions per second")
print(f"IRCTC peak : {irctc_per_s:,.0f} tickets per second")
print(f"Live final, bandwidth : {viewers * bitrate_mbps / 1e6:,.0f} Tbps if every viewer streams {bitrate_mbps} Mbps")
# ---- a virtual waiting room for a 10:00 am rush
random.seed(3)
arrivals = sorted(random.uniform(0, 60) for _ in range(30_000)) # 30,000 users in the first minute
ADMIT_PER_SECOND = 250 # what the booking system can safely take
admitted_at = []
next_slot = 0.0
for t in arrivals:
start = max(t, next_slot)
admitted_at.append(start)
next_slot = start + 1 / ADMIT_PER_SECOND
waits = [a - t for a, t in zip(admitted_at, arrivals)]
print(f"\nWaiting room: {len(arrivals):,} users arrive in 60 s, admitted at {ADMIT_PER_SECOND}/s")
print(f" last user admitted after {admitted_at[-1]:.0f} s")
print(f" median wait {sorted(waits)[len(waits) // 2]:.0f} s, worst wait {max(waits):.0f} s")
print(" the booking servers never see more than 250 users per second")
# In a terminal: python indian_scale.pyRecorded from a real run with Python 3.13. The figures are published numbers (see Sources); the 2.5 Mbps bitrate and the 250-per-second admit rate are assumptions for illustration, not IRCTC or Hotstar settings.
Admitting a rush, one user at a time
Five users arrive almost together; the system admits one every 2 seconds. Watch each user’s admit time and wait being calculated.
Worked examples: real problems, solved and traced in memory
Four estimation and design calculations from India-scale systems. Each runs live and is traced.
Per-second load from a daily figure
Problem statement
IRCTC’s record day was 18.4 lakh tickets. Find the average tickets per second, and compare it with the record minute of 37,410 tickets.
18.4 lakh per day · 37,410 per minute
average 21/s, peak 624/s, ratio 29x
Approach
- Average per second = daily total ÷ 86,400.
- Peak per second = peak minute ÷ 60.
- Ratio = peak ÷ average.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
How many servers for the UPI peak?
Problem statement
Average UPI load is about 9,300 TPS. Design for 4× peak and keep 30% headroom. Each application server safely handles 800 TPS. How many servers, and how many with one full data centre out (two equal sites)?
9,300 TPS, 4× peak, 30% headroom, 800 TPS/server, 2 sites
design load 48,360 TPS -> 61 servers survive one site down -> 61 per site, 122 in total
Approach
- Design load = average × peak ratio × (1 + headroom).
- Servers = load ÷ per-server capacity, rounded up.
- If one of two sites can fail, each site must carry the full load.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Count the double debits that idempotency prevents
Problem statement
A log of payment requests includes retries with the same transaction ID. Count the unique payments, the retries, and the amount that would have been wrongly debited without idempotency.
(txn_id, amount) pairs
3 payments, 3 retries, Rs 1120 not double-debited
Approach
- Track IDs already processed in a set.
- A repeated ID is a retry: count it and its amount.
- Unique IDs are the real payments.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Plan CDN capacity for a final
Problem statement
Expect 6 crore concurrent viewers. Viewers watch at 0.8, 1.5, 2.5 or 4 Mbps in shares 20%, 35%, 35%, 10%. Each CDN provider can deliver up to 60 Tbps for this event. How many providers are needed with 25% spare, and what share of viewers is lost if one provider fails?
6 crore viewers, bitrate mix, 60 Tbps per CDN, 25% spare
avg 1.96 Mbps, peak 118 Tbps, CDNs needed 3 one CDN down: 120 Tbps, covers 100% at full quality
Approach
- Average bitrate = Σ share × bitrate.
- Peak Tbps = viewers × average bitrate.
- Providers = ceil(peak × 1.25 ÷ 60); a failure removes 60 Tbps.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Check yourself
Quick revision
Lesson 4.7 in one screen
- Design in per-second units: total ÷ seconds. UPI ≈ 24 billion/month ≈ 9,300 TPS average (Sep 2026).
- Plan for the peak (peak-to-average ratio) plus headroom; pre-scale for known events.
- Separate the critical path (pay, book, play, order) from extras; queue or switch off extras under load.
- Waiting rooms and rate limits turn overload into fair waits.
- Payments: strong consistency, idempotency keys, reversals and daily reconciliation.
- Live streaming: segments + adaptive bitrate + multi-CDN; 5.9 crore concurrent peak (2023 final).
- Hot keys break even partitioning; every event also feeds streams and the lake for fraud, dashboards and audit.
Interview and viva questions
How does UPI handle so many transactions?
UPI connects payment apps and banks through NPCI’s central switch, which routes each request to the right banks. Scale comes from horizontally scaled, replicated systems at NPCI and at banks, short and well-defined messages, unique transaction IDs that make retries safe, timeouts with reversal flows, and daily settlement and reconciliation. Detailed internal designs are not fully public.
Why does the IRCTC site slow down at Tatkal time?
Tatkal booking opens at fixed times (10 am for AC classes, 11 am for non-AC), so a very large number of users arrive within seconds for limited seats. The peak is many times the daily average. Systems handle it with queues or waiting rooms, rate limits, caching of availability and fares, bot controls and capacity upgrades; IRCTC has announced plans to handle over one lakh bookings a minute.
How do streaming apps handle crores of concurrent viewers?
Video is encoded into short segments at multiple bitrates and delivered through content delivery networks with servers close to viewers, often several CDNs at once. Capacity is reserved before big events, players adapt quality to network conditions, and non-essential features can be switched off. Player events stream into analytics for quality monitoring and ad delivery.
What is idempotency and why is it important in payments?
An operation is idempotent if doing it more than once has the same effect as doing it once. In payments, each request carries a unique ID; if a timeout causes a retry, the server recognises the ID and returns the original result rather than debiting again. It makes retries, which are unavoidable in distributed systems, safe.
How do you estimate load in a system design interview?
Start from users or a published total, convert to per-second averages (divide by 86,400 for a day), apply a peak-to-average ratio from experience or history, add headroom, and estimate data size per request and per day. State every assumption clearly and round sensibly; interviewers care more about the reasoning than exact numbers.
Practice problems
Estimation and design problems based on Indian systems. The last two are business tasks.
Daily to per second
A system handles 50 crore requests a day. Print the average requests per second.
50 crore/day
5787
Show solution and explanation
print(round(50e7 / 86_400))How it works: Divide by 86,400 seconds in a day.
Peak minute to per second
37,410 tickets were booked in one minute. Print tickets per second.
37,410/min
624
Show solution and explanation
print(round(37_410 / 60))How it works: A peak minute already reflects peak load; just divide by 60.
Crore to number
Print 5.9 crore as a plain number with commas.
5.9 crore
59,000,000
Show solution and explanation
print(f"{int(5.9e7):,}")How it works: 1 crore = 10 million, so 5.9 crore = 59 million.
Design peak
Average is 12,000 TPS. Design for 4× peak with 25% headroom. Print the design TPS.
12,000, 4×, 25%
60000
Show solution and explanation
print(int(12_000 * 4 * 1.25))How it works: Peak ratio first, then headroom on top.
Queue clear time
45,000 users arrive in 60 s; 300 are admitted per second. Print when the queue empties.
45,000, 60 s, 300/s
150.0 seconds
Show solution and explanation
print(max(60, 45_000 / 300), "seconds")How it works: The queue cannot clear before the last arrival, nor faster than the admit rate allows.
Event storage
9,300 TPS, 8 events per transaction, 1.2 KB each, 3 replicas. Print TB per day.
as given
23.1 TB/day
Show solution and explanation
print(round(9_300 * 86_400 * 8 * 1.2e3 * 3 / 1e12, 1), "TB/day")How it works: Rate × seconds × events × size × copies.
Remove duplicate retries
Given IDs ["t1","t2","t1","t3","t2"], print the unique IDs in first-seen order.
list of IDs
['t1', 't2', 't3']
Show solution and explanation
ids = ["t1", "t2", "t1", "t3", "t2"]
print(list(dict.fromkeys(ids)))How it works: dict.fromkeys keeps first occurrences in order; this is deduplication by ID.
Sale-day capacity
Last year’s sale peaked at 1.8 lakh orders per minute. Growth is 35%. Plan with 30% headroom. Print orders per second to design for.
1.8 lakh/min, +35%, +30%
5265
Show solution and explanation
print(round(1.8e5 * 1.35 * 1.3 / 60))How it works: Grow last year’s peak, add headroom, convert to per second.
Cost of downtime
A platform processes Rs 29.37 lakh crore a month. Print the average value flowing per minute in crore.
Rs 29.37 lakh crore/month
Rs 68 crore per minute
Show solution and explanation
per_min = 29.37e12 / (30 * 24 * 60)
print(f"Rs {per_min / 1e7:,.0f} crore per minute")How it works: This is why payment systems invest heavily in availability.
Real-world scenario questions (asked in company interviews)
Questions about India-scale systems from interviews and real projects. Decide your answer first, then open the model answer.
“Estimate the load on UPI”
An interviewer says: UPI handles about 24 billion transactions a month. Estimate average and peak TPS and daily event data.
The interviewer is checking: can you turn a headline number into engineering numbers, stating assumptions?
Show a strong answer
- Per day: 24 billion ÷ 30 ≈ 80 crore.
- Average TPS: 80 crore ÷ 86,400 ≈ 9,300.
- Peak: assume 3–5× average at busy hours and festivals → roughly 30,000–45,000 TPS to design for, plus headroom.
- Events: if each transaction produces ~10 events of ~1 KB across systems, that is ~8 TB a day before replication.
- State assumptions clearly and say how you would validate them (published peak figures, traffic history).
Avoid: giving one number with no assumptions, or designing only for the average.
Design for Tatkal-style rush hour
Your company runs a ticket sale that opens at a fixed time; last year the site crashed in the first minute.
The interviewer is checking: do you know how to protect a system from a predictable spike?
Show a strong answer
- Estimate peak arrivals from last year and load-test above that.
- Put a virtual waiting room and rate limits in front of the booking flow.
- Cache read-heavy pages (availability, fares) and serve static content from a CDN.
- Pre-scale capacity before opening time; don’t rely only on autoscaling.
- Protect inventory with strong consistency and short seat holds; stop bots with captcha and limits.
- Prepare switches to turn off non-essential features; watch live dashboards.
Avoid: just adding more servers to the database.
A customer was charged twice
During a peak, a few customers were debited twice for one order after network timeouts.
The interviewer is checking: do you understand idempotency and reconciliation?
Show a strong answer
Retries after a timeout re-sent the payment as a new request. Fix: generate an idempotency key (unique transaction ID) on the client, send it with every retry, and store processed keys on the server so a repeat returns the original result. Add a status-check call before retrying, automatic reversal for failed flows, and a daily reconciliation job comparing your records with the bank or gateway settlement files to catch and refund mismatches.
Avoid: removing retries entirely, which turns network blips into failed payments.
“How does Hotstar handle crores of live viewers?”
A common case-study question for data and platform roles.
The interviewer is checking: can you explain the standard pattern honestly, without claiming insider knowledge?
Show a strong answer
Explain that internal details are only partly public, then describe the standard design: video encoded into short segments at multiple bitrates (adaptive streaming), cached and delivered by multiple CDNs close to viewers, origin protected by caching, capacity pre-provisioned before big matches, graceful degradation (lower bitrate, switch off extras) and player events streamed into analytics for concurrency, quality and ad billing. Quote a published figure with source, such as the 5.9 crore concurrent peak in the 2023 World Cup final.
Avoid: inventing exact server counts or claiming to know their internal architecture.