L6 - Monolithic vs. Microservice Application Architecture 2/2 Flashcards
Cons of client-side service discovery
- couples the client with the service registry
- implementation of client-side service discovery logic for each programming language and framework used by service clients
What is server-side discovery?
- client requests a service via a load balancer
- the load balancer queries the service registry and routes each request to an available service instance
Example of server-side service discovery
AWS Elastic LB
Pros of server-side discovery
- details of the discovery are abstracted away from the client
- eliminates the need to implement discovery logic for each programming language and framework used by your service clients
Cons of server-side discovery
- requires load balancer
Immediate failure
Timeout fialure
Cascade failure
Timeout Failure Solution
order service stops calling for some time. Then calls to the payment service are allowed partially.
What is a circuit breaker?
It intercepts all requests from the order service to the payment service.
How does the circuit breaker work?
What is ramped - slow roll out?
the number of instances of the old version is decreased and the new version is increased until the correct number of service instances is reached
Pros of ramped - slow roll out?
- version is slowly released across instances
- convenient for stateful applications that can handle rebalancing of the data
What is a stateful application?
Stateful applications save data to persistent disk storage for use by the server, by clients, and by other applications.
What are the cons of a ramped - slow roll out?
- rollout/rollback can take time
- supporting multiple APIs is hard
- no control over traffic