Free tech learning for everyone, from basics to pro

Enterprise ArchitectureSystems ArchitectureIntermediate

Monoliths, SOA and microservices

In short: A monolith is one application deployed as a single unit. Service-oriented architecture (SOA) splits functions into shared enterprise services, often joined by an enterprise service bus. Microservices go further, with small, independently deployed services that own their data. Each step adds flexibility and operational complexity.

Three ways to structure an application

Three architecture stylesApplication designhow code is splitMonolithone deployable unitSOAshared services, ESBMicroservicessmall, independent
Figure 1. The styles differ mainly in how an application is split up and deployed.

A monolith packages all features, such as login, catalogue, orders and payments, into one program that is built, tested and deployed together. It usually shares one database. Many successful systems start this way because it is simple to develop and run.

Service-oriented architecture (SOA) became popular in the 2000s. Large enterprise functions, such as "customer" or "billing", are exposed as reusable services, often using SOAP and XML. An enterprise service bus (ESB) sits in the middle, routing and transforming messages between them. SOA improved reuse across departments, but the central bus could become a bottleneck and a single team's responsibility.

Microservices split an application into small services, each focused on one business capability, owned by one team, deployed independently and owning its own data. They talk through lightweight APIs (often REST or gRPC) or events, and run on containers and orchestrators such as Kubernetes. Logic lives in the services ("smart endpoints, dumb pipes"), not in a central bus.

Comparing the trade-offs

Monolith versus microservicesMonolithOne codebase, one deploySimple to test and runScale the whole appIn-process callsOne shared databaseMicroservicesMany small servicesComplex operationsScale each serviceNetwork API callsDatabase per service
Figure 2. Microservices trade simplicity for independent scaling and deployment.
ConcernMonolithSOAMicroservices
DeploymentAll at oncePer service, often coordinatedEach service independently
CommunicationIn-process function callsESB, SOAP/XMLREST, gRPC, message queues
DataOne shared databaseOften sharedDatabase per service
Failure impactOne bug can stop everythingBus failure affects manyIsolated if designed well
Operational effortLowMediumHigh: monitoring, tracing, automation

Network and security implications

Moving from a monolith to microservices turns internal function calls into network traffic. That changes the engineer's job:

  • More east-west traffic: services talk to each other inside the data centre or cluster, so internal segmentation and policies matter as much as the perimeter.
  • Service-to-service authentication: each call should be authenticated, often with mutual TLS (mTLS) issued by a service mesh, plus authorisation per API.
  • API gateway: a single entry point for external clients that handles authentication, rate limiting and routing.
  • Observability: you need central logs, metrics and distributed tracing to follow one request across many services.
  • Larger attack surface: more APIs, images and dependencies to scan and patch.

Choosing and migrating

Microservices are not automatically better. For a small team or a new product, a modular monolith, a single deployable app with clean internal boundaries, is often the best start. Move to microservices when you have clear reasons, such as parts that need very different scaling, teams blocked by a shared release, or very different technology needs.

To migrate, many teams use the strangler fig pattern: put a routing layer in front of the monolith and move one capability at a time into a new service, until the old code can be retired.

Tip: a "distributed monolith" is the worst of both worlds: many services that must still be deployed together because they share a database or call each other synchronously in long chains. Watch for this warning sign.

Practice

What role did an enterprise service bus play in SOA?
It routed, transformed and mediated messages between services, acting as a central integration hub.
Why do microservices increase the need for internal network security?
Many internal API calls cross the network (east-west traffic), so each needs authentication, encryption and segmentation rather than relying on a perimeter.
What is the strangler fig pattern?
A gradual migration where a routing layer sends traffic for one capability at a time to a new service, until the old monolith can be removed.

Key takeaways

  • Monoliths are simple to build and run but scale and deploy as one unit.
  • SOA shares enterprise services through a central bus such as an ESB.
  • Microservices are small, independent and own their data.
  • Microservices need mTLS, API gateways, segmentation and good observability.
  • Start modular, migrate gradually with the strangler fig pattern.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.