L6 - Monolithic vs. Microservice Application Architecture 2/2 Flashcards

1
Q

Cons of client-side service discovery

A
  • couples the client with the service registry
  • implementation of client-side service discovery logic for each programming language and framework used by service clients
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is server-side discovery?

A
  • client requests a service via a load balancer
  • the load balancer queries the service registry and routes each request to an available service instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Example of server-side service discovery

A

AWS Elastic LB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Pros of server-side discovery

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cons of server-side discovery

A
  • requires load balancer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Immediate failure

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Timeout fialure

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cascade failure

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Timeout Failure Solution

A

order service stops calling for some time. Then calls to the payment service are allowed partially.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a circuit breaker?

A

It intercepts all requests from the order service to the payment service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does the circuit breaker work?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is ramped - slow roll out?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Pros of ramped - slow roll out?

A
  • version is slowly released across instances
  • convenient for stateful applications that can handle rebalancing of the data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a stateful application?

A

Stateful applications save data to persistent disk storage for use by the server, by clients, and by other applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the cons of a ramped - slow roll out?

A
  • rollout/rollback can take time
  • supporting multiple APIs is hard
  • no control over traffic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Blue/Green?

A
  • the green version of the application is deployed alongside the blue version. After testing the new version, update the load balancer to send traffic to the new version.
17
Q

Pros of Blue/Green?

A
  • instant rollout/rollback
  • avoid versioning issues
18
Q

Cons of Blue/Green?

A
  • requires double the resources
  • proper test of the entire platform should be done before releasing to production.
19
Q

What is canary deployment?

A
  • a canary deployment consists of routing a subset of users to a new functionality
  • e.g. 35% of traffic to new version
20
Q

Pros of Canary

A
  • version released for a subset of users
  • convenient for error rate and performance monitoring
  • fast rollback
21
Q

Cons of Canary

A
  • slow rollout
  • fine-tuned traffic distribution can be expensive
22
Q

What is A/B testing?

A
  • distributing traffic amongst versions based on a few parameters (cookie, user agent, etc.)
23
Q

Pros of A/B testing

A
  • intelligent load balancing
  • several versions running in parallel
  • full control over the traffic distribution