Ojasa Mirai

Ojasa Mirai

Cloud

Loading...

Learning Level

๐ŸŸข Beginner๐Ÿ”ต Advanced
โ˜๏ธ Cloud Basics Overviewโ“ Why Cloud Computing?๐Ÿ” Providers Comparisonโš™๏ธ Compute Options๐Ÿ—„๏ธ Database Options๐Ÿ’ฐ Cost Estimation๐Ÿ” Security Fundamentals๐ŸŒ Networking Basics๐Ÿ“Š Monitoring & Observability๐Ÿ“ˆ Scaling & Availability๐Ÿš€ Deployment Strategiesโœ… Cloud Readiness
Cloud/Cloud Fundamentals/Scaling Availability

Scaling & Availability โ€” ๐Ÿ“ˆ Building Resilient Applications

Scaling handles growing demand. Availability ensures your app stays online even when things fail.


๐ŸŽฏ Two Types of Scaling

Vertical Scaling (Bigger Server)

Buy a more powerful server.

Before:  4GB RAM, 2 CPU
After:   64GB RAM, 8 CPU

Cost: 2x-3x more expensive
Problem: Eventually hits hardware limits

Pros: Simple, one server to manage

Cons: Expensive, has limits, downtime to upgrade

Horizontal Scaling (More Servers)

Add more servers sharing the load.

Before:  1 server handling 1,000 req/sec
After:   4 servers handling 4,000 req/sec

Cost: Linear growth with demand
Benefit: Infinite scalability

Pros: Scalable, cost-effective, resilient

Cons: Requires load balancer, more complex


๐Ÿ’ก Auto-scaling

Automatically add/remove servers based on demand.

8 AM (Peak):     Add servers
โ”‚
โ”œโ”€ 1,000 users โ†’ 5 servers
โ”œโ”€ 10,000 users โ†’ 50 servers
โ”œโ”€ 100,000 users โ†’ 500 servers
โ”‚
6 PM (Evening):   Remove servers
โ”œโ”€ 10,000 users โ†’ 50 servers
โ””โ”€ 1,000 users โ†’ 5 servers

How it works:

1. Monitor CPU usage

2. If CPU > 70% for 5 minutes โ†’ Add server

3. If CPU < 30% for 10 minutes โ†’ Remove server

4. Automatic, no manual intervention

Savings:

Fixed servers: 50 servers ร— $100/month = $5,000
Auto-scaled: Average 15 servers ร— $100 = $1,500
Savings: 70%

๐Ÿ“Š Load Balancing

Distributes incoming requests across multiple servers.

Incoming Request
        โ†“
   Load Balancer
    /    |    \
   /     |     \
[Server1] [Server2] [Server3]

Algorithm:

  • **Round Robin:** Rotate requests (1โ†’2โ†’3โ†’1โ†’2โ†’3)
  • **Least Connections:** Send to least busy server
  • **IP Hash:** Same IP always goes to same server

Example:

1,000 requests/sec
รท 10 servers
= 100 requests/sec per server
(manageable, no overload)

๐Ÿ›ก๏ธ High Availability

Application stays online even when components fail.

Single Server (No HA):

Server crashes โ†’ App down โ†’ Customers angry
MTTR: 30 minutes

Multiple Servers (HA):

Server 1 crashes โ†’ Load balancer routes to Server 2 & 3
Application still works โ†’ Customers don't notice
MTTR: 0 (automatic)

๐ŸŒ Geographic Distribution

Deploy across multiple regions worldwide.

Europe             Asia             Americas
โ”œโ”€ London          โ”œโ”€ Tokyo         โ”œโ”€ New York
โ”œโ”€ Frankfurt       โ”œโ”€ Singapore     โ””โ”€ Los Angeles
โ””โ”€ Amsterdam       โ””โ”€ Mumbai

If London data center fails โ†’ Traffic routes to Frankfurt

Benefits:

  • Faster access (servers near users)
  • Disaster recovery (multiple locations)
  • Regulatory compliance (data location requirements)

๐ŸŽจ Real-World Example: Netflix's Infrastructure

Users worldwide
        โ†“
CloudFront (Global CDN - caches content)
        โ†“
Multiple AWS regions
โ”œโ”€ US-East
โ”œโ”€ US-West
โ”œโ”€ Europe
โ””โ”€ Asia-Pacific

Each region has:
โ”œโ”€ Load balancers
โ”œโ”€ Multiple app servers (auto-scaling)
โ””โ”€ Multiple database replicas

Result:

  • Never a single point of failure
  • If entire region fails, traffic routes elsewhere
  • 99.99% uptime SLA

๐Ÿ“ˆ Key Metrics

MetricWhat it meansTarget
Availability% uptime99.9%+
MTTRTime to recover< 5 minutes
RTOTime to restore service< 1 hour
RPOMax data loss< 1 hour
LatencyResponse time< 200ms

๐Ÿ”‘ Key Takeaways

  • โœ… Vertical scaling: bigger server (limited)
  • โœ… Horizontal scaling: more servers (unlimited)
  • โœ… Auto-scaling: add/remove servers automatically
  • โœ… Load balancers distribute traffic
  • โœ… High availability: multiple redundant components
  • โœ… Geographic distribution: data centers worldwide
  • โœ… Proper scaling/HA prevents outages and saves money

Want production patterns? ๐Ÿ“ˆ Scaling & Availability (Experienced)


Resources

Python Docs

Ojasa Mirai

Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.

Learn Deep โ€ข Build Real โ€ข Verify Skills โ€ข Launch Forward

Courses

PythonFastapiReactJSCloud

ยฉ 2026 Ojasa Mirai. All rights reserved.

TwitterGitHubLinkedIn