ApiGateway
- Entry point of incoming requests (ROUTING)
- TODO(Impl Security)
- Traffic control - loadbalancing ,ratelimiting, caching
- Observability (Monitoring, logging)
-
In-case of potentially-failing method calls - circuit breaker can be applied when a certain threshold is reached
-
resilience4j doc - (Circuit breaker, rate limiting, retry mechanism, bulk-heads)
-
The goal is to improve fault tolerance -> Make the system handle failures/ continue operating despite of failures
-
The main goal is to handle faults when they occur when calling remote microservices
-
The purpose is to prevent cascade of failures by providing a fallback mechanism whn services are down or experiencing issues
-
Cascading failures - failure of one service leads to failure of other service
-
Orchestration - service disc, failure handling
-
Dependencies:
- Gateway - To route APIS, provide security, monitoring/metrics, resiliency (Acts as a traffic cop)
- Eureka Client - Enable it to read data from the DiscoveryClient
- Config client - Read from config server
- Actuator - For application metrics (exposes operational information about the running application)
ConfigServer
- Dependencies: Config Server
- Centralize all configurations here
DiscoveryServer (Eureka) - service-registry
- Each new microService must be registered to the discovery server
- Dependencies include:
- Eureka Server
- Config Client
- SpringActuator(For metrics)
- ApiGateway uses discovery server to determine the running services
Business Services
- ProductService
- OrderService
- PaymentService (Paypal)
ZIPKIN
- For distributed tracing
- Run the latest image
docker run -d -p 9411:9411 openzipkin/zipkin