Discussion
Does coding with LLMs mean more microservices?
tatrions: The bounded surface area insight is right, but the actual forcing function is context window size. Small codebase fits in context, LLM can reason end-to-end. You get the same containment with well-defined modules in a monolith if your tooling picks the right files to feed into the prompt.Interesting corollary: as context windows keep growing (8k to 1M+ in two years), this architectural pressure should actually reverse. When a model can hold your whole monolith in working memory, you get all the blast radius containment without the operational overhead of separate services, billing accounts, and deployment pipelines.
c1sc0: Why microservices when small composable CLI tools seem a better fit for LLMs?
_pdp_: This makes no sense. You can easily make a monolith and build all parts of it in isolation - i.e. modules, plugins, packages.In fact, my argument is that there will be more monolith applications due to AI coding assistants, not less.
siruwastaken: This seems like the idea of modularizing code, and using specific function sighatures for data exchange as an API is being re-invented by people using AI. Aren't we already mostly doing things this way, albeit via submodules in a monolith, due to the cognitive ctrain it puts on humans to understand the whole thing at any given time?
stingraycharles: This makes no sense as youโre able to have similar interfaces and contracts using regular code.Microservices solve an organizational problem mostly โ teams being able to work completely independently, do releases independently, etc โ but as soon youโre going to actually do that, youโre introducing a lot of complexity (but gain organizational scalability).This has nothing to do with context sizes.
mrbungie: His argument is not about LLM tools but rather about which architecture is better suited for coding with LLMs.
int_19h: That's an argument for components with well-defined contracts on their interfaces, but making them microservices just complicates debugging for the model.It's also unclear whether tight coupling is actually a problem when you can refactor this fast.
Kim_Bruning: A typical rant (composed from memory) goes something like this:> "These AI types are all delusional. My job is secure. Sure your model can one-shot a small program in green field in 5 minutes with zero debugging. But make it a little larger and it starts to forget features, introduces more bugs than you can fix, and forget letting it loose on large legacy codebases"What if that's not a diagnosis? What if we see that as an opportunity? O:-)I'm not saying it needs to be microservices, but say you can constrain the blast radius of an AI going oops (compaction is a famous oops-surface, for instance); and say you can split the work up into self-contained blocks where you can test your i/o and side effects thoroughly...... well, that's going to be interesting, isn't it?Programming has always supposed to be about that: Structured programming, functions (preferably side-effect-less for this argument), classes&objects, and -ok sure- microservices. I'm not sold on exactly the latter because it feels a bit too heavy for me. But ... something like?
dist-epoch: You forgot this classic from the rant: "where are all these vibe-coded apps that all these vibe-coders are producing?"
lyricalstring: Agree on the context window framing. If an LLM needs well-defined boundaries to work well, just write clean module interfaces. You don't need a network boundary for that.The part about "less scrutiny on PR review" and committing straight to main is telling too. That's not really about microservices, that's just wanting to ship faster with less oversight. Works until it doesn't.
Kim_Bruning: > The part about "less scrutiny on PR review" and committing straight to main is telling too. That's not really about microservices, that's just wanting to ship faster with less oversight. Works until it doesn't.And that's the reason I think the author proposes microservices I think. Doesn't need to be microservices, but something where your codebase is split up so that when-not-if it does blow up, you only roll back the one component and try again.Modularization is hardly a new idea, but might need a slight spin to allow agents to work by themselves a bit more. The speed advantages are too tantalizing not to.
dist-epoch: You are taking the article argument too literally. They meant microservices also in the sense of microlibraries, etc, not strictly a HTTP service.
iainmerrick: No, I think youโre not reading it literally enough. โMicroservicesโ generally does mean separate HTTP (or at least RPC) servers. Near the beginning, the article says:A microservice has a very well-defined surface area. Everything that flows into the service (requests) and out (responses, webhooks)
nikeee: What matters for LLMs is what matters for humans, which usually means DX. Most Microservice setups are extremely hard to debug across service boundaries, so I think in the future, we'll see more architectural decisions that make sense for LLMs to work with. Which will probably mean modular monoliths or something like that.
zoho_seni: Definitively our approach is ai dev ex first.
Theaetetus: I don't think LLMs push us to use microservices as much as Borgers says they do. They don't avoid the problems microservices have always faced, and encapsulation is mostly independent from whether a boundary is a service-to-service boundary:https://www.natemeyvis.com/agentic-coding-and-microservices/
benfortuna: Why arbitrarily invent new meanings (for microservices) and new words (microlibraries) when there are already many adequate ways to describe modular, componentized architecures?A totally valid and important point but it has been diluted by talking about microservices rather than importance of modular architectures for agent-based coding.
scotty79: service-to-service boundary is easiest to keep with the way we are using LLMs to code right now
veselin: I think this is a promise, probably also for spec driven development. You write the spec, the whole thing can be reimplemented in rust tomorrow. Make small modules or libraries.One colleague describes monolith vs microservices as "the grass is greener of the other side".In the end, having microservices is that that the release process becomes much harder. Every feature spans 3 services at least, with possible incompatibility between some of their versions. Precisely the work you cannot easily automate with LLMs.
victorbjorklund: I think no. But I think it makes sense to break down your app into libraries etc
mexicocitinluez: > describe modular,Agreed. Modular is what they were probably after.
mexicocitinluez: I think a better word would have been "modularization" than "microservices" as I also highly correlate "microservices" with http-based calls.
jillesvangurp: Whether you call it modularization, good design, SOLID principles, or micro services, etc. It all boils down to the same thing. I usually dumb it down to two easy to understeand metrics: cohesiveness and coupling. Something with high cohesiveness and low coupling tends to be small and easy to reason about.Things that are small, can be easily replaced, fixed, changed, etc. with relatively low risk. Even if you have a monolith, you probably want to impose some structure on it. Whenever you get tight coupling and low cohesiveness in a system, it can become a problem spot.Easy reasoning here directly translates into low token cost when reasoning. That's why it's beneficial to keep things that way also with LLMs. Bad design always had a cost. But with LLMs you can put a dollar cost on it.My attitude with micro services is that it's a lot of heavy handed isolation where cheaper mechanisms could achieve much of the same effects. You can put things in a separate git repository and force all communication over the network. Or you can put code in different package and guard internal package a bit and use a well defined interface to call a function through. Same net result but one is a bit cheaper to call and whole lot less hassle. IMHO people do micro-services for the wrong reasons mostly; organizational convenience vs. actual benefits in terms of minimizing resource usage and optimizing for that.
jensneuse: One thing I find interesting is how GraphQL has evolved from an API technology for API consumers with "different needs" to an API technology for agents. What helped organizations scale GraphQL across multiple teams is Federation, a way to split one supergraph into multiple subgraphs. So, what works well to scale teams actually works equally well for agents. The core value you can get from Federation is a "coordination" layer that is deterministic. Now, what's interesting is that you can scale agentic software development pretty well when you have a deterministic layer where everyone involved can agree. I wrote more about this on our blog if anyone is interested: https://wundergraph.com/blog/graphql-api-layer-for-ai-agents
onlyrealcuzzo: Aren't libraries just "services" without some transport layer / gateway?You should only ever have a separate "service" if there's a concrete reason to. You should never have a "service" to make things simpler (it inherently does not).Libraries on the other hand are much more subjective.
staticassertion: > Aren't libraries just "services" without some transport layer / gateway?Libraries can share memory, mutable state, etc. Services can not.> (it inherently does not)That's going to be debatable.
iainmerrick: Like almost all of these articles, there's really nothing AI- or LLM-specific here at all. Modularization, microservices, monorepos etc have all been used in the past to help scale up software development for huge teams and complex systems.The only new thing is that small teams using these new tools will run into problems that previously only affected much larger teams. The cadence is faster, sometimes a lot faster, but the architectural problems and solutions are the same.It seems to me that existing good practices continue to work well. I haven't seen any radically new approaches to software design and development that only work with LLMs and wouldn't work without them. Are there any?I've seen a few suggestions of using LLMs directly as the app logic, rather than using LLMs to write the code, but that doesn't seem scalable, at least not at current LLM prices, so I'd say it's unproven at best. And it's not really a new idea either; it's always been a classic startup trick to do some stuff manually until you have both the time and the necessity to automate it.
tatrions: The "current LLM prices" part is doing a lot of work in that argument though. Prices dropped roughly 10x in the past year, and model routing helps too -- not every inference call in an agent loop actually needs a frontier model. Tool output parsing, formatting, simple next-step decisions can use something that costs 1/100th of Opus without quality loss.The real shift isn't just that code gets generated faster, it's that people are starting to use LLMs as runtime components. And the cost curve for that use case is moving way faster than most people realize.
thfuran: Why would you use an LLM to format your code?
DeathArrow: >Every feature spans 3 services at leastIf a feature spans more microservices it seems that the microservices boundaries are not well defined.
darkerside: The problem with the latter has always been the same. It requires careful review to ensure that system boundaries aren't being crossed. It's very obvious if your repo sounds to access to a new database. Less so if it imports a function directly from an inappropriate package.
insensible: So test it separately.
nzach: > It seems to me that existing good practices continue to work well. I haven't seen any radically new approaches to software design and development that only work with LLMs and wouldn't work without them.I've been thinking about it lately and I think you are right. LLMs haven't changed what is 'good software'. But they changed some proxies I used to have for what is 'good software'.In the past I've always loved projects that had good documentation, and many times I've used this metric to select a project/library to use. But LLMs transformed something that was (IMHO) a good indicator for "care"/"software quality" into something that is becoming irrelevant (see Goodhart's law).
lesuorac: > Or you can put code in different package and guard internal package cohesiveness and coupling a bit and use well defined interfaces to call a functions through.While I do think actual microservices are over-kill. I don't think I've seen code anywhere that survives multiple years where somebody doesn't use internal state of another package. Like if you don't force people to use a hard barrier (i.e. HTTP) then there's going to be workarounds.
Kim_Bruning: That had me bogling too. But you know what? A local MoE model roughly equivalent to sonnet mid-2025? Totally possible. Just costs electricity to run, put it in your CI/CD pipeline. Have it apply a bit of intelligence to the thing as well. Uh.... if you've got a spare box, why not?(the fact that said spare box would cost an arm and a leg in 2026 is... a minor detail)
iainmerrick: Right. The equivalent in handwritten code would be formatting your code by hand. That used to be the normal way to do it!For handwritten code, the evolution of best practices has tended to be:- just make your code look neat and tidy;- follow the style and conventions of existing code;- follow a strict formatting style guide;- format automatically using a tool.I donโt see why it should be any different with LLMs. Why format with an LLM each time, when you can use the LLM once to write the formatter?Maybe thereโs a point at which neural nets replace conventional programming languages for low-level tasks. But Iโm skeptical that natural language models will replace programming languages for low-level tasks any time soon.
thfuran: Why not? Because you can get stronger guarantees out of a typical code formatter, which will also probably run about a million times faster.
prerok: Really? That seems strange, at least to me.While HTTP can be considered as a transport layer for RPCs between microservices, it seems to me to be a very inefficient and bug-prone solution.Can you describe a set up where you used HTTP between microservices?
anthonylevine: > Really? That seems strange, at least to me.Are you purposely misreading the comment? Where did it say that http was the only form of communication (or even the best) between microservices? Where did it imply there weren't other methods?> While HTTP can be considered as a transport layer for RPCs between microservices, it seems to me to be a very inefficient and bug-prone solution.This is so irrelevant to the point being made it's nuts.
esafak: If this is an issue you must be starting with a blank slate and not giving any direction. If you collaborate on the design you're not going to find it accidentally used microservices.
monsieurbanana: I'm not sure llms produce good documentation. I'm open to hear more opinions on this, my feeling is that the documentation of llm-heavy projects is a bit too verbose, a bit off-target, sometimes completely irrelevant, very repetitive.Not terrible, but I'll just point my own llm to it instead of reading it myself like I would for an actual great documentation
andrewstuart: >> LLM-assisted coding naturally flows towards small microservicesOnly if youโre a sufficiently bad programmer to not tell it the architecture it must comply to that hopefully you have the skills to define.
areys: The context window framing is compelling but I think the more durable pressure is the "blast radius" problem โ not whether the model can hold your whole codebase in working memory, but whether a confident-but-wrong agent can cause cascading failures across the whole system.Even as context windows hit 1M+ tokens, you'd probably still want bounded rollback units. Clean module interfaces help less with the comprehension problem and more with the containment one. Whether those modules get a network boundary is mostly an ops tradeoff โ the architectural principle is the same either way.
poly2it: What's the point of flooding this site with slop accounts? Do people just want to see the world burn? Why attack culture?
staticassertion: I have wondered this as well. Maybe it's trying to train based on which accounts get flagged/ time-to-flag or something? Otherwise... who would bother with this? It's so dumb.
staticassertion: This is also extremely common with LLMs, in my experience. They grep, find something, make it `pub`, etc.
Kim_Bruning: You're not wrong. Probably almost literally a million times. I'm just trying to steelman it here.It's really: practical LLMs are coming down in price a lot. It's almost like English is becoming a valid programming langauge. The old arguments about machine code vs compilers vs interpreters now extend into LLMs. Each time using tools that are 100s of times slower and more expensive, but which save the humans time.I know, it feels stupid. It never doesn't.
Kim_Bruning: You're not wrong. Though now I am thinking of ways an LLM in CI might be useful, (dijkstra forgive me).
FuckButtons: It seems entirely logical that if an llm allows each ic to do the work of a 2-3 person team (debatable, but assume itโs true for the sake of argument) then youโve effectively just added a layer to the org chart, meaning any tool that was effective for the next scale up of org becomes a requirement for managing a smaller team.What should give anyone pause about this notion is that historically, by far the most effective teams have been small teams of experts focusing on their key competencies and points of comparative advantage. Large organizations tend to be slower, more bureaucratic and less effective at executing because of the added weight of communication and disconnect between execution and intent.If you want to be effective with llms, it seems like there are a lot of lessons to learn about what makes human teams effective before we turn ourselves into an industry filled with clueless middle managers.
iainmerrick: That's a very good point. Although I think maybe there are some crucial differences with LLMs here.First, the extra speed makes a qualitative difference. There is some communication overhead when you're instructing an LLM rather than just doing the work directly, but the LLM is usually so fast that it doesn't necessarily slow you down.Second, the lack of ego is a big deal. When reviewing LLM code, I have remind myself that it's okay to ask for sweeping changes, or even completely change the design because I'm not happy with how it turned out. The only cost is extra tokens -- it doesn't take much time, nobody's ego gets bruised, team morale doesn't suffer.This might be an area where LLMs are able to follow human best practices better than humans themselves can. It's good to explore the design space with throwaway prototypes, but I think people are often too reluctant to throw code away and are tempted to try to reuse it.
onlyrealcuzzo: > That's going to be debatable.It's really not. A service adds complexity. If you have no reason to add it besides to "reduce complexity" - that is an oxymoron.There are many concrete reasons to have one. Reducing complexity is not one.That's like arguing you can drive farther forward if you go in reverse. No.There are reasons to drive in reverse. To move forward is not one of them.
staticassertion: > It's really not. A service adds complexity. If you have no reason to add it besides to "reduce complexity" - that is an oxymoron.No, it really is. I can just as easily say that a system is simpler when it's composite parts are isolated, or that a system is simpler if I can take one component and reason about it in isolation, etc.Similarly, I could say that libraries add or reduce complexity by making similar appeals like "a single unit of code is simpler" or "separate, smaller units are simpler" etc.
onlyrealcuzzo: > No, it really is. I can just as easily say that a system is simpler when it's composite parts are isolatedNo, a system can not be simpler because you moved A' to B and introduced C (complexity - an added network, gateway, communication layer) for no reason besides to make the entire system simpler.It is not simpler! You did nothing besides introduce C (complexity)!
staticassertion: Sounds like there's some debate to be had here...
reedycat: I don't see a direct causal link here - architecture choices are still mostly about suitability and the specific needs of your app. That said, if you do opt for microservices, modern Edge runtimes like Cloudflare Workers and lightweight frameworks like Hono have changed the game. Theyโve made deploying and maintaining microservices significantly easier and more cost-effective, while providing incredible performance.
stuaxo: Microservices are great if you are Amazon and want to have many more surfaces for billing.They may be useful for you, on the other hand atomising things brings overhead and maintenance burden and is often not worth it
cisco801: I have built both monoliths and microservices over thirty-plus years, and the honest answer is that LLMs make it easier to generate more code, not better architecture. The hard part of microservices was never writing the services. It was debugging the network calls between them at 3am when one service silently started returning empty responses. LLMs do not help with that. They just help you create more services to debug.