This section covers advanced concepts in cloud computing, including architecture patterns, security practices, and optimization strategies.
What is a cloud region?
A cloud region is a geographic area where a cloud provider has multiple data centers. Each region consists of multiple availability zones (AZs), ensuring redundancy and high availability.
Example: AWS us-east-1 (North Virginia) has multiple AZs like us-east-1a, us-east-1b, etc.
Cloud providers like AWS, Azure, and GCP allow users to select regions based on factors like latency, compliance, and pricing.
How does AWS Lambda differ from EC2?
Feature
AWS Lambda
Amazon EC2
Type
Serverless function
Virtual machine
Scaling
Auto-scales instantly
Requires manual scaling or auto-scaling setup
Billing
Pay-per-execution
Pay for running instances
Use case
Short-lived tasks
Long-running applications
Example
Trigger a function when an S3 file is uploaded
Run a web server for hosting applications
What are Reserved Instances in AWS?
Reserved Instances (RIs) are a pricing model in AWS where users commit to a specific instance type for 1 or 3 years in exchange for significant discounts (up to 75%) compared to On-Demand pricing.
Types of RIs:
Standard RIs – Best discounts, but limited flexibility.
Convertible RIs – Can switch to another instance type.
Scheduled RIs – Available at specific times (e.g., weekends).
How do you secure data in cloud storage?
To secure data in cloud storage:
Encryption: Use AES-256 encryption for data at rest and TLS for data in transit.
Access Control: Implement IAM policies and bucket policies to restrict access.
Versioning: Enable object versioning to recover deleted/modified files.
Auditing: Use AWS CloudTrail, Azure Monitor, or GCP Audit Logs to track access.
What is the difference between Kubernetes and Docker Swarm?
Feature
Kubernetes
Docker Swarm
Complexity
Steeper learning curve
Easier to set up
Scaling
Automated, fine-grained
Manual or auto-scaling
Networking
Uses CNI (Customizable)
Simple overlay network
Load Balancing
Built-in service discovery
DNS-based service discovery
Use case
Enterprise-grade orchestration
Lightweight container orchestration
What is a Stateful vs. Stateless application in the cloud?
Stateless Application: Doesn't retain session data. Each request is independent (e.g., REST APIs, serverless functions).
Stateful Application: Retains user state across requests (e.g., databases, messaging queues).