VL 6 Flashcards

1
Q

Monolithic App architecture

A

Design of a software Program which is composed of all in one piece

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

Benefits of monolithic architecture

A

Easy to develop
Simple to test
Simple to deploy
Easy horizontal scaling

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

Disadvantages of monolithic architecture

A

Limitation in size and complexity
Too large and complex
Slow start time
Re-deployment of complete app on updates
Reliability

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

Micro services architecture

A

Single logical db per service
Built and deployed independently
Scalable
Stateless ( complete request and forget it)

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

Advantages of micro services

A

Easier to understand and maintain
Independence of service
No barrier on adopting new technologies
Independent service deployment
Each service scaling

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

Disadvantages of micro service

A

Complexity of creating a distributed system
Deployment complexity ( need to implement service discovery mechanism)

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

Service Mesh

A

Configurable, low latency infrastructure layer
Handle a high volume of network based interprocess communication among application infrastructure services using API

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

Micro services Application Framework Components: API Gateway

A

Server that is the single entry point into the system
Encapsulates internal system architecture and provides APU that is tailored to each client

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

API Gateway: backends for frontends pattern

A

Defines separate API Gateway for each client

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

Service Registry

A

Db containing. The network location of service instances

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

Service Registration

A

Self registration: directly to service registry
3rd party registration: through service manager

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

Service discovery: problem

A

In micro services app, each service instance is assigned IP Adress dynamically because of Autoscaling, failures, upgrades

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

Client-side service discovery

A

Clients are responsible for determining the network locations of available service instances
Client queries a service registry
Client uses a load balancing algorithm to select one of the available instances and makes a request

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

Client side service discovery: pros

A

Straightforward, no moving parts except of service registry
Client can make intelligent application-specific load balancing decisions as it knows about available services instances s

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

Client side service discovery: Cons

A

Cons:
• 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
16
Q

Server Side discovery

A

Client makes request to a service via load balancer
Load balancer queries the service registry and routes each request to an available service instance

17
Q

Server side service discovery: pros&cons

A

Pros:
• details of 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:
• Requires load balancer

18
Q

Basic request flow

A

For each request there is assigned thread responsible for getting data and send response back to the client
Thread is freed after response is sent to user

19
Q

Immediate failure

A

Wrap the code in Order service around try catch block to handle exceptions.
Thread freed quickly after response is sent to user

20
Q

Timeout failure

A

All requests are waiting for response when payment service is overloaded or crashed
Reason: unconfigured timeout value

21
Q

Cascading failure

A

At high requests rate all threads are waiting

22
Q

Timeout failure: solution

A

Have default response to immediately return to keep the thread pool free

Add interceptor for all requests
Allow: change status after few failed requests in a time and after timeout check again
Problem: can be that service is still down => you get overload in payment service and want to know the reason( service down/ too many requests)

Allow partial with circuit breaker

23
Q

Micro services App deployment: multiple services instances per VM

A

All resources are shared: cpu, memory, VM

24
Q

Micro services app deployment: service instance per VM

A

Pay for resources you don’t use

25
Q

Micro services app deployment:
Multiple services containers per VM

A

Deploy with containers

26
Q

Micro services app deployment:
Service container per VM

A

Easily move from one machine to another, allows scalability

27
Q

Rolling updates: ramped

A

slow rollout

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.

Pro:
- version is slowly released across instances
- convenient for stateful applications that can handle rebalancing of the data
Cons:
- rollout/rollback can take time
- supporting multiple APIs is hard
- no control over traffic

28
Q

Rolling updates: blue/green

A

Blue/Green
The “green” version of the application is deployed alongside the “blue” version.
After testing that the new version, update the load balancer to send traffic to the new version

Pro:
- instant rollout/rollback
- avoid versioning issue
Cons:
- requires double the resources
- proper test of the entire platform should be done before releasing to production

29
Q

Rolling updates: canary

A

A canary deployment consists of routing a subset of users to a new functionality.
For example: end 25% of traffic to new version

Pro:
- version released for a subset of users
- convenient for error rate and performance monitoring
- fast rollback

Cons:
- slow rollout
- fine tuned traffic distribution can be expensive

30
Q

Rolling updates: A/B testing

A

A/B testing
Distributing traffic amongst versions based on a few parameters (cookie, user agent, etc.).

Pro:
- intelligent load balancer
- several versions run in parallel
- full control over the traffic distribution

Cons:
- hard to troubleshoot errors for a given session, distributed tracing becomes mandatory
- not straightforward, you need to setup additional tools