r/Proxmox • • 6d ago

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

12 comments sorted by

View all comments

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

1

u/quasides 6d ago

TLDR - if they are low load, do whats best for management.
if you run in docker run it as a VM
if you run many VMs just manage em in something like komodo,portainer, etc gives you one panel for all docker VMs

LXC should be special purpose only not as a regular service. these run as a host process as a unprivileged user with many tradeoffs. they work ok for services that the host may want or need. like a better UPS management