Virtualization, Containers, Orchestration, Architecture
Quick about me
A warning
This lecture
Why won’t infra people shut up about containers and Kubernetes
How are most web applications made?
Database
Some social media website
Client
Gimme a post
Here’s a post
Client
A post
Monoliths
Database
Some social media website
Client
Gimme a post
Here’s a post
Client
A post
Photo storage
Russian Ads
Microservices have exploded in popularity
Microservices
How do we deploy these services?
Containers
Have we solved our problem?
True microservice deployment requires orchestration
Container Orchestrators
What has this allowed us to do?
Architecture and Design
Don’t read ahead! This part is meant to be interactive
Basic File storage service
Database
File request handler
Client
File download request
File
Client
File upload
Divide into separate services
Database
File upload handler
Client
File download request
File
Client
File upload
File download handler
Problem: both servers for file upload/download are hitting 100% CPU load. What can we do?
Improvement 1: More handlers
Database
File upload handler
File upload handler
Upload
Download
File download handler
File download handler
Upload LB
Download LB
Improvement 2: Caching!
Database
File upload handler
File upload handler
Upload
Download
File download handler
File download handler
Upload LB
Download LB
Cache
Cache
Improvement 3: Replication
Database
File upload handler
File upload handler
Upload
Download
File download handler
File download handler
Upload LB
Download LB
Cache
replica
Cache
Improvement 4: Partition
DB 1
File upload handler
File upload handler
Upload
Download
File download handler
File download handler
Upload LB
Download LB
Cache
Rep 1
DB 2
Rep 2
Cache
More reading
Questions