EN_CS_Cloud_Native - somaz94/DevOps-Engineer GitHub Wiki

Q10 & Q11: Cloud-Native Patterns and Sync vs Async Processing

Question: Explain cloud-native 3-tier communication patterns on AWS and GCP. Also describe the differences between synchronous and asynchronous processing.


Key Terms

Term Description
VPC Virtual Private Cloud — isolated virtual network in the cloud
PrivateLink AWS service for private connectivity without internet
VPC Peering Direct connection between VPCs
Private Access GCP internal connectivity without internet
Synchronous Tasks completed sequentially; each waits for the previous
Asynchronous Tasks run independently in the background
Blocking Execution waits until task is complete
Non-blocking Execution continues without waiting

Cloud-Native 3-Tier: AWS

User → Route 53 (DNS) → ALB / EKS Ingress → EKS Pod (App Server)
                                                    ↓
                                    VPC Networking (PrivateLink / VPC Peering)
                                                    ↓
                                    Amazon RDS/Aurora + ElastiCache (Redis)
Layer AWS Service Role
Presentation Amazon Route 53 DNS resolution to ELB/EKS Ingress
Application Amazon EKS + ELB Route requests to Pods; handle business logic
Data Amazon RDS/Aurora, ElastiCache DB and Redis on private network
  • DB and Redis accessed via PrivateLink or VPC Peering — not exposed to internet
  • EKS Pods connect securely through VPC networking

Cloud-Native 3-Tier: GCP

User → Cloud DNS → GKE Load Balancer / Ingress → GKE Pod (App Server)
                                                        ↓
                                              VPC Private Access
                                                        ↓
                                        Cloud SQL + Memorystore (Redis)
Layer GCP Service Role
Presentation Cloud DNS Resolves domain to GKE Ingress IP
Application GKE + Cloud Load Balancer Routes and processes requests
Data Cloud SQL, Memorystore Private network DB and Redis
  • Services placed on private network via GCP Private Access
  • Accessible only from within the cloud or via VPN

Synchronous vs Asynchronous Processing

Synchronous

Tasks execute in order — each must complete before the next begins.

Characteristic Description
Blocking Each task blocks subsequent tasks until complete
Linear Execution Tasks run in the exact order they appear
Simplicity Easy to program and debug
Use Cases DB transactions, file I/O with dependent operations

Asynchronous

Tasks run independently — program continues without waiting.

Characteristic Description
Non-blocking Tasks start and complete independently
Concurrent Execution Multiple tasks processed in parallel
Complexity Risk of race conditions and deadlocks
Use Cases API requests, file uploads, long-running I/O

When to Use Each

Use Synchronous Use Asynchronous
Tasks must complete in a specific order Tasks are independent
Each result is needed for the next task Throughput and responsiveness matter
Simple, sequential workflows Background processing needed

Reference

⚠️ **GitHub.com Fallback** ⚠️