
Cloud
Learning Level
General Purpose (Balanced):
CPU Optimized:
Memory Optimized:
Storage Optimized:
GPU Instances:
Three-tier scaling:
1. Pod autoscaling (HPA): 10-200 pods
- Responds to request volume in seconds
- CPU/memory/custom metrics
2. Cluster autoscaling: 1-1,000 nodes
- Adds nodes when needed
- Responds in 1-2 minutes
3. Multi-cluster: 1-many clusters
- Global failover
- Multi-region resilienceSpot instances in Kubernetes:
70% spot nodes (cost optimized)
+ 30% on-demand nodes (availability)
= 40-50% total cost reduction
Pod-disruption-budgets:
āā Allow rolling updates without service loss
āā Gradual eviction from spot nodes
āā Graceful shutdown with connection drainingLanguage performance (first request):
Go: 100-200ms (fastest)
Node.js: 300-700ms (good)
Python: 600-1,200ms (slower)
Java: 1,000-3,000ms (slowest)
Optimization for Python:
āā Use Lambda Layers for dependencies
āā Move imports outside handler
āā Minimal package size
āā Result: 40-50% faster executionLambda concurrent execution:
Account limit: 1,000 (default)
Per-function limit: Configurable
Per-instance limit: 1 (sequential) or 100 (Python 3.9+)
Scaling formula:
Concurrent invocations = (Invocations per sec) Ć (Duration in seconds)
Example:
100 requests/sec Ć 5 second execution = 500 concurrent
Your account limit = 1,000
Overhead: 500 unused concurrencyPortable patterns:
Kubernetes: Works across all clouds
āā GKE (GCP)
āā EKS (AWS)
āā AKS (Azure)
Docker: Standard container format
āā ECR (AWS)
āā Artifact Registry (GCP)
āā ACR (Azure)Non-portable (lock-in):
Lambda: AWS-only
Cloud Functions: GCP-only
Azure Functions: Azure-only
To migrate: Full rewrite of functionsDatabase query latency (target: <10ms):
āā VM with local SSD: <5ms ā
āā Container in Kubernetes: <10ms ā
āā Serverless with cold start: 500ms-2s ā
For latency-sensitive: Use VMs or containers
For API backends: Serverless acceptable (p99 latency)Resources
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