DEV Community

Cover image for Microservices vs. Monolith: What’s Best for Your Next Big Project?

Microservices vs. Monolith: What’s Best for Your Next Big Project?

Raji moshood on February 09, 2025

Should you start with a monolith and scale later, or go straight into microservices? Tech giants like Amazon and Netflix swear by microservices, b...
Collapse
 
whchi profile image
whchi

monolith can solve 80% of your problem, the rest is not about the architecture

Collapse
 
andriesfc profile image
Andries

Most small to medium size business will almost never need a true micro services architecture. There are exceptions maybe. Like if you really going grow to enterprise scale due to a guarantee of contract or corporate buyout with the expectations (and guaranteed funds) to grow the business.

Collapse
 
raji_moshood_ee3a4c2638f6 profile image
Raji moshood

Absolutely! For most small to medium-sized businesses, a well-structured monolith is often the best choice. Microservices introduce complexity that isn’t always justified unless there’s a clear need, like rapid scaling, enterprise-level growth, or specific workload separation.

Your point about guaranteed contracts or corporate buyouts changing the equation is a solid one. I’ll be updating the article soon to highlight this perspective so others can make more informed decisions. Appreciate your input, thanks for sharing!

Collapse
 
raji_moshood_ee3a4c2638f6 profile image
Raji moshood

Correct

Collapse
 
auyeungdavid_2847435260 profile image
David Au Yeung

Agreed 👍

Collapse
 
kwnaidoo profile image
Kevin Naidoo • Edited

Nice, interesting topic.

I won't go for microservices too early on. If you don't plan on building a mobile app, then just go with a monolith. If you plan on a mobile app, just split your app into an API and a frontend layer.

The bottleneck is often the DB layer with web applications. When your traffic grows you can just load balance DB servers, cache servers, and even web servers so long as your monolith is stateless (you store images on S3, sessions in Redis, and other user data in the DB).

A microservice only makes sense when you need to squeeze maximum performance or when part of your application requires special hardware. For instance, if you run scrapers, these require running a headless browser.

You don't want to run those processes on the same server as your primary website because they are resource-intensive. Instead, you could build a microservice to use Cloudflare workers. They spawn and self-destruct on the fly depending on what resources you need at any given time. This could be way cheaper than just running a dedicated server as well. Since serverless worker runtimes are memory and disk space-sensitive, you don't want to shove your entire monolith in there, hence why a lightweight microservice makes more sense.

Collapse
 
raji_moshood_ee3a4c2638f6 profile image
Raji moshood

Great insights! You’ve outlined some key considerations that many developers overlook when deciding between a monolith and microservices. Your point about handling high traffic with proper load balancing, caching, and database scaling before jumping into microservices is spot on. Also, the example of offloading resource-intensive tasks like scrapers to Cloudflare Workers is a fantastic real-world application.

I’ll be updating the article soon to integrate these valuable points so everyone can benefit from them. Really appreciate your input, uthanks for sharing your expertise!

Collapse
 
kwnaidoo profile image
Kevin Naidoo • Edited

Awesome, thank you for the kind words. Glad it was useful.

Thread Thread
 
raji_moshood_ee3a4c2638f6 profile image
Raji moshood

My pleasure

Collapse
 
oyeleyemustapha profile image
Mustapha oyeleye

Most of the time Microservices are overkills.

Collapse
 
raji_moshood_ee3a4c2638f6 profile image
Raji moshood

Yes. Monolith is great for start up, however, we cannot underestimate the role of microservice in big company who need separation of concern in infrastructural management

Collapse
 
jwp profile image
John Peters

Nice.

Collapse
 
shaq_attack profile image
Shaquille Niekerk

I was unsure which option would suit me better, but after reading this, I am now convinced that a monolith is the way to go.
Thanks for the post!

Collapse
 
raji_moshood_ee3a4c2638f6 profile image
Raji moshood

You are always welcome🙏

Collapse
 
nguyn_long_79f963f79228b profile image
tnDrake

Great posts.

Collapse
 
raji_moshood_ee3a4c2638f6 profile image
Raji moshood

Thank you