Software Patterns Flashcards
(3 cards)
Explain the ambassador pattern?
Always focused on network proxying
You would use a separate container or services component to offload tasks that would otherwise have to be performed by the components. For separation of concerns, these could include tasks such as circuit breaker, security, logging, and metrics.
Separation of concerns
Service Discovery: The Ambassador handles discovering the actual location of a service, so the main application only needs to connect to localhost.
Load Balancing: Distributing requests across multiple instances of an external service.
Circuit Breaking and Retries: Implementing resilience patterns for external calls.
TLS Termination/Encryption: Managing secure connections to external services.
Protocol Translation: Converting between different communication protocols.
Centralized Authentication/Authorization: Handling security concerns for outbound calls.
Explain the sidecar pattern?
Helper for the primary component.
A sidecar is always alongside the main container; its purpose is to offload tasks from the primary container.
It shares the same life cycle.