Skip to content
Mustafa Erbay
Technology · 6 min read · görüntülenme Türkçe oku

Microservices Are Not Always The Right Answer

The allure of microservices in software architecture is strong, but twenty years of experience have shown me they're not always the right solution. On this.

100%

In my career, an architectural decision, swayed by the allure of the word “microservices,” ended up costing me far more than a line of code. For years, I’ve been building systems, managing networks, and developing enterprise software; one of the biggest misconceptions I’ve seen in this process is the belief that every project needs a microservice architecture.

In my opinion, while this architectural pattern provides incredible benefits in the right scenario, in the wrong hands or when applied unnecessarily, it can turn into an operational nightmare. As a system architect, I’ve experienced countless times how critical it is to weigh the pros and cons before blindly jumping into every new trend.

The Microservice Dream and Realities

The promises of microservices always sound appealing: independent teams, rapid deployment, technology diversity, flexible scalability. Enticed by these promises, I too embarked on this path for a medium-sized project at one point. The goal was to separate specific ERP modules (such as shipping or invoicing) into distinct services.

However, the realities were very different from the theory. The hidden dependencies between modules turned out to be much more complex than we anticipated. Deploying each service separately, managing CI/CD pipelines, and ensuring observability was many times more burdensome than the initial simple monolithic structure.

When to Use Monolith, When to Use Microservices?

The answer to this question is much deeper than the cliché “it depends.” In an ERP system for a manufacturing company, business workflows are often tightly coupled and proceed within a transaction chain. Here, a monolith or at least a well-modularized monolith structure might be much more sensible than dealing with the complexity of distributed transactions.

On the other hand, in a large Turkish e-commerce site, areas like product search, cart, payment, and order management can operate quite independently. Each might have its own scaling needs and different load profiles. In such a scenario, microservices can truly shine, because you can scale and deploy each service independently. I’ve also used microservice-like structures for the financial calculators of my own side product, which receive high traffic independently of the main backend.

Overlooked Costs and Operational Burden

One of the biggest challenges brought by microservices is the operational burden. Where you once managed a single PostgreSQL instance and a single Nginx reverse proxy, you now have to manage separate databases, Redis caches, Nginx configurations, and systemd units for each service. With Journald logs streaming from dozens of sources, even tracing a simple error becomes time-consuming.

While container orchestration (even with Docker Compose) alleviates this burden somewhat, I encounter new problems like container memory limits, disk I/O issues, or build OOM errors. Especially on the network side, issues like latency in inter-service communication, MTU/MSS mismatches, and hidden DNS problems present details you would never consider in a monolithic structure. Last month, in a client project, it took us days to discover that a simple API request was passing through dozens of different services and failing due to rate limiting or network timeout at each hop.

My Preference and Recommendation

Personally, I prefer a “modular monolith” approach for most projects. I start as a single deployable unit, but design its internal architecture with clear boundaries (domain boundaries) and well-defined interfaces. This allows me to implement patterns like event-sourcing or CQRS within the monolith.

If, over time, a specific section genuinely requires independent scaling, a different technology stack, or different team responsibility, then I can safely separate that piece. But this decision comes after a real need and a bottleneck proven by observability metrics, never just because “it’s the trend.”

So, what are your experiences on this topic? Have you ever been swayed by the allure of microservices in your career and regretted it, or, conversely, made the right decision? I’m curious to hear your thoughts in the comments.

Paylaş:

Bu yazı faydalı oldu mu?

Yükleniyor...

How was this post?

Frequently Asked Questions

Common questions readers have about this article.

I want to switch to a microservice architecture, but where should I start?
In my experience, those who want to transition to a microservice architecture should first determine the requirements and goals of their existing system. This includes analyzing the current system, identifying performance issues, and evaluating scalability requirements. Then, you should assess the advantages and disadvantages of microservice architecture and determine if this transition aligns with your business needs.
How should one choose between microservices and monolithic architecture?
In my view, you should make the choice between microservices and monolithic architecture based on the project's scale, complexity, and requirements. Microservices might be more suitable for large and complex systems, while monolithic architecture might be better for small and simple systems. Additionally, microservices offer more flexibility and scalability but require more complexity and management.
What are the biggest challenges in microservice architecture?
In my experience, the biggest challenges in microservice architecture have been managing inter-service communication, detecting and fixing errors, and ensuring system scalability. Furthermore, as microservices involve more services and components, security and management requirements also increase. Therefore, those transitioning to microservice architecture need to anticipate and plan for these challenges.
Which tools and technologies should I use to transition to microservice architecture?
My recommendation for transitioning to microservice architecture is to use tools like Containerization (e.g., Docker), Orchestration (e.g., Kubernetes), and API Gateway (e.g., NGINX). You can also use tools like Jenkins or GitLab CI/CD to manage CI/CD pipelines. However, the choice of tools and technology should be made based on the project's requirements and the team's expertise.
ME

Mustafa Erbay

Sistem Mimarisi · Network Uzmanı · Altyapı, Güvenlik ve Yazılım

2006'dan bu yana sistem mimarisi, network, sunucu altyapıları, büyük yapıların kurulumu, yazılım ve sistem güvenliği ekseninde çalışıyorum. Bu blogda sahada karşılığı olan teknik deneyimlerimi paylaşıyorum.

Kişisel Notlar

Bu notlar sadece sizde saklanır. Tarayıcınızda yerel olarak tutulur.

Hazır 0 karakter

Comments

Server-side AI Moderation

Comments are AI-moderated server-side and stored permanently.

?
0/2000

Server-side AI moderation

✉️ Free · No spam · Unsubscribe anytime

Get notified about new posts

New content and technical notes — straight to your inbox.

  • 📌
    Best of the week Single most-worth-reading post
  • 🔧
    Toolbox notes Real tools I used this week
  • 🧠
    Behind-the-scenes Notes that don't make it to blog

We don't spam. Unsubscribe anytime. · Tracked only by Umami (self-hosted, no Google).

Your Reading Stats

0

Posts Read

0m

Reading Time

0

Day Streak

-

Favorite Category

Related Posts