[{"data":1,"prerenderedAt":63},["ShallowReactive",2],{"insight-dotnet-modular-monolith":3},{"id":4,"title":5,"body":6,"description":54,"extension":55,"meta":56,"navigation":58,"path":59,"seo":60,"stem":61,"__hash__":62},"insights/insights/dotnet-modular-monolith.md","Modular monoliths in .NET",{"type":7,"value":8,"toc":47},"minimark",[9,14,23,27,40,44],[10,11,13],"h2",{"id":12},"why-consider-a-modular-monolith","Why consider a modular monolith",[15,16,17,18,22],"p",{},"Microservices add operational overhead: distributed tracing, deployment pipelines per service, network failure handling. For many products, especially early-stage or SMEs, a well-structured monolith is faster to ship and easier to maintain. The key is to structure it so you ",[19,20,21],"em",{},"could"," extract modules later if needed.",[10,24,26],{"id":25},"structuring-modules","Structuring modules",[28,29,30,34,37],"ul",{},[31,32,33],"li",{},"Each module is a vertical slice: its own folder (or project), its own domain types, its own persistence if appropriate.",[31,35,36],{},"Modules communicate via interfaces and events, not direct database access across boundaries.",[31,38,39],{},"Use .NET's minimal APIs or feature folders within a single ASP.NET Core app to keep routing simple.",[10,41,43],{"id":42},"when-to-evolve","When to evolve",[15,45,46],{},"If a module grows too large, has different scaling needs, or is owned by a different team, that's the time to consider extraction. By then you'll have clear boundaries and a migration path. Don't start with microservices \"because we might need them someday.\"",{"title":48,"searchDepth":49,"depth":49,"links":50},"",2,[51,52,53],{"id":12,"depth":49,"text":13},{"id":25,"depth":49,"text":26},{"id":42,"depth":49,"text":43},"A pragmatic alternative to microservices when your team is small and your domain is still evolving.","md",{"date":57},"2025-02-12",true,"/insights/dotnet-modular-monolith",{"title":5,"description":54},"insights/dotnet-modular-monolith","XSt_7STRud49sVrg9PQlpZUE6d07vfJ1in9i4BjEsXk",1772823101497]