SlideShare a Scribd company logo
www.webstackacademy.com
Scaling Web Service
to Handle Millions of Requests per Second
Presentation – 23rd
March 2024
Venkata Ramana Gollamudi (Senior Principal Architect @ Flipkart)
www.webstackacademy.com
About Me
With 20+ Years of Software development Experience.
Senior Principal Architect @ Flipkart solutioning Data Platform and Data
Engineering. This platform support data and real time analytics on 100s of PB of
data.
Open Source Apache Committer.
Key expertise in designing scalable distributed processing and analytical systems.
New Interest is on NLP based data analytics on Big Data
www.webstackacademy.com
Agenda
1. Scale for India, expectations (impact)
2. Case1: Journey of scaling a simple lookup web service
a. Challenges
b. Using K8s
c. Using NoSQL stores
3. Case2: Journey of scaling a simple order placement service
a. Challenges
b. Queues and Event driven Architecture
4. Typical network Scalability model
www.webstackacademy.com
Scale for India
1. 1.4 billion visits during Big Billion Day 2023 Sales
2. 4 million packages delivered in first 4 days of Sale.
www.webstackacademy.com
www.webstackacademy.com
Case 1: Journey of scaling a simple
lookup web service
www.webstackacademy.com
Problem statement
Webservice
GetProductDetail
MySQL
1 VM
10 Requests/sec
10 Requests/sec
www.webstackacademy.com
Try Scaling - Challenges
Load Balancer
Webservice
GetProductDetail
MySQL
10 VM
100 Requests/sec
100 Requests/sec
Challenges
- Request routing across VMS
- Each VM load protection
- Images and common data needs
catching
- VM is down
- Load protection on MySQL
- MySQL Instance is down
vm1 vm2 vm10
…
Multi Master,
Master slave replica etc
MySQL Router /
Load Balancer
www.webstackacademy.com
Scale further - Challenges
Load Balancer
Webservice
GetProductDetail
MySQL
1000 VMs
10000 Requests/sec
10000 Requests/sec
Challenges
- Request routing across VMs
- Each VM load protection
- Images and common data needs
catching
- VM is down
- Load protection on MySQL
- MySQL Instance is down
- Cannot scale horizontally
vm1 vm2 vm1000
…
100s of Nodes
Multi Master,
Master slave replica etc
MySQL Router /
Load Balancer
www.webstackacademy.com
Scaling Web service using K8s
Replaced
with
What it brings in
● Containerization
● Scalability
● High Availability
● Resource Efficiency
● Self-Healing
● Portability
● DevOps Enablement &
Deployment Spec
Webservice
vm1 vm2 vm1000
…
www.webstackacademy.com
Scaling Web service using K8s (contd..)
Load Balancer
Container1
(Bench marked)
Container2
Container
1000
…
● Liveness Probes
● Readiness Probe
● Startup Probe
Readiness
Probes
Control Plane (Autoscaler)
Startup probe
Liveness probe
www.webstackacademy.com
Scaling Database using NoSQL Database
Replaced
with
What it brings in
● Key-Value Store
● High Scalability
● High Availability
● Efficiency
● Row level Consistency
● In-Memory Cache
MySQL
100s of Nodes
Multi Master,
Master slave replica etc
MySQL Router /
Load Balancer
RegionServer
Region
Region
RegionServer
Region
Region
…
RegionServer
Region
Region
1000s of Nodes
Web Service
(Clients)
www.webstackacademy.com
Scaling Database using NoSQL Database (contd)
What is brings in
● Key Sharding
● Fast lookup
● Fast Update
Key Range 00 - 15 16 - 30 31 - 45 46 - 60 61 - 75 75 - 100
www.webstackacademy.com
Scaling Database using NoSQL Database (contd)
Load Balancer
Web service
GetProductDetail
1000s of Containers
Million Requests/sec
Million Requests/sec
Cont1 …
CDN
Cont1 Cont1k
RegionServer
Region
Region
RegionServer
Region
Region
…
RegionServer
Region
Region
1000s of Nodes
www.webstackacademy.com
www.webstackacademy.com
Case 2: Journey of scaling a
simple order placement service
www.webstackacademy.com
Problem statement
Order Service
PlaceOrder
MySQL
Track Order
Deliver Order
1 VM
10 Requests/sec
10 Requests/sec
Read/Write
www.webstackacademy.com
Try scaling
Order Service
PlaceOrder Track Order
Deliver
Order 1000s Place Order Requests/sec
1000s Deliver Order Requests/sec
Million Track Order Requests/Sec
1000s of Containers
1000s Write Requests/sec
Million Read Requests/sec
Read/Write
NoSQL
Load Balancer
www.webstackacademy.com
Try scaling - Challenges
Order Service
PlaceOrder Track Order
Deliver
Order 1000s Place Order Requests/sec
1000s Deliver Order Requests/sec
Million Track Order Requests/Sec
1000s of Containers
1000s Write Requests/sec
Million Read Requests/sec
Read/Write
NoSQL
Load Balancer
Challenges
● Different Services requests have
different resources requirement
● Adding new Service is tough
● Latency of Place Order is high
● Track Order and Place Order have
different scale requirements
● Not all operations are synchronous
www.webstackacademy.com
User Queues and Event based design
Order Service
PlaceOrder
Track
Order
Deliver
Order
NoSQL
Load Balancer
Order Tracking
Service
NoSQL
Fulfillment
Service
NoSQL
Load Balancer Load Balancer
Fraud Detection
Service
Graph Database
Load Balancer
What it brings in
● Independent scaling
● Low latency Async Processing
● High throughput Scalable
Queues
● Resource Efficiency
● Independent tech stack
● Easy New service addition
● DevOps independence
Advertisement
Service
NoSQL Database
Load Balancer
www.webstackacademy.com
www.webstackacademy.com
Typical Network scalability Model
www.webstackacademy.com
Typical network scalability model
www.webstackacademy.com
Typical network CDN placement
www.webstackacademy.com
www.webstackacademy.com ‹#›
Thank you
www.webstackacademy.com
MCQ Questions
1. Which Databases preferred to Scale to Million Read/Write Requests per sec
a. Transactional Databases
b. NoSQL databases
c. File Based Stores
d. None of the above
Answer: b
www.webstackacademy.com
MCQ Questions
2. K8s brings in
a. Scalability
b. Self Healing
c. Containerization and portability
d. All of the above
Answer: d
www.webstackacademy.com
MCQ Questions
3. Example of NoSQL databases
a. MySQL
b. HBase
c. K8s
d. Kafka
Answer: b
www.webstackacademy.com
MCQ Questions
4. HBase scalability is achieved using
a. Master Slave model
b. Sharding key space
c. Multiple clusters
d. Distributed transactions
e. All of the above
Answer: b
www.webstackacademy.com
MCQ Questions
5. Load balancer will identify Active Containers to route traffic using
a. Readiness Probe
b. Round robin distribution
c. Errors
d. Latency of request
Answer: a
www.webstackacademy.com
MCQ Questions
6. Event based async architecture requires ______ for inter service communication
a. K8s
b. NoSql Databases
c. Queues
d. Load balancer
Answer: c
www.webstackacademy.com
MCQ Questions
7. Event based async architecture benefits
a. Services can independently scale
b. Addition of new service is easy
c. Can choose different tech stack and stores based on need
d. All of the above
Answer: d
www.webstackacademy.com
MCQ Questions
8. Popular implementation of Queues
a. HBase
b. Cassandra
c. Apache kafka
d. K8s
Answer: c
www.webstackacademy.com
MCQ Questions
9. CDN useful to store
a. Images and Videos
b. Order status information
c. Delivery status information
d. All of the above
Answer: a
www.webstackacademy.com
MCQ Questions
10. Typical path for mobile to web service traffic is
a. Mobile -> POP endpoint -> Internet -> Data center
b. Mobile -> Internet -> POP endpoint -> Data center
c. Mobile -> Internet -> POP endpoint -> Internet -> Data center
d. All of the above
Answer: b

More Related Content

Similar to WSA: Scaling Web Service to Handle Millions of Requests per Second (20)

PDF
Architecting for the cloud scability-availability
Len Bass
 
PPTX
Black Friday and Cyber Monday- Best Practices for Your E-Commerce Database
Tim Vaillancourt
 
DOCX
Architecting extremelylargescalewebapplications
Prashanth Panduranga
 
PDF
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
ploibl
 
PDF
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
JAXLondon2014
 
PDF
Scalable Web Applications Session at Codebase
Ian Massingham
 
PPTX
Handling Data in Mega Scale Systems
Directi Group
 
PPTX
Building a Modern Website for Scale (QCon NY 2013)
Sid Anand
 
PDF
Azure and cloud design patterns
Venkatesh Narayanan
 
PPTX
Webinar How to Achieve True Scalability in SaaS Applications
Techcello
 
PPTX
Brief Introduction To Kubernetes
Avinash Ketkar
 
PPTX
Scalability
Daniel DiPaolo
 
PPTX
Application architecture for cloud
Marco Parenzan
 
PDF
Scaling data on public clouds
Liran Zelkha
 
PDF
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
PPTX
Hardware Provisioning
MongoDB
 
PPS
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 
PPTX
Scalable service architectures @ VDB16
Zoltán Németh
 
PPTX
Cloud computing
Aaron Tushabe
 
PPTX
Cloud Computing - Geektalk
Malisa Ncube
 
Architecting for the cloud scability-availability
Len Bass
 
Black Friday and Cyber Monday- Best Practices for Your E-Commerce Database
Tim Vaillancourt
 
Architecting extremelylargescalewebapplications
Prashanth Panduranga
 
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
ploibl
 
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
JAXLondon2014
 
Scalable Web Applications Session at Codebase
Ian Massingham
 
Handling Data in Mega Scale Systems
Directi Group
 
Building a Modern Website for Scale (QCon NY 2013)
Sid Anand
 
Azure and cloud design patterns
Venkatesh Narayanan
 
Webinar How to Achieve True Scalability in SaaS Applications
Techcello
 
Brief Introduction To Kubernetes
Avinash Ketkar
 
Scalability
Daniel DiPaolo
 
Application architecture for cloud
Marco Parenzan
 
Scaling data on public clouds
Liran Zelkha
 
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
Hardware Provisioning
MongoDB
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 
Scalable service architectures @ VDB16
Zoltán Németh
 
Cloud computing
Aaron Tushabe
 
Cloud Computing - Geektalk
Malisa Ncube
 

More from WebStackAcademy (20)

PDF
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
 
PDF
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
 
PDF
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
 
PDF
Webstack Academy - Internship Kick Off
WebStackAcademy
 
PDF
Building Your Online Portfolio
WebStackAcademy
 
PDF
Front-End Developer's Career Roadmap
WebStackAcademy
 
PDF
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
 
PDF
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
PDF
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
 
PDF
Angular - Chapter 5 - Directives
WebStackAcademy
 
PDF
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
PDF
Angular - Chapter 3 - Components
WebStackAcademy
 
PDF
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
 
PDF
Angular - Chapter 1 - Introduction
WebStackAcademy
 
PDF
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
 
PDF
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
PDF
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
 
PDF
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
PDF
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
PDF
JavaScript - Chapter 11 - Events
WebStackAcademy
 
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
 
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
 
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
 
Webstack Academy - Internship Kick Off
WebStackAcademy
 
Building Your Online Portfolio
WebStackAcademy
 
Front-End Developer's Career Roadmap
WebStackAcademy
 
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
 
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
 
Angular - Chapter 5 - Directives
WebStackAcademy
 
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Angular - Chapter 3 - Components
WebStackAcademy
 
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
 
Angular - Chapter 1 - Introduction
WebStackAcademy
 
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
 
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
JavaScript - Chapter 11 - Events
WebStackAcademy
 
Ad

Recently uploaded (20)

PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
community health nursing question paper 2.pdf
Prince kumar
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Ad

WSA: Scaling Web Service to Handle Millions of Requests per Second