AWS App Mesh のアイコン

AWS App Mesh Specialized2018年〜

A service mesh that controls and monitors communication between microservices

What It Does

AWS App Mesh is a service mesh that centrally controls and monitors network communication between microservices. It places a sidecar proxy (Envoy) alongside each service, enabling traffic routing, retries, timeouts, and circuit breakers without modifying application code. It supports services running on ECS, EKS, and EC2.

Use Cases

App Mesh is used for visualizing service-to-service communication in microservices architectures, canary deployments (gradually shifting traffic to new versions), and automatic retry and fallback control during failures. It's especially effective in environments where the number of services has grown and communication management has become complex.

Everyday Analogy

Think of it like an airport control tower. When numerous aircraft (microservices) are coming and going, the control tower (App Mesh) tracks all flight paths (communications) and directs safe routes. During bad weather (failures), it also guides aircraft to alternate routes (retries/fallbacks) to prevent collisions (communication failures).

What Is App Mesh?

AWS App Mesh is a service mesh for managing communication between microservices. In a microservices architecture, many small services collaborate over the network. As the number of services grows, controlling communication and handling failures becomes complex. App Mesh centrally manages all service communication, providing unified routing, monitoring, and failure handling.

Communication Control with Envoy Proxy

App Mesh places an Envoy proxy as a sidecar alongside each service. Since all service-to-service communication passes through this Envoy proxy, you can add communication controls without changing application code. Retry counts, timeout durations, and health check settings can be managed centrally from the App Mesh console or API, eliminating the need for per-service implementation.

Traffic Routing

App Mesh's routing features let you flexibly control traffic distribution. For example, you can run canary deployments that send only 10% of traffic to a new service version, or perform A/B testing that routes to specific versions based on HTTP header values. If problems occur, you can immediately shift traffic back to the old version. To deepen your understanding of traffic routing, related books on Amazon are also helpful.

Getting Started

In the App Mesh console, create a mesh and define virtual services, virtual nodes, and virtual routers. Add an Envoy sidecar container to your ECS task definition and integrate it with App Mesh. Integrate with CloudWatch and X-Ray to visualize metrics and traces for service-to-service communication. Starting small with 2-3 services is recommended.

Things to Watch Out For

  • App Mesh itself is free, but the Envoy sidecar container requires additional ECS/EKS compute resources
  • Introducing a service mesh adds operational complexity, so it may be overkill when you have few services. Consider adopting it only when communication management becomes a challenge
  • Use the Envoy proxy version recommended by App Mesh. Incompatible versions may not function correctly
共有するXB!