Microservices or monolith
easy 28 minA monolith is one program, built and released as a whole.
Check yourself
One question at a time. Each answer explains why.
Question 1 of 10
What characterises a monolith?
Which pattern stops calls to a service that keeps failing?
Which is a cost of microservices?
How do microservices usually talk to each other?
Which project suits a monolith best?
Three services are always released on the same day because they share tables. This is:
A request needs five services, each up 99.9% of the time. The request path is up about:
What does the first phase of the strangler fig add?
Ten copies of a monolith run only to serve more orders. What is mainly wasted?
The payment service is down. The shop keeps accepting orders when:
Pick an answer to see why.
Not quite. One unit of release, usually with a shared database. It may run as many copies.
Not quite. After a threshold it opens and fails fast, so that callers do not pile up.
Not quite. More deployments, networks, data stores and things to observe.
Not quite. REST or gRPC when an answer is needed, events and queues when it is not.
Not quite. A small team and a new domain. There is nothing to coordinate and boundaries are still unknown.
Not quite. It has the network of one style and the coupling of the other.
Not quite. 0.999 to the fifth power is about 0.995, if failures are independent.
Not quite. The facade lets you route a part of the traffic to the new service later.
Not quite. Any copy serves any request, so CPU is used. The idle modules still occupy memory and connections.
Not quite. Isolation needs a design in which the request does not need the failed part now.
Flashcards
Say your answer, then reveal it.
Card 1 of 11
What is a monolith?
An application that is built, tested and released as one unit.
Say your answer, then reveal it.
What are microservices?
Small services, each with its own process, release and data, that work together.
Say your answer, then reveal it.
What is a modular monolith?
One program whose modules use each other only through public interfaces.
Say your answer, then reveal it.
SPLIT?
Single responsibility, Polyglot, Loose coupling, Independent release, Team ownership.
Say your answer, then reveal it.
Can a monolith run on many machines?
Yes: several copies of the whole behind a load balancer.
Say your answer, then reveal it.
Availability of five 99.9% services in a chain?
About 99.5%.
Say your answer, then reveal it.
What is a distributed monolith?
Services that must be released together.
Say your answer, then reveal it.
Strangler fig in four phases?
Add a facade, extract a service, move traffic bit by bit, retire the old code.
Say your answer, then reveal it.
What does each service own?
One business job and its data.
Say your answer, then reveal it.
When do you split?
When teams block each other, or one part needs its own scale or safety, and you can run a platform.
Say your answer, then reveal it.
How do you debug across services?
With a trace id and distributed tracing.
Say your answer, then reveal it.
These cards come back in Today, just before you would forget them.