Back to Blog
Development
February 10, 2025
5 min read
885 words

Why We Abandoned Microservices for a Monolith: A Story of Simplification

We spent two years decommissioning our distributed system. We deleted Kubernetes. We fired our service mesh. And we have never been faster. The controversial case for the Modular Monolith in 2026.

Why We Abandoned Microservices for a Monolith: A Story of Simplification

The Great Unbundling (and Rebundling)

It started, as most architectural tragedies do, with a slide deck. The year was 2023. Our startup was growing. We had 20 engineers. We had a Ruby on Rails monolith that worked perfectly fine, but Hacker News told us it was a "ball of mud." We felt the itch. The itch to be "scale-ready." The itch to be Netflix.

So, we split. We split the User Service. We split the Billing Service. We split the Notification Service. By 2024, we had 15 engineers and 45 microservices. We had Terraform scripts longer than our actual business logic. We had a "DevOps Team" that consisted of three people whose entire job was trying to figure out why the staging environment was broken again.

Fast forward to 2026. We have abandoned it all. We are back to a Monolith. And it is glorious.

The Hidden Tax of Distributed Systems

Microservices are not free. They charge a tax on every single interaction. Not just a latency tax (though that is real), but a cognitive tax.

In our microservices era, adding a simple feature like "Users can apply a discount code" involved:

  • Updating the CouponService API definition.
  • Updating the CheckoutService to call the new API.
  • Updating the Frontend to handle the error states if CouponService timed out.
  • Deploying three different services in a specific order.
  • Debugging a distributed tracing log because the CouponService couldn't talk to the AuditLogService due to a firewall rule change.

In our monolith? It's a function call. CouponManager.apply(user, code). Transactional integrity is guaranteed by the database, not by a saga pattern implemented in three different queues.

The "Scale" Fallacy

Everyone thinks they are Google. You are not Google. I am not Google. We do not have Google's problems. We have "trying to find product-market fit" problems. We have "trying to ship before we run out of runway" problems.

Microservices solve a specific problem: Organizational scaling, not just technical scaling. They allow 500 engineers to work without stepping on each other's toes. When you have 20 engineers, microservices essentially put each developer in a solitary confinement cell and ask them to communicate via HTTP calls.

The Technical Migration: Back to Boring

The migration back wasn't easy. We called it "Project Lazarus."

Step 1: The Logical Consolidation

We didn't just copy-paste code. We started by treating our services as libraries. We moved the code into a monorepo (we were already there, thankfully). We replaced HTTP clients with in-process method calls.

// Before: The Microservice Way
async function checkInventory(sku: string): Promise {
  try {
    const response = await httpClient.get(`http://inventory-service/items/${sku}`);
    return response.data.available > 0;
  } catch (error) {
    logger.error("Inventory service down", error);
    // Do we retry? Do we fail open? Do we fail closed?
    throw new ServiceUnavailableError();
  }
}

// After: The Monolith Way
async function checkInventory(sku: string): Promise {
  // It's just a database query. 
  // If the DB is down, the whole app is down, and that is FINE.
  const item = await db.items.findUnique({ where: { sku } });
  return item && item.quantity > 0;
}

Step 2: Database Unification

This was the hardest part. We had 12 Postgres instances and 4 Redis clusters. We used a "strangler fig" pattern in reverse. We created a master schema and used foreign data wrappers (FDW) initially to link data, then slowly migrated tables into the primary instance.

The Results: 2026 Metrics

Since moving back to the monolith (we call it the "Modolith" - Modular Monolith), our metrics have transformed:

Metric Microservices (2024) Monolith (2026)
Average Feature Lead Time 14 days 3 days
Deployment Duration 45 mins (sequence dependant) 8 mins
Infrastructure Cost $12,500/mo $3,200/mo
On-Call Incidents 8-10 per week 1-2 per month

The Joy of "Go to Definition"

Do not underestimate the power of your IDE. In a microservices architecture, "Go to Definition" stops at the API client boundary. You are left staring at a Swagger definition (if you are lucky) or guessing.

In our monolith, I can Command-Click from the Controller all the way down to the deepest utility function. I can refactor a method signature and know—with 100% certainty—that the compiler will catch every breakage across the entire system. That confidence is velocity.

When Should You Actually Split?

We aren't dogmatic. We know there might be a day we need to split something out. But our criteria have changed. We don't split by "domain" (User, Billing). We split by resource characteristics.

Example: We have a PDF generation engine. It consumes massive CPU and leaks memory like a sieve. It crashes often. That is a microservice. It lives outside the monolith because it is a noisy neighbor. But the core business logic? That stays together.

Conclusion: embrace the Monolith

In 2026, the pendulum has swung. The "Modern Stack" isn't about how many moving parts you have; it's about how quickly you can deliver value. For 99% of companies, the most efficient architecture is a well-structured, modular monolith.

We abandoned the complexity. We abandoned the resume-driven development. We built a boring system. And we have never been happier.

Further Reading

  • "Get Your Staging Environment Back" - Engineering Blog
  • "The Death of Microservices" - Primeagen (2025)
  • "Designing Data-Intensive Applications" - Kleppmann (Always relevant)

Author's Note: This article was written by the CTO of XQA, reflecting on our 3-year journey through architectural hell and back.

Tags:DevelopmentTutorialGuide
X

Written by XQA Team

Our team of experts delivers insights on technology, business, and design. We are dedicated to helping you build better products and scale your business.