{"head":{"title":"What Are Microservices? Definition and Trade-offs | OceanLab","description":"Microservices split an application into small services that deploy on their own. When they help, what they cost to run, an example and the common mistakes.","canonical":"https://oceanlab.in/glossary/microservices"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"microservices","path":"/glossary/microservices"}],"slug":"microservices","term":"Microservices","aka":["microservice architecture"],"category":"System design","short":"A way of building an application as many small services, each owning one job and its own data, deployed independently.","body":[["In a microservices design, orders, billing, search and notifications might each be a separate service with its own code, database and release schedule. Services talk over APIs or a ",{"href":"/glossary/message-queue","text":"message queue"},". The opposite is a monolith: one codebase deployed as one unit."],["The split is about teams as much as code. Microservices let several teams ship without waiting on each other. The price is a distributed system: network calls that fail, data spread across stores and more to monitor."]],"why":["Microservices can speed up a large organisation and let busy parts scale on their own. For a small team they often slow things down, because every feature crosses service lines and every service needs its own deploys, alerts and on-call. The choice changes cost and delivery speed for years."],"example":["A marketplace starts as one app. Two years in, with five teams, payments releases keep getting blocked by search changes. They split payments into its own service with its own database, behind an ",{"href":"/glossary/api-gateway","text":"API gateway"},", and leave the rest as a monolith for now."],"inBuild":["We start most products as a well-structured monolith with clear modules, and split out a service only when a team, a scaling need or a compliance boundary asks for it. Each split comes with tracing and ",{"href":"/glossary/observability","text":"observability"}," so failures across services can be followed."],"mistakes":[["Starting with dozens of services on day one for a team of four."],["Sharing one database between services, which keeps them coupled while adding network calls."],["Splitting by technical layer (an API service, a database service) instead of by business area."]],"related":[{"href":"/glossary/api-gateway","label":"API gateway","detail":"A single entry point that sits in front of a system's APIs and handles routing, auth and limits for every request."},{"href":"/glossary/event-driven-architecture","label":"Event-driven architecture","detail":"A way of designing software where parts of the system publish events about what happened, and other parts react to them on their own."},{"href":"/glossary/message-queue","label":"Message queue","detail":"A buffer that holds messages, such as tasks or events, until a worker is ready to process them, so the sender does not have to wait."},{"href":"/glossary/container","label":"Container (software)","detail":"A package that holds an application and everything it needs to run, isolated from other software on the same machine."},{"href":"/glossary/kubernetes","label":"Kubernetes (K8s)","detail":"An open source platform that runs and manages containers across a group of machines: starting them, restarting them, scaling them and routing traffic to them."}],"tools":[{"href":"/tools/team-size-calculator","label":"Team size calculator","detail":"Free tool"}],"links":[{"href":"/embedded-engineers","label":"Embedded engineers","detail":"OceanLab engineers working inside your team."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}