Api Design hard
Your organization debates API Gateway (Kong, Apigee) vs Service Mesh (Istio, Linkerd). When should you use a Service Mesh instead of an API Gateway?
- A When you need to implement edge-level rate limiting, request transformation, and API key management for high volumes of external traffic arriving from the public internet.
- B When you require fine-grained observability, automated mTLS, and advanced traffic control policies for internal service-to-service communication (East-West traffic).
- C When the infrastructure must support legacy SOAP-to-REST transformations for mobile clients while maintaining strict PCI-DSS compliance at the network edge.
- D When the organization decides to unify its ingress and internal routing logic into a single centralized middleware layer that minimizes the latency of the sidecar execution.
Answer: B. When you require fine-grained observability, automated mTLS, and advanced traffic control policies for internal service-to-service communication (East-West traffic).
While an API Gateway focuses on 'North-South' traffic (external clients to internal services), a **Service Mesh** (like Istio) manages 'East-West' traffic (service-to-service). It injects sidecar proxies to handle mTLS, detailed observability, retries, and circuit breaking for internal calls transparently, without requiring application code changes.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- You're designing a REST API for a blog. Which endpoint best represents 'get all comments for post 123'?
- A client wants to update only the 'status' field of an order, leaving other fields unchanged. Which HTTP method is most appropriate?
- A client calls POST /users with valid data, and the user is created. What status code should the server return?
- A client retries a failed 'POST /payments' request due to network timeout. The server receives the request twice. Without idempotency handling, what can happen?
- An API returns 10,000 products. Returning all in one response is impractical. Which pagination approach is simple and stateless?
- Your API serves both mobile apps and third-party integrations. Which authentication method is most appropriate?