CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
  • Week 1
    • 1.The Game Called the SAP Exam: Hands-On Techniques for Decomposing Scenarios
    • 2.IAM, STS, and Federation: Splitting the Word "Permission" into Six Layers
    • 3.The Anatomy of a VPC: What Route Tables Really Decide
    • 4.Four Compute Pillars in Depth: Revisiting Nitro, EBS, ELB, and Auto Scaling Through a Pro Lens
    • 5.Week 1 Integration: When IAM, VPC, and EC2 Meet in a Single Scenario
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
    • 1.Container Orchestration Crossroads: The Real Criteria for Choosing ECS, EKS, Fargate
    • 2.Inside EKS — Node Groups, IRSA, Karpenter Set the Operations Standard
    • 3.Fargate Cost Anatomy — Serverless Container's Real Price Tag
    • 4.Service Mesh Anatomy — App Mesh, Service Connect, Cloud Map Divergence
    • 5.Week 7 Wrap-Up — Cementing It with 12 Container Scenario Questions
  • Week 8
  • Week 9
  • Week 10
  • Week 11
  • Week 12
  • Week 13
  • Week 14
  • Week 15
  • Week 16
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← SAP-C02/Week 7/Day 4

Based on the SAP-C02 exam guide·Report an error

SAP-C02· ProWeek 7 · Day 4~34 min read

Day 4 - Service Mesh Anatomy — App Mesh, Service Connect, Cloud Map Divergence

Spin up 10 microservices, new problems begin. How does service-a know service-b's IP? When service-b suddenly returns 5xx, how fast should service-a retry? To encrypt all comms with mTLS, who issues and rotates certificates? For canary-deploying new versions to 10% traffic, where does routing split? Solving all in application code bloats it with infrastructure logic. Service mesh moves this problem to sidecar proxies outside code. SAP exams frequently ask scenarios distinguishing AWS' three options: Cloud Map, ECS Service Connect, App Mesh.

This article examines why service mesh emerged, how sidecar proxies intercept traffic, responsibility division. Then mTLS, canary, circuit breaker implementation; App Mesh EOL announcement (2024) and successor standards. After spinning up 10 microservices on ECS/EKS/Fargate yesterday, the next question naturally asks "how make inter-service communication safe and observable?"—today answers it.

Why Service Mesh Was Needed — Library Analogy

In monolithic apps, function calls happen in-process. Library calls and business logic blur together. Microservices split via network calls. Same call now traverses DNS lookup, TCP handshake, TLS handshake, HTTP request, retries, timeouts, circuit breaker, metric collection.

Initially, libraries solved all. Netflix Hystrix (2012), Ribbon, Eureka fit this. Problem: reinvent per language; version upgrade means simultaneous service redeployment. Go and Python services on the same mesh require bit-level library behavior alignment.

2016, Lyft unveiled Envoy, flipping the model: "Spin up a sidecar proxy per container; application calls localhost only." All policies—retries, metrics—Envoy handles. App code works language-agnostic, identical behavior. This foundation underpins Istio, Linkerd, AWS App Mesh.

[Traditional library pattern]
[App] ──Hystrix·Ribbon──► [Network] ──► [Other App]
   Language-specific libs

[Sidecar mesh pattern]
[App] ──localhost──► [Envoy sidecar] ──mTLS·retries·metrics──► [Envoy] ──► [Other App]
   Language-agnostic, sidecar handles all policies

💡 Related Theory: Sidecar pattern applies separation of concerns to infrastructure. Separating business logic (app) from cross-cutting concerns (auth, retries, observability), you solve them once and apply everywhere. Same idea appears in Spring AOP, K8s Init Containers, JavaScript middleware. Academically, Gregor Hohpe's Enterprise Integration Patterns (2003) formalized it as "Channel Adapter" pattern.

🔍 Deeper Dive: xDS API (Envoy Data Service) standardization made Envoy dominant. Control planes (Istio, App Mesh, Consul) push routing rules, certs, discovery via xDS gRPC to Envoy. Swap control planes while keeping data plane (Envoy)—multi-control-plane migration becomes possible. xDS becomes CNCF standard.

Three Services' Responsibility Map

AWS offers three service mesh options. Similar names, different responsibilities.

[Manual, basic]                    [Automatic, rich]
   │                                  │
   ▼                                  ▼
[Cloud Map]   [ECS Service Connect]    [App Mesh]
Pure registry  ECS standard discovery +  Full service mesh
DNS + API      light mesh              (Envoy sidecar)
               (Envoy auto-injected)    Routing, mTLS, circuit
                                       breaker, observability
AspectCloud MapService ConnectApp Mesh
EssenceService RegistryECS-integrated mesh (lightweight)Full Service Mesh
Envoy sidecarNoneAuto-injectedAuto-injected
DiscoveryDNS or HTTP APIClient-side LBxDS-based routing
mTLSNoneNone (2024)ACM Private CA integration
Weighted routing (canary)NoneNoneVirtual Router weight
Circuit breakerNonePartial (retries, timeout)Full support
ObservabilityNoneCloudWatch metrics autoX-Ray, CloudWatch integration
Use whenSimple discovery onlyECS standard, low opsFull mesh features needed
EOL statusActiveActive (2022 GA)EOL 2026.9 planned

Relationship summary: "Cloud Map simplest registry, Service Connect Envoy auto-stacked lightweight mesh, App Mesh full-featured mesh."

AWS Cloud Map — Discovery's Foundation

Cloud Map (2018) is service name → resource mapping basic layer. Two namespace types:

  • DNS Namespace (Public or Private): Route 53 Hosted Zone integration. Querying service-a.internal returns ECS Task IP list. Most common pattern.
  • HTTP Namespace: No DNS; HTTP API queries instance list. Users poll or SDK-integrate.

Creating ECS Service, add serviceRegistries option auto-registering Cloud Map. Task startup registers IP+port; termination auto-deregisters. EKS can match via ExternalDNS controller, but K8s Service' native discovery overshadows Cloud Map's role in EKS.

Cloud Map's limitation: no functionality beyond that. Pure name → IP; load-balancing defers to client DNS cache and random selection. Retries, circuit breaker, mTLS—mesh features absent.

⚠️ Trap: Creating Private DNS Namespace auto-creates internal Route 53 Private Hosted Zone. Must connect to VPC for queries—VPC detail often forgotten. TTL defaults 10s (fast IP propagation), but clients caching DNS can call stale IPs. SDK-level short TTL setting is standard.

ECS Service Connect — ECS's Standardized Lightweight Mesh

ECS Service Connect (2022 GA) builds on Cloud Map discovery, auto-injecting Envoy sidecars, providing client-side load-balancing, CloudWatch metrics, retries, timeouts by default. Enable with single ECS Service block.

aws ecs update-service \
  --cluster prod --service myapp \
  --service-connect-configuration '{
    "enabled": true,
    "namespace": "prod.local",
    "services": [
      {
        "portName": "http",
        "clientAliases": [{"port": 80, "dnsName": "myapp"}]
      }
    ]
  }'

After, other ECS Services in same namespace call http://myapp/..., Envoy automatically load-balances service-a → service-b. Microservice comms work without ALB.

[Service A Task]
   │
   ├─ App Container (calls localhost:80)
   │     ↓
   └─ Envoy Sidecar (auto-injected)
         │
         ├─ Auto Cloud Map query (Service B Task IPs)
         ├─ Client-side load-balancing
         ├─ Retries, timeouts
         └─ CloudWatch metrics auto-emit
              │
              ▼
        [Service B Tasks (multiple)]
              │ Auto Cloud Map register/deregister

Service Connect advantage: low operational burden. No need writing Virtual Service, Router, Node manifests like App Mesh; ECS Service option block suffices. Metrics auto-flowing to CloudWatch (traffic, error rate, latency) come as default dashboard.

Downside: no full-mesh features. Weighted-canary, circuit breaker, mTLS unsupported (2024). Need them? Switch to App Mesh, or if mixing ECS+EKS, add EKS + Istio.

💡 Related Theory: Client-side load-balancing has no extra hop vs. server-side (ALB). ALB adds hop: client → ALB → server (2 hops); client-side: client → server (1 hop). Deep call chains (5-10 services) accumulate latency. gRPC's Round Robin and xDS resolvers use same thinking. Downside: client knows server list directly. Cloud Map auto-refresh solves this.

AWS App Mesh — Full-Featured Mesh and Its EOL

App Mesh (2019) is full service mesh using Envoy as data plane. Abstraction model: 4 layers.

[Mesh]
  │ Entire mesh unit
  ▼
[Virtual Service]   "Payment Service" logical name
  │
  ▼
[Virtual Router]    Traffic split (weighted, header-based)
  │
  ├──[Virtual Node v1, weight=90]──► [ECS Service v1]
  └──[Virtual Node v2, weight=10]──► [ECS Service v2]

This structure enables:

  • Weighted canary: Virtual Router weight 90:10 → 70:30 → 0:100 gradual shift
  • Header-based routing: x-canary: true header routes to v2
  • Retries, circuit breaker: Virtual Node policies, Envoy auto-executes
  • mTLS: ACM Private CA short-lived cert issuance, auto-rotation, Envoy applies all comms
  • X-Ray integration: Sidecar auto-emits traces
# Virtual Router weighted routing (abbreviated)
{
  "spec": {
    "httpRoute": {
      "match": {"prefix": "/"},
      "action": {
        "weightedTargets": [
          {"virtualNode": "checkout-v1", "weight": 90},
          {"virtualNode": "checkout-v2", "weight": 10}
        ]
      }
    }
  }
}

App Mesh EOL: November 2024, AWS announced App Mesh EOL September 30, 2026. New workloads should explore alternatives (Istio on EKS, ECS Service Connect). At test authoring time (SAP-C02 v1.5 ~ 2024 exam), App Mesh remains correct answers, but new adoption not recommended operationally.

📚 Case Study: App Mesh EOL's causes: First, AWS data showed ECS Service Connect covers 70%+ ECS users' needs. Second, EKS users de facto adopted Istio/Linkerd. App Mesh occupied vague middle ground; new feature investment stalled. Similar pattern: 2023 AWS X-Ray + OpenTelemetry integration—AWS pivoting from proprietary toward CNCF standards.

🔍 Deeper Dive: Istio's control plane (istiod) tightly integrates K8s; poor ECS fit. EKS users can adopt Istio via Add-on (2024 EKS Marketplace) lightly. Linkerd is lighter but feature-reduced. Multi-cloud standardization priority → Istio; simplicity priority → Linkerd is typical recommendation.

mTLS and ACM Private CA — Zero Trust Core

Service mesh's largest security value: mTLS (Mutual TLS). Standard TLS, server has cert; mTLS, client+server bilateral verification. Zero Trust model's (distrust network location, authenticate all requests) core implementation.

App Mesh integrates ACM Private CA, implementing mTLS nearly automatic.

[ACM Private CA]   ← Company's private authority
       │
       ├─ Every 24h short-lived cert issuance
       │
[Envoy sidecar A] ───mTLS─── [Envoy sidecar B]
         │                       │
         └─ Bilateral cert verify│
         └─ SAN confirms service ID

Three value points:

  1. Short-lived cert auto-rotation: ACM Private CA issues 24h certs, auto-rotate on expiry. Key exposure minimized.
  2. Service ID verification: Certificate's SAN (Subject Alternative Name) embeds service ID, enabling "only Payment Service calls Order Service" policies.
  3. Application code unchanged: TLS handled by Envoy sidecar. App calls plain HTTP; sidecar encrypts.

💡 Related Theory: mTLS trust model uses PKI (Public Key Infrastructure) X.509 cert chain validation. CA roots trust at top; issued certs beneath carry CA signature proving authenticity. Private CAs within company: ACM Private CA (AWS), HashiCorp Vault, Google CA (GCP). Short cert lifetime concept mirrors SPIFFE/SPIRE (CNCF) same direction; auto-rotation eliminates manual key management burden.

🎯 Scenario: "A financial company mTLS-encrypts all 50-microservice comms. Manual cert rotation is ops burden. Fitting combo?" — App Mesh + ACM Private CA (test authoring time). App Mesh EOL is operations perspective; SAP asks era-correct answers. New adoption: Istio + cert-manager + ACM Private CA operational standard; SAP still asks App Mesh.

Canary Deployment — Weighted Routing and CodeDeploy Blue/Green

Routing new versions to partial traffic deploys via mesh, load balancer, or CodeDeploy.

OptionWeight granularityTraffic split location
App Mesh Virtual RouterArbitrary 1%Mesh (Envoy sidecar)
ALB Weighted Target Group1% unitLoad balancer
CodeDeploy Blue/GreenPredefined Linear/Canary ratiosALB Target Group auto-switch

App Mesh offers finest control. Combined with header-routing: "internal employees only use v2" patterns. ALB simple 90:10 weighted target group matches roughly; header splits limited. CodeDeploy overlays deploy automation on ALB, auto-executing "10% → 30% → 100%" preset patterns.

ECS Service Connect doesn't directly support weighted routing, so canary needs CodeDeploy Blue/Green + ALB Weighted Target Group.

[CodeDeploy Blue/Green + ALB]
   │
[Blue Target Group (v1, 90%)]  ──► ECS Service v1
   │
[Green Target Group (v2, 10%)] ──► ECS Service v2
   │
   ▼ Gradual shift (10% → 50% → 100%)
   ▼ Auto-rollback on alarm

📚 Case Study: 2022, Airbnb standardized payment service canary with Istio weight routing + Prometheus metric-based auto-rollback. New version's 5xx ratio over 2× baseline instantly zeroes weight. Pattern called Progressive Delivery, tools like Flagger and Argo Rollouts standardizing it on K8s.

ALB, NLB, API Gateway and Mesh Responsibility Division

Mesh handles East-West (inter-service), ALB/NLB/API Gateway handle North-South (external ingress). Confusing this division costs SAP wrong answers.

[Internet]
   │
   ▼
[CloudFront]            ← Global CDN, edge caching
   │
   ▼
[API Gateway / ALB]    ← N-S ingress, auth, WAF
   │
   ▼
[Service A (Envoy)]   ← Mesh entry
   │ E-W mesh comms (mTLS, canary)
[Service B (Envoy)]
   │
[Service C (Envoy)]
   │
   ▼
[RDS / DynamoDB / S3]
TrafficRecommended
External HTTPS + auth + WAFAPI Gateway + Cognito + WAF
External HTTPS + simple routingALB
External TCP/UDP + static IP + high perfNLB
Internal East-West HTTP, gRPCService Mesh (Service Connect / App Mesh)
External + internal mesh bothAPI Gateway + mesh combo

⚠️ Trap: "Use ALB Target Group for microservice comms" works small-scale; full mTLS, canary, circuit breaker insufficient. ALB dominates N-S, mesh dominates E-W—remember responsibility division for right answers.

Service Mesh Comparison Across Clouds

DimensionAWSGCPAzure
Managed meshApp Mesh (EOL planned), Service ConnectAnthos Service Mesh (Istio-based)Service Mesh (Open Service Mesh, OSM)
DiscoveryCloud MapService DirectoryAzure Service Fabric
Envoy integrationAvailable (App Mesh, Service Connect)StandardStandard
Managed IstioEKS Add-onAnthos Service MeshAKS OSM (Deprecated 2024)

GCP early-adopted Istio as managed mesh standard (Anthos Service Mesh). AWS built proprietary App Mesh; market adoption insufficient, EOL decided. Azure also deprecated Open Service Mesh 2024, pivoting to Istio Add-on. Cloud mesh market trend: clear Istio + Envoy single standardization.

🔍 Deeper Dive: Service Mesh Interface (SMI) was K8s SIG's attempted mesh standard API; 2023 archived. Standardization attempt failed because Istio became de facto standard, making abstract layers unnecessary. Cloud-native ecosystem "standardization" often happens via one implementation's de facto dominance, not abstract standards. K8s itself follows this pattern, as does Envoy.

Summary

Service mesh moves microservice comms' cross-cutting concerns (auth, retries, observability, encryption) to sidecar proxies. AWS offers Cloud Map (registry) / ECS Service Connect (ECS standard mesh) / App Mesh (full mesh); each responsibility differs. App Mesh EOL announced; new adoption checks Istio and Service Connect as standard, but SAP exams still accept App Mesh at test authoring.

Tomorrow synthesizes Week 7 with 12-scenario questions. Knowledge accumulated—ECS, EKS, Fargate, Karpenter, IRSA, Service Connect—branches through SAP scenarios. Multi-account, hybrid, cost optimization fused with containers—that's tomorrow's lens.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

A fintech runs 30 microservices on ECS Fargate. It must satisfy all of the following. (1) mTLS for all communication. (2) A 5% traffic canary for new versions. (3) A circuit breaker per service. Which tool should it use?

Question 2

Which option automatically provides simple discovery, retries, and CloudWatch metrics between microservices in an ECS Cluster, with minimal operational burden?

Question 3

External users enter over HTTPS, and JWT authentication and rate limiting are required. Internal East-West traffic uses a mesh. Which service is most appropriate for external ingress?

Question 4

In an App Mesh Virtual Router, you start with v1=100, v2=0 and raise the v2 share by 10% every hour. What is the name of this pattern?

Question 5

What is the behavior of a Cloud Map Private DNS Namespace?

Question 6

You want to protect all microservice communication with mTLS and automatically rotate certificates that live for only 24 hours. What is the most appropriate combination?

Question 7

Which feature does ECS Service Connect not support directly?

📌 Today's Summary

  1. Sidecar mesh = cross-cutting concern separation, language-agnostic, Envoy de facto standard
  2. Cloud Map = registry, Service Connect = ECS standard mesh (Envoy auto), App Mesh = full mesh (EOL 2026.9)
  3. East-West = mesh, North-South = ALB/API Gateway, clear responsibility division
  4. mTLS = ACM Private CA + App Mesh, short-lived auto-rotation core to Zero Trust
  5. Canary = Virtual Router weight or ALB Weighted Target Group, Service Connect no weight support → CodeDeploy combo
  6. Post-App Mesh EOL, new adoption = Istio + Envoy + cert-manager operational standard
  7. Cloud mesh trend = Istio single standardization, GCP·Azure·AWS same direction
PreviousFargate Cost Anatomy — Serverless Container's Real Price TagWeek 7 · Day 3Next Week 7 Wrap-Up — Cementing It with 12 Container Scenario QuestionsWeek 7 · Day 5

Official references

  • SAP-C02 official exam page(opens in a new tab)
  • Amazon ECS · Fargate documentation(opens in a new tab)
  • Elastic Load Balancing documentation(opens in a new tab)
  • AWS Certificate Manager documentation(opens in a new tab)
  • Amazon EKS documentation(opens in a new tab)
  • Amazon API Gateway documentation(opens in a new tab)

On this page

  • Why Service Mesh Was Needed — Library Analogy
  • Three Services' Responsibility Map
  • AWS Cloud Map — Discovery's Foundation
  • ECS Service Connect — ECS's Standardized Lightweight Mesh
  • AWS App Mesh — Full-Featured Mesh and Its EOL
  • mTLS and ACM Private CA — Zero Trust Core
  • Canary Deployment — Weighted Routing and CodeDeploy Blue/Green
  • ALB, NLB, API Gateway and Mesh Responsibility Division
  • Service Mesh Comparison Across Clouds
  • Summary
  • Practice Questions
  • Today's Summary