10
23 Comments

Monoliths? ๐Ÿค”๐Ÿ˜

https://m.signalvnoise.com/the-majestic-monolith/
Reflecting on this piece by DHH, I wanted to hear the thoughts of other indie hackers on this subject.
What do you think are the advantages of building Monoliths? What other approaches you're enjoying for fullstack development?
Personally, I dig frameworks/ecosystems such as Laravel because they allow little context switching and composing of many libs that are tailored made to empower Laravel devs.

inb4: Every approach is valid and has trade-offs. This is so that people can say WHY they PERSONALLY enjoy or dislike one specific approach. Don't get offended, those are just tools.

posted to Icon for group Developers
Developers
on January 10, 2021
  1. 15

    You don't need microservices until you have a lot of customers/users.

    99% of the time monolithic application will work just fine with thousands or even hudreds of thousands users. So instead of thinking about structuring, infrastructure and management of microservices, it's just no brainer to build monolith for small teams or solo developers.

    1. 5

      I'd say you don't need microservices at any level of customers or users.

      You need microservices when you have a large number of developers.

    2. 2

      Great points! Monoliths all the way especially starting out for Indiehackers. Better to spend all your time building/marketing features and not architecting. Your customers do not care how complex your backend is architected.

  2. 4

    If you are an Indie hacker and are approaching an MVP or initial launch with anything other than monolith, you are over-engineering your product and are now in analysis paralysis mode (been there MANY times). As you scale, use the stranger pattern to breakout high throughput areas and bottlenecks.
    https://dzone.com/articles/monolith-to-microservices-using-the-strangler-patt

  3. 3

    We built our SaaS over the years, from the ground up, purely to meet the requirements of our customers. As we got more users, and they asked for more features, we built them into the app.

    End result is a huge monolith app, surrounded by a few microservices for particular features.

    By far, the highest maintenance and uptime headache are for the microservices, on a 10 to 1 basis. The monolith part basically just hums away, day after day.

  4. 3

    Monoliths are a big plus one for me as an indie hacker. At work on big projects, microservices have their place.

    Tooling, deployments, restraints all grow exponentially as we add services. That's fine when there's engineers to throw at the issue but as an indie hacker with only so many hours a week keeping constrained is the best idea.

  5. 3

    For solo-developer projects, monolithic architectures are so much easier to manage. Fewer moving parts is the definition of simplicity.

    Development environment, deployments, networking between services, code repositories, versioning, mental modelโ€”everything is easier with a monolith. (That doesnโ€™t mean the domain is simple or easy, just the architecture is relatively easier.)

    A micro services architecture solves problems that large teams and large-scale, complex applications face. You might get there and need something like that.

    My general thinking is when you have at least a team per micro service and dedicated DevOps folks, then think about micro services. For solo-devs or small teams, use monolithic architectures with workers if you need them (background processing heavy/slow stuff on a queue).

  6. 2

    Until you have a lot of users and you can benefit from scaling specific services on a day where you expect a high volume activity, I think monoliths do just fine.

    The maintenance overhead of microservices is not really worth it for small businesses and especially IHs like us.

  7. 2

    I actually wrote an article on my personal blog debating this, if you are interested: https://vladcalin.ro/blog/2021-01-04-microservices-for-a-startup .

    But to summarize, when starting a new project you should always start with a monolith architecture, and split into microservices as you go, after your requirements become more set in stone. The most important issue for microservices is data partition, because you will have some pieces of information that will always be needed together with other piece of information, so they would need to live inside the same database/api.

    Another thing is, the main reason microservice based archictecture appeared is because you can scale a monolith vertically and horizontally, but you'll reach a limit eventually with the database. So it solves scalability, but until you have that problem, there is no reason to over complicate with massively distributed systems.

    A web server (with some replicas if necessary) + some workers should take anybody far enough.

  8. 2

    I build all of my sites with Python/Django so I am a fan of the monolith. The big distributed systems are for the super large companies with millions of visitors a day. I don't ever plan on getting anywhere near that so the simplicity of the monolith is huge. I have a full time job, a wife, and a daughter. I need something that is simple and allows me to build things as quick as possible during whatever free time I can scrounge up.

  9. 2

    Tradeoffs depend clearly on the size. Considering the probabilities of most startups and indie hackers out there (not to mention that most indie hackers want to remain at a manageable size) monoliths offer less complexity and a proven way that previously have worked.

    I consider myself very average, and I don't plan to storm the tech world. Just to create a profitable company been an indie hacker with moderate aspirations. I see out there plenty of good business using the monolithic approach. Considering that (in my case Rails) take care of huge amount of edge cases that I couldn't event think of, I'm going that way.

  10. 2

    The deal usually is around cohesion vs distributed independence and to even have that discussion you should probably be running a shop of over 10 probably at least 20 developers. Or across some big technical divides.
    If not your just not having the scaling problem, so anything just works.

  11. 1

    Interesting to not see anyone here mention a clear delineation between types of services/applications. For example, I have 3x different "services" but they basically all share code:

    • Frontend, in Svelte. Completely separate from the backend API.
    • Backend, in Rails, with Rails API.
    • Mobile, in Flutter, to target Android + iOS simultaneously.

    The nice thing is with the frontend, I can completely change to Vue/React/Or whatever the flavor of the week is, easily, and without regard to anything on the backend.

    With the backend, I can do the same and both the frontend and mobile will keep working so long as my API signatures remain the same.

    For mobile, it's nice to have an app, but then also to be able share code for both the big two ecosystems.

    Did this slow me down at all? To make anything on mobile, sure, after the MVP. But I built my frontend mobile friendly first, so it's not any slower than just getting to the MVP as is. Splitting the frontend and backend is probably one of the best things I've done, and will always continue to do moving forward.

  12. 1

    I have seen microservices gone wrong so many times... I'm all for building a monolith and splitting the pieces that would benefit from being a microservice, only when they start to bottleneck.

  13. 1

    Every architecture style has its own pros and cons, so it really depends on the scale you have.

    Have you ever heard of a modular monolith approach? In most cases, if possible I follow it.

  14. 1

    Coming from a full-time software engineer here too, I have dabled in almost every style. Personally, everyone says go monolith until you need to break it down and can spend the resources doing so - as a startup, basically ignore most tech debt until you have to.

    Hell, most of us do that everday anyways because it doesn't make the company more money to chip away at that tech debt.

    Now, I personally think, if you are technologically savvy enough or have a founder who is, go for a serverless approach. Slap your CRUD into lambdas and call it a day. There is a learning curve but man does it not make it simple.

    I personally run Just Pick Something in a monorepo and it's great. I can change the API while I am working on the admin website or the native app. Most of our backend is DynamoDb with a Neo4j instance running for our recommendations - all spun up via serverless and using AWS's AppSync for GraphQL and running what needs to be run via Lambdas.

    Basically, have a lot of experience and knowledge gained over the years and countless iterations, you tend to find what works for you and/or your team.

    I will leave you with this - just get it working. Focus on validating the idea and getting that early feedback, tech will figure itself out along the way.

    1. 1

      Interesting. What made you go with a graph database for your recommender? I've got an ebook book on Neo4j but have never seen it used in the wild

      1. 2

        A graph database is a perfect choice for true recommendations. While we could have used ElasticSearch, it just isn't built for the type of connections we are looking for when ranking the recommendations for users.

        We have jumped back and forth on different ideas, even pulling our whole DynamoDB data and doing server-side filtering when we had a small enough dataset. The more we read up on Neo4j the more it made sense. We even reached out to them and they have a free enterprise version for startups!

        If you are looking into Neo4j, I also recommend looking at what the folks at GraphAware are making as it can help out a lot with managing data.

  15. 1

    This is a really good question and I love all the responses here so far. Totally agree that micro services are a good pattern for large, multi-team/department companies. I think the simplicity of a monolith can't be beaten for most companies and that micro services are something you transition to when you need to resolve specific problems.

    A monolith coupled with jobs/queuing and even some serverless features will get you most of the way. Cloud training/staff is expensive and while it can provide great benefits it's a bit much when you're starting off.

  16. 1

    The responses so far are music to my ears- for years iโ€™ve been building monolith apps but in the back of my mind had an itch of โ€œyou should be doing this in micro-services!!โ€.
    What has been said is so sensible I need to remind myself of it when that thought pops into my mind or even in a team discussion.
    โ€œWhat is the realistic need for micro-services?โ€

  17. 1

    Monoliths are great until your 10 millionth customer.

  18. 1

    I specifically built Nodewood to be a monolith-based web app framework, even down to allowing shared code between the front-end UI and the back-end API (the benefit of using JavaScript for both). I've worked at too many places that saw the benefits of microservices and ignored all the downsides and made the switch far, far too soon, and it just destroyed productivity.

    If you're reading this site, it is far too soon to consider microservices. Start with a well-thought-out monolith, and build from there. You will save time, energy, stress, and money.

  19. 8

    This comment was deleted 3 years ago.

    1. 1

      100% on this.

      speed > everything at the early-stage. if you can't survive, what does it matter?

      you can always move as you scale... which is a good strategy anyways because knowing that you will always force you to build in a way that gives your flexibility in your future decisions.

Trending on Indie Hackers
Iย spent $0 on marketingย and got 1,200ย website visitors -ย Here's my exact playbook User Avatar 58 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 ๐ŸŽฌ๐Ÿค– User Avatar 29 comments Codenhack Beta โ€” Full Access + Referral User Avatar 21 comments I built eSIMKitStore โ€” helping travelers stay online with instant QR-based eSIMs ๐ŸŒ User Avatar 20 comments ๐Ÿš€ Get Your Brand Featured on FaceSeek User Avatar 18 comments Day 6 - Slow days as a solo founder User Avatar 16 comments