Skip to main content
    listerineh.dev
    • About
    • Experience
    • Projects
    • Skills
    • Blog
    • Talks
    • Contact
    • Why
    • About
    • Experience
    • Projects
    • Skills
    • Blog
    • Talks
    • Contact
    • Why

    © 2026 Sebastian Alvarez

    Back to Blog

    Let's Talk Microservices: Lessons Learned in the Real World

    I have split monoliths into microservices and merged microservices back into a monolith. Using a bank as the example: when they pay off, when they don't, and what to get right.

    Sebastian Alvarez

    September 1, 2025·6 min read·
    Loading...
    • Microservices
    • Architecture
    • Cloud
    • API Gateway
    • DevOps
    • Docker
    Let's Talk Microservices: Lessons Learned in the Real World
    Table of Contents

    I've been on both sides of this

    Over the years I've worked with pretty different architectures. I've refactored legacy CMSs into custom backends that later grew into microservices. I've joined big companies where microservices were the default from day one. And I've been on a project where going microservices too early was a mistake, and we ended up migrating back to a monolith.

    What all that taught me is boring but true: microservices are right or wrong depending on context. Used well, they give you flexibility, independent scaling and faster teams. Used badly, they give you a distributed monolith with extra network calls.

    My rule of thumb: start with microservices only when the domain is already well defined, in an established industry where you know upfront which parts need to scale and how responsibilities split. A banking core is the classic example. For most other projects, a monolith first and splitting later is the better bet.

    So I'll use a banking platform as the running example here, and go through what I look at when designing microservices: scaling, deploys, containers, data, security, standards, testing and, the one people forget, the team.

    Not every part of a bank is under the same load

    Picture a digital bank. Three modules, three very different workloads:

    • Transactions handles transfers and payments, potentially millions, in real time. It needs to scale, be closely monitored and tolerate failures.
    • User profile stores personal data and preferences. Important, but with a fraction of the traffic.
    • Notifications sends emails, push and alerts. It can spike, but it's mostly asynchronous.

    That's exactly where microservices pay off. You can scale the transaction engine on its own without paying for capacity the profile service will never use.

    Scaling up or scaling out

    There are two ways to give a service more capacity. Vertical scaling means a bigger machine: more CPU, more RAM, faster disks. It's simple, but there's a ceiling. Horizontal scaling means more instances of the same service behind a load balancer. In theory it barely has a limit, and microservices make it natural: at peak hours, you run more containers of the transactions service.

    In the bank, the profile service can probably live on one decent machine for a long time. Transactions is the one that needs to scale out.

    Deploying one thing without touching the rest

    One of the best arguments for microservices is deploying each service independently. Transactions might need several releases a day (fixes, compliance changes, new payment methods) while the profile service changes once a month. With separate deploys, nobody waits for anyone.

    The catch: this only works with solid CI/CD, good tests and proper API versioning. Without those, independent deploys become independent ways to break production.

    Containers and orchestration

    Docker gives every service the same environment from a laptop to production, dependencies included. That alone kills most "works on my machine" problems and makes onboarding easier.

    Kubernetes adds the orchestration: more transaction containers when traffic grows, rolling updates, restarting what crashes, and service discovery. For the bank, that's what lets a payday or Black Friday-style spike get absorbed without anyone being paged.

    Data: one database per service

    A very common mistake is having every service share the same database. It feels practical, and it couples everything: one schema change and three teams have to coordinate.

    Each service should own its data. Transactions owns the transaction history, the customer service owns customer records, and nobody reads anyone else's tables. Services talk through APIs or events. That also lets each one pick the right storage: a relational database tuned for financial records in transactions, maybe something more flexible for notifications.

    Security: designed centrally, enforced everywhere

    Instead of every service implementing its own authentication, the usual setup is:

    • OAuth 2.0 / OpenID Connect for centralized authentication
    • an API gateway that applies policies such as rate limits and IP allowlists
    • service-to-service authorization (OPA, a service mesh) for the internal trust boundaries

    In a bank this isn't optional. The notifications service should never be able to read account balances, and token scopes plus policies are what guarantee it.

    Standards, or integration hell

    Independent teams only stay compatible if they agree on a few things: the same response format across APIs, endpoint naming conventions, one way of returning errors, consistent logs, and a versioning strategy so clients don't break. It's not glamorous, but it's what makes integration predictable instead of a surprise every sprint.

    Testing is where it's won or lost

    With a monolith you run one test suite. With microservices you need layers:

    1. Unit tests inside each service, for example the fee calculation in transactions.
    2. Integration tests for how services talk to each other, often with mocks (a fake profile service while testing transactions).
    3. End-to-end tests for real flows across services: "a user transfers money, the balance updates and a notification goes out".

    For integration and E2E tests, teams usually spin up controlled environments with Docker Compose or a dedicated Kubernetes namespace. Contract testing tools like Pact help catch it when an API change would break another service.

    In my experience, the teams that invested in integration and E2E tests saved months of debugging later. The ones that didn't ended up with services that worked perfectly on their own and failed together.

    The team decides the architecture

    Conway's Law says your architecture ends up mirroring how your organization communicates, and it shows. If you have a transactions team, a profile team and a notifications team, microservices map onto that nicely. If you're three developers, ten microservices is ten things to deploy, monitor and keep in sync, with nobody to own them.

    I've seen both ends: big organizations where microservices let hundreds of developers work in parallel, and startups where the microservices dream slowed everything down because there simply weren't enough people to run it.

    So, when?

    Microservices are a tool, not a goal. They make sense when parts of the system have very different scaling needs, when independent deploys actually speed up the business, and when the team can keep up with standards, security and testing.

    Between migrating CMSs, scaling enterprise systems and occasionally rolling back to a monolith, what I keep coming back to is context. In large, well-understood domains like banking, they're a great fit. For a small product that's still figuring out what it is, they're overkill.

    What did you think?

    Loading reactions...

    Found this article helpful? Share it!

    Help others discover this content by sharing it on your favorite platform.

    Previous articleCoding Through Burnout: How Hobbies Helped Me HealNext articleFrom Junior to Senior: The Shift Nobody Tells You About

    Keep reading

    More Articles
    • January 14, 2026 · 8 min read

      Terraform: Scaling Infrastructure Without Breaking the Bank

      How I run dev, staging and prod from one Terraform codebase, size each environment for what it actually needs, and grow infrastructure only when the product does.

    • May 21, 2026 · 8 min read

      Floci: The AWS Local Emulator That Starts in 24ms and Costs $0

      When LocalStack went paid I tried Floci, a free, MIT-licensed AWS emulator. It starts in 24ms and runs real engines. How I use it with Terraform, and where it still falls short.

    • April 28, 2026 · 9 min read

      Observability When Code Ships Faster Than You Can Read It

      AI tools get code to production faster than ever. How Datadog, Splunk and Sentry changed the way I run backend, frontend and DevOps work, with the incidents that taught me why.

    Don't miss the next post

    Secure · Private · Unsubscribe

    listerineh.dev

    Full-stack engineer building AI agents, cloud platforms and web products. Based in Quito, working remotely.

    Open to new projects

    Work

    • Projects
    • Experience
    • Skills
    • Blog
    • Talks

    About me

    • About
    • Why Listerineh?
    • Contact

    Connect

    • GitHub
    • LinkedIn
    • Instagram
    • Email

    © 2026 Sebastian Alvarez · All rights reserved.

    • Privacy Policy
    • Terms of Use
    • Unsubscribe from the newsletter
    • Component Library