Description
Creates a helper service that sends network requests on behalf of a client or consumer. It acts as a proxy that is co-located with the client.
Where to use
- Client-side load balancing. \n
- Smart routing. \n
- Circuit breaking logic on client side.
Real World Example
A legacy application needs to call a secure cloud API. An Ambassador proxy is installed on the localhost that handles the mTLS authentication, so the legacy app just calls localhost:8000.
Code Example
# Code Concept for Ambassador Pattern
# This pattern is architectural.
class Service:
def execute(self):
# Implementation logic
pass
