Microservices is an anti-pattern.
Adding network hops, routing, and potential for cascading failure between every backend function call seriously hamstrings a company in the long term, all so lazy developers can sling out new services without caring about the greater codebase or long term production salience.
While idependent backend services do allow backend teams to work based upon a well defined interface, deploy and scale separately, they come at the extreme cost of a network hop and all the complexity it entails (fault tolerance, instrumentation, latency, etc, etc), and so they should be used very cautiously.
Big companies go further by leaning into a monorepo architure to maximize in-process code reuse (functions) while still organizing code (folders) and deploying using a shared procedure with a single, unified process architecture.
The network is not free. The network is the most expensive thing. Reduce the amount of disparate, chatty backend services and increase the amount of same language, same process, unified code.
View quoted note →
Login to reply
Replies (16)
i think we're only gonna be seeing more of them tho, microservices are great for llm development since they fit into context, large monorepo is harder to tackle
NGL talking about this makes me glad I've retired. Was knee deep in the shit show a very long time.
I'm an embedded systems dev. Firmware cannot crash, especially when it's running an engine or a pacemaker. To design firmware with microservices, performing basic functions over whatever network connection you might have, would be insane.
Separation of concerns is not the same as distribution of concerns. Whenever you add a communication channel, you add a failure point and a delay, a measurable and minimum delay. Maybe that delay is small when you run 1000 microservices on the same machine, but then when it's time to "scale" across the network you increase your latency by orders of magnitude, even when you scale within the same datacenter.
To distribute concerns across the network is a valid design pattern, but it's not like waterfall v.s. agile where you maximize the "best thing" about a process, because the "beat thing" about software is not the network. Networking is a tool that has utility and tradeoffs and it always increases complexity.
I work in a 100M ARR majestic monolith daily and do not get this feeling. It’s all just subfolders and context management. In fact wonder if microservices _prevent_ LLM from getting big picture in many cases.
i guess it cuts both ways, but now with models with huge context windows that is becoming less of a constraint
I worked at a SaaS company that hit 100% growth two years in a row. After they went on a massive hiring spree, their release speed sank like a brick because the complexity was so significant that no one could realistically figure out
But @Laser how can else can your apps / services be Clown Native? Everything must be in AWS or Azure and it must be Clown Native. This way it can run anywhere... on AWS or Azure.
The term 'microservices ' implies going ham with little networked backends while pretending like distributing logic in this way has no costs.
Independently developed and deployed backends have a time and place, but it certainly is a costly pattern that should be used as a last resort.
I have yet to see a case at any scale where backend code should not be developed together in a monolithic codebase, even when it is deployed in a distributed architecture for various needs (job processing vs request/reply backends).
The notion of microservices is a lazy event pipelining architecture. It's better to just use a RTC microkernel framework inside your application and break out scalable pieces with proxy placeholders or a pub-sub rally point like over zmq or redis.
Great post.
Although I retired a couple years back, one of the things I absolutely *loved* about running my one-man software development shop was that I wasn't forced to deal with silly tech trends like microservices.
It always amazes me how eagerly software devs embrace needless complexity. It's like you say, you can organize stuff by folders. If you identify a piece that needs to start/stop independently of the rest of the system, or spawn additional instances of itself across machines, fine, make it into it's own self-contained process. But this obsession with taking a single function and wrapping it in a service never made any sense to me.
All I know is, while my competitors were fiddling about with microservices and elaborate containerization strategies, I just focused on delivering software that worked, and I seemed to do ok.
seen.
Micro services seems to be just another instance of Conway's Law.
Some organizations are composed of many many single responsibility teams and so they evangelize that the way to do things is their way.
Conway's law - Wikipedia
Exactly.
Evented production typologies can be achieved without losing the code reuse of developing everything together in the same repo.
You can have thousands of engineers sharing code via functions while also deploying the entire codebase in a myriad of different production modes to execute procedures differently for different purposes.
Just because Kafka consumers need their own persistent process that's seperate from request/response architecture, does t mean those functions need their own source repository and deployment systems, etc.
Reuse everything.
I think a lot of what happened is that Google and the like never sufficiently open sourced their monorepo secret sauce, and that led to (dumb) engineers adopting familiar structures, like GitHub orgs with many different repos that they could easily deploy in a 1:1 fashion with cloud tooling.
Fast forward a decade, and the "microservices" monstrosity has become normalized.
i think also the huge VC driven hyperscaling moment in software development and creating all these huge companies who were hiring 100s of engineers per month who ran fast and broke things meant that it was easier to make new hires productive is every new team essentially had a green field project vs onboarding to monorepo and getting familiar with everything
yes.