Microservices Questions Flashcards
What do you understand of Microservices?
An architectural style that structures an application as a collection of services that are:
- Highly maintainable and testable
- Loosely coupled
- Independently deployable
- Organized around business capabilities
- Owned by a small test
What is event driven architecture?
Is a software architecture and model for application design. With an event-driven system, the capture, communication, processing and persistence of events are the core structure of the solution. This differs rom a traditional request driven Model.
Event driven enables minimal coupling which makes a good option for modern distributed apps. architecture.
What’s an event?
Any significant occurrence or change in state in a system.
How does event driven architecture work?
It’s made up of event producers and consumers. An event producer detects or senses an event and represents the event as a message. It does not know about the consumer of the event or the outcome.
The event processing platform will execute the correct response to an event and send the activity downstream to the right consumers
What are the types of event-driven architecture models?
Pub/Sub model. After an event occurs, or is published, it is sent to subscribers that needs to be informed.
Event streaming model. Events are written to logs. Events consumers don’t subscribe to an event stream. Instead, they can read any part of the stream and can join the stream at any time.
What are the main features of microservices?
- Multiple individually deployable components
- Service distribution based on business capabilities
- Decentralized data management
- DevOps implementation
- Technical independence
- Hidden component complexity
How does the microservice architecture work?
Under microservice, an application is simplified into multiple modules that independently perform a single precise task
What are the benefits of microservices?
- Improves modularity
- reduce complexity by making smaller code bases per microservice
- allow you to update functionalities with minimal or no impact on the other parts of the system
- greatly reduces the chances of breaking something unrelated to the system
- more collaboration between teams
- enables continuous delivery
- can be deployed independently
- highly scalable
What are the disadvantages of microservices?
- Complicated as a whole
- requires accurate planning
- modular dependencies are hard to calculate
- complete end-to-end testing is hard
- deployment challenges
What is Domain Driven Design?
Is an architectural style based on Object-Oriented Analysis design concepts and principles. It helps developing a complex system by connection the related components of the software system and continuously evolving the system.
Based on three principles:
- Focus on core domain and domain logic
- base complex designs on models of the domain
- regularly collaborate with the domain experts to improve the application model and resolve any emerging domain-related issues
What is Restful API?
Is a Web API ( Application Programming Interface) or service that is based on REST(representational state transfer).
What is REST?
defines how clients communicate with the API over HTTP. Client requests generally consists of Http verb, URI, Request Headers
What is an API Gateway?
An API Gateway creates a unified entry point that clients applications can use to access microservices. Acts as a reverse proxy that routes the HTTP requests that are made by the clients to the desired backend microservice. They also have important functions such as client auth, SSL, load balancing.
Why do we need CQRS?
Generally data is more queried than altered. Separating commands and queries allows us to optimize each for high performance
What is SAGA pattern?
Design Pattern solution for implementing transaction in form of sagas that span across two or more microservices. When one transaction in the saga fails, that saga executes a series of compensating transactions to undo the changes