CSE Roadmap

Core tier · about 4 hours · 8 parts

Part 7 of 8 · 3 min read

When not to use them

Honest conditions for saying no.

When not to use microservices

BM says plainly that the style is no silver bullet, and a bad choice as a golden hammer. Every cost from section 3 applies. So the style is a poor fit when:

  • The team is small or new to the domain. The boundaries are unknown, and wrong boundaries are costly to move. Page 6 shows a real story of this.
  • There is little automation. Without automated deployment, testing and monitoring, many services means many manual jobs.
  • Strict consistency matters across areas. If the business needs several entities to change atomically all the time, the services are really one service.
  • Speed per request is the top need. FSA rates performance as the weak point, since every call crosses a network and a security check. Caching and data copies reduce this but add their own work.
  • The organisation is not ready. If teams still need approval from another team to ship, the independence is imaginary.

FSA's ratings give the other side. The style scores highest on scalability, elasticity and evolutionary change (it helps a business change quickly). It scores well on deployability and testability, because it grew from the DevOps movement. Fault tolerance is high when services are independent, and drops if they call each other too much. FSA also says microservices has the most separate quanta (page 4) of any modern style. The exact star values are in the book's figure and are not repeated here.

For the curious For the curious

The monolith-first idea: many practitioners start with a well-structured modular monolith (page 3) and split a part off only when a clear need appears, such as one area that must scale alone or be owned by a separate team. This idea is not from the two books used here. It is common practice and is the subject of page 8.

Interview angle

Answer in your head first, then open it.

When would you choose microservices?

When several teams must release independently, parts of the system have very different scaling or reliability needs, and the organisation can run many deployments with good automation.

What is the biggest risk?

Boundaries drawn wrongly, which leads to chatty services and cross-service transactions.

How do you keep services independent?

Own data per service, no shared schema, and stable interfaces. Share operations in a sidecar, not business code.

How do you handle a transaction across services?

First check whether the boundary is wrong. If not, use a saga with compensating steps, and keep them rare.

Check yourself: 1. A team of five, with no automated deployment, plans 20 services. Give two reasons to slow down. 2. Which rating is the weak point of the style, and why? 3. Why does the style appear to need DevOps practices?

Words you will meet

Word Meaning
Microservice A small, independently deployed service that owns its data
Bounded context A boundary inside which a model and its data are private
Bulkhead A wall that stops a failure from spreading
Saga A multi-service operation with undo steps instead of one transaction
Compensating transaction A request that reverses an earlier step
Sidecar A shared helper beside each service for operations work
Service mesh The connected sidecars, giving one view of all services
Service discovery A lookup that finds live instances of a service
Choreography Services react to each other's events with no coordinator
Orchestration One service runs the whole flow
Microfrontend A screen component supplied by each service
Service ownership One team responsible for a service from change to production