Microservices Flashcards

1
Q

What is Monolithic Architecture and what are its advantages and disadvantages?

A

design of a software program which is composed of all in one piece.
Advantages:
1.Developing, testing and deploying the program is simple.
2.Scaling the program Horizontally is also simple.
Disadvantages:
1. For every small change we will have to deploy the whole program
2.Making changes to the program when its big and complex is not simple.
3.The application runtime is dependent on the application size.
4.Bug in the module can bring down the entire process

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

What is Microservices Architecture? What are its advantages and disadvantages?

A

Split the application into a set of smaller and interconnected services
Advantage:
1.Easier to understand and maintain
2.Services can be developed independently choosing their own technology that they wish
3.Independent deployment
4.Services can be scaled independently
Disadvantages:
1.Not simple to create a distributed system

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

What is a service mesh?

A

It is designed to handle a high volume of network based interprocess communication among application infrastructure services using APIS
In other words service mesh is a dedicated infrastructure layer that controls service-to-service communication over a network

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

What are the microservices application framework components?

A

1.API gateway
2.Resilience
3.Deployment strategies
4.Rolling updates

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

What is API gateway?

A

Takes an API request from client and and direct the requests to the responsible services.

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

What is Resilience in microservices? what resiliency patterns do u know?

A

It is when a microservice fails. There are resiliency patterns that help the application when a microservice fails.
1.timeout failure
2.circuit breaker

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

What is a service registry?

A

It is a database that contains the network location of service instances. It need to be highly available and always up to date.

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

What are the ways of registering a new service?

A
  1. self registering when a service is up or down
    2.with a 3rd party, a service manager tells the service to start or stop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Service discovery?

A

since Api gateway and service clients require to know the network location (ip) of the service, service discovery is a way to do that

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

What is Client-side service discovery? Advantages and disadvantages?

A

The client here is responsible to determining the network locations of the available service instances so he queries the service registry.
Pros:
Straightforward
cons:
1.It couples the client with the service registry
2.we will have to program it for each programming language used by service clients

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

What is server-side service discovery? Advantages and disadvantages?

A

The client make the request to a service via load balancer, the load balancer will then query the service registry and router each request to an available service instance.
Pros:
no need to program in every programming language….
Client and service registry aren’t coupled
Cons:
required load balancer

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

What are the deployment strategies? (4)

A

1.Multi services on each VM
2.One service on each VM
3.Multi services containers on each VM
4.One service container on each VM

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

What are the rolling updates? (4)

A

1.Ramped-slow rollout : Old version instances is decreased and new versions is increased until the number is reached.
2.Blue/Green: the green is deployed and after testing we update the load balancer to stop sending to blue and send to green.
3.Canary: Subset of users use new functionality
4.A/b testing: distributing traffic based on few parameters.

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