Building Microservices - Sam Newman Flashcards
What are Microservices?
Fine grained services, with their own lifecycle, built around a business capability, that collaborate together.
What is the programming principle that Microservices better enforce?
Decoupling (a change to one service should not require a change in another)
Why are Microservices good to test new technologies?
The biggest barrier in adopting new technologies on monolithic systems is the risk associated in changing the whole system.
With Microservices one can choose a service the is low risk to test new technologies.
How can Microservices improve system resilience?
Because when a well designed Microservice fails, it can degrade just part of the system, not everything.
How can Microservices improve scaling?
Because with Microservices one can scale business capabilities independently.
What is the difference between SOA and Microservices?
Deep down they want the same thing: to break monoliths and tackle the problems associated with then.
The difference is that SOA was pretty much driven by Middleware and Tools vendors, that wanted to push their solutions and make money. Microservices arose from real world architectural discussions and solutions for the monolith problem.
How can Microservices improve software deployment?
Changes can be smaller and deploys can be smaller and safer.
What are the 3 main challenges of Microservices over Monoliths?
Deployment coordination is harder
Distributed transactions may appear
Eventual consistency
(revise this after finishing book)
What can help us frame our architectural decision making?
Defining the strategic goals and principles that help us achieve those goals.
Ex:
strategic goal: expand to 30 new countries
principle: every service must be born internationalized
What are two good strategies for encouraging best architectural practices?
Using one real-world service as examplar.
Creating project templates for new services.
What is Hystrix?
It is a circuit breaker library by Netflix that allow to wrap every request to an external service in order to prevent failures and latency to impact the whole system.
In a simple way, what is technical governance?
Is about ensuring that the teams are following the technical vision.
What is a bounded context?
A specific responsibility enforced by explicit boundaries (interface)
Getting service boundaries wrong can be very costly. What is a strategy to mitigate that risk?
Starting with a monolith and define the bounded contexts inside the Monolith. Divide them with modules and once things stabilize, extract the module to a Microservice.
Why you should think about capabilities and not just data to define a service/bounded context?
Because capabilites defines what a service do to other part of the business. Thinking only about data may lead to anemic crud based services.