We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design and AI Engineering, by Roni Das. 984 interactive lessons.
Start LearningSystem design interview guide
Short answer
Policybazaar system design centres on the quote fan-out. A customer's details become one standard request. A quote service sends it to every insurer at once, through one adapter per insurer. Insurers with rate tables are priced locally. Live APIs get a time limit for the whole page, about 2 seconds, and results stream in as they arrive. Late answers are cached for the next customer. Buying is a separate state machine: proposal, payment, then the insurer issues the policy, or the customer is refunded. Health data sits in an encrypted vault, and a scheduler handles yearly renewals.
in this guide
8 parts open to everyone · 3 with a free account · 3 with the course
You can read 8 of 14 parts. A free account opens the deep dive; the course opens all of it.
It looks like a shop, but the prices are not yours. Each price lives in another company's system, behind its own API, with its own speed and failures. That makes it a good test of calls to many partners at once. Can you set a time limit, show partial results and survive a partner that is down? It also tests money and paperwork across companies. A payment can succeed while the policy still fails to be issued. And it tests care with personal health data.
This page is the free part.
₹1,111 in India$25 everywhere elseonce, for the whole course
The System Design course covers the Policybazaar design across a run of lessons, not one page. These 4 alone are about 118 minutes of step-by-step reading, 1 of them with code you run in the browser, all with a quiz.
Always clarify these in the first 5 minutes of the interview. Do not start drawing boxes until both lists are agreed.
This guide is built on these 6 lessons. Each one teaches one piece of the Policybazaar design above, step by step.
Lifetime access for ₹1,111 in India or $25 elsewhere. Interactive diagrams, quizzes, and 20 capstone projects to practise on.
This one question is not enough for the interview.
Each question has why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and a diagram (268 diagrams in all). A PDF you keep, junior to staff level.
Two courses by the author of this page:
770 lessons · 18 free to read
₹1,111 in India · $25 elsewhere, once
Get System DesignYou own this course
214 lessons · 10 free to read
₹1,333 in India · $35 elsewhere, once
Get Generative AI and Agentic AIYou own this course
Save your progress and get the interview checklist PDF
Policybazaar lets people compare insurance from many insurers and buy it in one place. Its parent, PB Fintech, reported Rs 8,372 crore of insurance premium in April to June 2026. That was 41% more than a year earlier. It also reported 15.9 crore registered users, 2.8 crore paying customers, and 7.2 crore policies sold since it started. The design problem behind one quote page is simple to say. Ask about 20 insurers for a price at the same moment. Some answer in 200 milliseconds. One takes 8 seconds. The customer should not wait for the slowest one.
Policybazaar is an insurance marketplace in India. Since June 2021 it has held an insurance broking licence from the regulator, IRDAI. A customer enters details like age, city and the cover they want. The site asks many insurers for a price and shows the plans side by side. Then the customer picks one, fills a proposal form, pays, and gets a policy. Every year, the policy comes up for renewal. Three parts are hard. First, the quote fan-out: many slow outside systems, each with its own rules, must answer within a few seconds. Second, buying is a hand-off. The payment is taken by one system and the policy is issued by another company, the insurer. Third, the data is sensitive. Health details and ID numbers need strong protection.
Where it shows up
A natural question for fintech, insurtech and marketplace roles in India. Think of Policybazaar, Paisabazaar, Acko, Digit, Ditto and InsuranceDekho. The general forms are: design an insurance comparison site, or a price aggregator. Another is a system that calls many slow partner APIs.
Spec sheetPolicybazaar
worked through below, with the maths
The hard parts of this design are taught step by step in the System Design course: Scatter-Gather, Timeout Patterns and Circuit Breaker for Resilience.
Broadcast a request to many services, collect their responses, and pick the best one.
Set appropriate timeouts for every external call, deadline propagation and timeout budgets.
Stop calling failing services to prevent cascade failures, open, closed, and half-open states.
Long-lived transactions without distributed locking, orchestration vs choreography for microservices.
all part of
System Design Masterclass
770 lessons · about 287 hours · 18 free to read
₹1,111in India, by UPI
$25everywhere else, by PayPal
You own this course
Continue with Scatter-Gatherpay once,
yours for life
Live from the course bench
Real interview questions, live diagrams and measured lab results, pulled at random from the lessons. A new set every time you come back.
Show your math. Pulling numbers from thin air signals you have not thought about the load.
Premium per quarter
Rs 8,372 crore (Q1 FY27)
PB Fintech reported Rs 8,372 crore of total insurance premium for April to June 2026, up 41%. Dividing by 1.41 gives about Rs 5,938 crore a year earlier. April to June has 91 days. 8,372 divided by 91 is about Rs 92 crore of premium a day on average.
Paying customers
2.8 crore of 15.9 crore registered
PB Fintech reported 15.9 crore registered users and 2.8 crore transacting customers. 2.8 divided by 15.9 is about 17.6%. Most people who sign up compare and leave. So quote traffic is many times higher than sales.
Chance that one insurer is slow
18.2% of pages with 20 insurers
Assume each insurer is slower than usual on 1% of calls. With 20 insurers, the chance that at least one is slow is 1 minus 0.99 to the power 20. That is about 18.2%. With 40 insurers, it is about 33.1%. So waiting for all of them makes many pages slow.
Distinct quote profiles
9,216 (example)
Assume 48 ages (18 to 65), 4 city zones, 6 sum insured options and 8 family types. 48 times 4 times 6 times 8 is 9,216 profiles. Times 20 insurers is 184,320 quotes. That is small enough to compute ahead for insurers that publish rate tables.
Policies sold since inception
7.2 crore
PB Fintech reported 7.2 crore insurance policies sold since inception. Each one has a document, a payment record and a renewal date to track.
The core is a quote service that calls many insurers at once and does not wait for the slowest. A customer submits a profile. The quote service turns it into a standard request. Then it sends a call to each insurer through an adapter, one adapter per insurer. Each adapter knows that insurer's API, its fields and its errors. Some insurers publish rate tables. Their prices are computed locally from the table, with no network call. Others need a live API call. Every call has a time limit. Results stream to the page as they arrive, over a long-lived connection. A quote cache keeps recent answers for the same profile for a short time. Buying is a separate flow. A purchase service builds the proposal, takes payment through a payment gateway, then asks the insurer to issue the policy. It is a state machine with retries and a refund path. Customer data that is sensitive lives in an encrypted store, apart from everything else. A renewal scheduler finds policies that end soon and starts reminders. An advisor service routes customers who want help to a person.
In a real interview, sketch this on the whiteboard before diving into any single box.
A 32-year-old in Pune asks for a family floater of Rs 10 lakh.
The quote service turns her answers into a standard request: age 32, Pune, family of four, Rs 10 lakh cover.
It checks the quote cache for the same profile. Fresh quotes are shown at once.
For the rest, it calls each insurer's adapter at the same time. Rate-table insurers answer from local tables in milliseconds. Live APIs get a 2-second time limit.
Each quote is sent to her page as it arrives. After 2 seconds, insurers that did not answer show "price not available, try again".
A quote that arrives after the time limit is still saved in the cache. The next customer with the same profile gets it at once.
The purchase flow starts with a fresh quote from that insurer. So the price she pays is the price it will honour.
Walk through each service. The interviewer wants to hear what each one owns, not just the names.
Sends one request to every insurer at once and gathers the answers within a time limit. Returns what it has when time is up. Never waits for the slowest insurer.
One per insurer. Each turns the standard request into that insurer's format and back. Each has its own time limit, retry rule and circuit breaker. A broken insurer is skipped for a while instead of called again and again.
For insurers that publish their prices as tables, a local copy. The price is computed in memory, with no network call. Tables are refreshed when the insurer updates them.
Recent quotes per profile and insurer, with a short time to live. It also keeps late answers that missed the time limit, so the next request is fast.
Runs the purchase as steps: proposal, payment, issue, document. Each step is saved. If issuing fails after payment, it retries. If it still fails, it refunds. Payments use idempotency keys.
Health answers and ID numbers, encrypted, in a store of their own. Other services hold only a token that points to the record. Every read is logged.
Finds policies that end in the next 60, 30 and 7 days and starts reminders. It renews with the same insurer or starts a new comparison.
Sends customers who ask for help to a human advisor, with their profile and quotes. Routes by product and language, and keeps a record of each call.
quote_requests. The standard request. profile_hash is the cache key. Sensitive answers stay in the vault; this row holds only a token.
Every table for Policybazaar, its keys, and which store fits it and why.
Asking 20 insurers at once. The quote page is a fan-out. One request becomes 20 calls, one per insurer, all sent at the same time. Then the answers are gathered. This pattern is called…
6 deep dives on the parts that break at scale, with 2 diagrams: Asking 20 insurers at once; The slowest insurer decides your speed, unless you stop it; Rate tables and the quote cache.
A page-wide time limit versus waiting for every insurer. Waiting for everyone shows the full list, but one slow insurer makes the whole page slow. A time limit shows most plans fast and a few as "try again". Late answers go…
4 decisions an interviewer expects you to defend, each with the alternative and why it loses here.
How do you add a new insurer without breaking the others?
3 follow-up questions with model answers, the interview scorecard for this question, and a mock interview on Design Policybazaar with the AI tutor.
Policybazaar has not published how its systems are built in the sources read for this page. So the design here fits public facts; it is not a description of Policybazaar's code. Inc42 reported PB Fintech's April to June 2026 results. They show Rs 8,372 crore of insurance premium, up 41%, and 15.9 crore registered users. They also show 2.8 crore transacting customers and 7.2 crore policies sold since inception. Wikipedia says Policybazaar got an insurance broking licence from IRDAI in June 2021 and gave up its web aggregator licence. It also says PB Fintech listed on 15 November 2021, and that users can buy from over 40 insurers. Insurer counts, time limits and profiles on this page are interview assumptions.
If any of these topics are fuzzy, the interviewer will catch it. Each lesson is 15 to 60 minutes with diagrams, code, and a quiz.
Scatter-Gather
intermediate / messaging event systems
Timeout Patterns
advanced / reliability resilience
Circuit Breaker for Resilience
advanced / reliability resilience
Saga Pattern
advanced / distributed systems core
Idempotency Keys
intermediate / api design protocols
PII Handling
intermediate / data governance compliance
Encryption at Rest
intermediate / security architecture
Time To Live (TTL)
foundation / caching strategies
28 walkthroughs of the products Indian interviewers ask about, each with the real scale numbers, the architecture and the trade-offs that company had to make.
interview readiness
Three questions from this guide. Answer them without scrolling up, the way you would have to in the room.
India: UPI, cards or netbanking through Razorpay. Elsewhere: card or PayPal. Download at once from My packs.
NEWSystem Design Hands-On
Postgres Sharding: Complete Hands-On (PgBouncer + Citus). 2 h 36 min and 20 chapters: one PostgreSQL loaded until it breaks, then four shards behind a router you write, PgBouncer and Citus, with the 139-page slide deck. The first 15 minutes are free to watch.
Free PDF · 79 pages
25 real tech interview questions, answered in full
Five from each of our AI, GenAI, Inference, Maths for ML and Forward Deployed packs. Each with a diagram and a model answer. Free by email.
free tool
Check these numbers yourself
Put in your own guesses for Policybazaar and see requests per second, storage, bandwidth and servers, with every sum written out.
Open the Capacity EstimatorIt is really nice and good Please join the course