0

I am in the process of building out a "Modular Monolith" whereby the individual services are stored as .NET projects within the overall solution. That way the additional assemblies only load when they are called. It is a sort of half-way compromise in-between a Monolith and a Microservices architecture.

We are moving to an AWS infrastructure and I have been asked if it is possible to containerize each individual assembly. I don't believe this is possible, but wanted to ask anyway just because I figured someone here might have an alternative ideas. I have heard the concept of assymetric scaling where you can assign thread pool size to individual JARS (Which I believe you can do for .NET as well) but I'm not sure if this would provide the same power as containerizing each assembly.

I haven't tried anything yet as I am still trying to get my head around the problem at a design level.

Michael
  • 3
  • 1
  • 1
    If you do absolutely nothing than "the additional assemblies only load when they are called". Some clarification of what benefits you expect would be nice. – Alexei Levenkov Jan 19 '23 at 19:44
  • Originally I had felt the design was very good - unnecessary code is not loaded. However the reason I was asking about containerization is my new boss wanted the ability to scale parts of the system as opposed to a monolithic block. – Michael Jan 19 '23 at 20:49
  • Just putting different assemblies of the same app in different containers won't work, there won't be an entrypoint in the assembly for the runtime to load... They have to be separate applications with IPC calls between them. – fredrik Jan 19 '23 at 21:47

1 Answers1

1

It is a sort of half-way compromise in-between a Monolith and a Microservices architecture.

That's just a properly-designed monolith. And there's nothing wrong with that.

I have been asked if it is possible to containerize each individual assembly

That would be a microservices-based solution, introducing some kind of RPC for the calls between assemblies.

David Browne - Microsoft
  • 80,331
  • 6
  • 39
  • 67
  • Yeah that's maybe where I have gone off the road - I am trying to containerize the assemblies but keep the calls the way they are within the solution - I guess I just need to accept the only way it will work is to split the services off into their own web projects and add the RPC interfaces and calls. Thank you. – Michael Jan 19 '23 at 20:46
  • Note that in a typical microservices decomposition you will have some assemblies that belong in every microservice. And decomposing into microservices can be difficult and dangerous. You generally want to avoid synchronous calls between microservices. It not something you should do just because you're moving to new infrastructure. It's requires a deep re-thinking of the application structure. – David Browne - Microsoft Jan 19 '23 at 21:20
  • 1
    Thank you for your advice, David. I really appreciate it. We will build as a modular monolith for now and tread very carefully if we have to go to microservices. – Michael Jan 20 '23 at 16:29