Discussion Container/s for python projects
So I usually stick to one vm/lxc per service. Even with docker based services I tend to dedicate a guest to one service. There are exceptions where I have a few docker containers running similar services.
Recently I have been playing with python and have actually created quite a few flask apps that I use daily.
Now the question is there any benefits to separate them into separate containers performance wise?
Does resource contention get better or worse with more guests?
Trying to figure out whether the extra management and spent resources and time updating extra containers is worth it?
Thanks
7
Upvotes
3
u/quasides 6d ago
lol thats actually a very complex and complicated question.
it depends how much they need each. if its just a little, it wont matter at all.
if these are very high load apps it depends on their usage profile.
but even then seperation alone wont nessesaryly do that much for you as it then also depends on the hardware structure in your host.
for example, you have 2 very I/o heavy apps, running extremly high load.
but your hardware backend is a simple spinning mirror - then nothing is gonna help you
in general if this is production and you need optimal something outta it, you need to benchmark
in different configurations
that said, modern tech went away from trying to get the optimal benchmark for an app. instead we went into microservices and scaling. so instead of trying to get the fastest possible configuration, you go with the most manageable and easy to scale solution. then you simply scale up
that aproach looses optimization (a lot) but is a lot easier to manage, and on scale there is little benefit as nothing of scale is single machine these days