F10 Flashcards
What is a Micro Service?
A microservice is a small, autonomous, and self-contained service that is part of a larger system. Microservices Architecture is an architectural style where an application is divided into small, independent services that can be developed, deployed, and maintained separately.
– Componentization via services
– Organized around business capabilities
– Products not projects
– Smart endpoints and dumb pipes
– Decentralized governance
– Decentralized data management
– Infrastructure automation
– Design for failure
– Evolutionary design
What is advantages/dis advantages of Monolithic Applications?
Advantages:
- Suitable when working with tiny applications
- Helpful when one programmer or a team writes the code
Disadvantages:
- Adding new feature also takes a long change cycle
- Continuous deployment is difficult and risky
- Tight coupling
- Understanding and changing the system can be difficult
- Scaling and maintaining is difficult – when systems grow they become complex and
difficult to scale and maintain
What is a Monolithic Applications?
Everything is deployed as an executable binary where
everything is is done as a single program, having several modules in one software application.
What is advantages/dis advantages of Micro Services?
Advantages:
– Addresses the shortcomings of monolithic applications, such as scalability, maintainability and adaptability
– Testability
– Lightweight mechanism
– Microservices evolved from real-world use cases to do SOA effectively
Disadvantages:
– Increased complexity <– difficult integration task
– Testing difficulties testing across several interacting services becomes complex
– Network performance overheads compared to monolithic applications
– Deployment across multiple interacting services becomes complex as system grows
Synchronous vs. Asynchronous Communication in Microservices
Synchronous - One microservice calls another service and waits for a response.
Ex. A payment service calls an order service to confirm a purchase and waits for the response before proceeding.
Asynchronous - A service sends a message/event and doesn’t wait for a response.
Ex. A user registration service sends an event to a notification service to send a welcome email, but continues working without waiting for confirmation.