Microservices Flashcards
What is Monolithic Architecture and what are its advantages and disadvantages?
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
What is Microservices Architecture? What are its advantages and disadvantages?
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
What is a service mesh?
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
What are the microservices application framework components?
1.API gateway
2.Resilience
3.Deployment strategies
4.Rolling updates
What is API gateway?
Takes an API request from client and and direct the requests to the responsible services.
What is Resilience in microservices? what resiliency patterns do u know?
It is when a microservice fails. There are resiliency patterns that help the application when a microservice fails.
1.timeout failure
2.circuit breaker
What is a service registry?
It is a database that contains the network location of service instances. It need to be highly available and always up to date.
What are the ways of registering a new service?
- self registering when a service is up or down
2.with a 3rd party, a service manager tells the service to start or stop
What is Service discovery?
since Api gateway and service clients require to know the network location (ip) of the service, service discovery is a way to do that
What is Client-side service discovery? Advantages and disadvantages?
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
What is server-side service discovery? Advantages and disadvantages?
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
What are the deployment strategies? (4)
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
What are the rolling updates? (4)
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.