Related book
Building Microservices
Sam Newman on service decomposition and communication - the foundation for Cloud Native.
Cloud Native
Authors: Boris Scholl, Trent Swanson, Peter Jausovec
Publisher: O'Reilly Media, 2019
Length: 229 pages
Containers, Functions, Data: a practical guide to creating cloud-native applications from O'Reilly.
OriginalWhat is Cloud Native?
Cloud Native is a development approach that leverages the benefits of cloud platforms: elasticity, managed services, automation, and distribution.
Key Features
- Containerization (Docker, containerd)
- Orchestration (Kubernetes)
- Microservice architecture
- Serverless and FaaS
- Immutable infrastructure
- Declarative APIs
Advantages
- Fast time-to-market
- Automatic scaling
- High fault tolerance
- Efficient use of resources
- Independent deployments
Documentaries
Book structure
Cloud Native Context
Definition of cloud native. Distributed systems challenges. The Twelve-Factor App methodology. Cloud native vs cloud-enabled.
Cloud Native Patterns
Foundational patterns for containers and orchestration. Communication patterns. Reliability and resiliency patterns.
Cloud Native Data
Data in cloud native world. Event-driven architecture. Stream processing. CQRS and Event Sourcing.
Cloud Native DevOps
CI/CD for cloud native. GitOps. Observability: logging, metrics, tracing. Security best practices.
Containers and Kubernetes
Deep Dive
Kubernetes Patterns
Catalog of patterns for K8s: sidecar, health probes, configuration and advanced patterns.
Related book
Site Reliability Engineering
How Google manages production systems with Borg, the predecessor of Kubernetes.
Containers
- Application isolation via namespaces and cgroups
- Immutable images - reproducibility
- Layered filesystem - efficiency
- Container registries (Docker Hub, ECR, GCR)
Kubernetes Primitives
- Pod — minimum unit of deployment
- Service — stable network endpoint
- Deployment — declarative updates
- ConfigMap / Secret - configuration
# Kubernetes Deployment example
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
spec:
containers:
- name: my-app
image: my-app:v1.2.0
resources:
limits:
memory: "256Mi"
cpu: "500m"Serverless and Functions
Serverless allows you to run code without managing infrastructure. The platform automatically scales and charges based on actual usage.
AWS Lambda
Event-driven, up to 15 minutes of execution, integration with AWS
Azure Functions
Durable Functions for workflows, bindings
Google Cloud Functions
HTTP and event triggers, Cloud Run for containers
When to use
- Event-driven processing
- API backends with variable load
- Scheduled tasks (cron jobs)
- Data transformation pipelines
Restrictions
- Cold start latency
- Execution Time Limits
- Stateless by default
- Vendor lock-in
Data management
Deep Dive
Designing Data-Intensive Applications
Kleppmann on replication, partitioning and consistency in distributed systems.
Database per Service
Each microservice owns its own data. This provides loose coupling, but complicates distributed transactions.
Event-Driven Architecture
Services communicate through events. This provides asynchrony and resilience.
Event Sourcing
Storing events instead of current state
CQRS
Separating commands and requests
Fault Tolerance Patterns
Classic
Release It!
Michael Nygard is the author of Circuit Breaker and other stability patterns.
Retry with Backoff
Retries with exponential backoff. Jitter to prevent thundering herd.
Circuit Breaker
Protection against cascading failures. Three states: Closed, Open, Half-Open.
Health Checks
Liveness probes (whether the process is alive) and Readiness probes (whether it is ready to receive traffic).
Bulkhead
Isolate components to prevent fault propagation.
DevOps and Observability
CI/CD for Cloud Native
GitOps
Git as a source of truth for infrastructure
Canary Deployments
Gradual rollout with monitoring
Blue-Green
Instantly switch between versions
Three Pillars of Observability
Logging
Structured logs, ELK/Loki, correlation IDs
Metrics
Prometheus, Grafana, RED/USE methods
Tracing
Jaeger, Zipkin, OpenTelemetry
Application at System Design interview
Useful Concepts
- Container orchestration (Kubernetes)
- Serverless for event processing
- Database per service pattern
- Circuit breaker and retry patterns
- Health checks and graceful shutdown
- Observability: logs, metrics, traces
Questions where it will be useful
- “How to deploy and scale the service?”
- “How to handle failures?”
- “How to monitor a distributed system?”
- “Which database should I choose for a microservice?”
- “How to implement event processing?”
