Design: Microservices Communication with Ambassador Pattern
Design focuses on the ambassador pattern as a proxy sidecar for microservices to external services. It excludes internal microservice business logic and database design.
Functional Requirements
FR1: Enable microservices to communicate with external services securely and reliably
FR2: Handle retries, timeouts, and circuit breaking for external calls
FR3: Allow easy configuration and updates without changing microservice code
FR4: Support logging and monitoring of external service calls
FR5: Ensure minimal latency overhead for service-to-service communication
Non-Functional Requirements
NFR1: System must handle 10,000 requests per second
NFR2: API response latency p99 should be under 300ms including ambassador overhead
NFR3: Availability target of 99.9% uptime
NFR4: Must support multiple external services with different protocols
NFR5: Deployment should allow independent scaling of ambassador components