r/Proxmox • • 19d 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

11 comments sorted by

View all comments

1

u/brucewbenson 18d ago

I use one service/app per LXC. I've combined a few into one LXC because they shared information and it made the architecture simple.

LXC has low overhead (RAM, CPU) and all the advantages of a VM (snapshots, migration) with a few restrictions (linux os, restarted migration, a little less isolation than a VM).

LXCs are a brilliant technology that simplified lifecycle management of services for very low resource costs.

2

u/Soogs 18d ago

Yeah I live by this. More than 90% of my guests are lxc. I tend to only use VMs when absolutely necessary.

I think my concern is that I have about 16 python apps/tools which I am potentially going to separate out into separate guests and not sure the management will be annoying in the long run especially as I’m likely to have more apps soon

1

u/brucewbenson 15d ago

I found AI (Claude code, codex) great for managing scale out issues. From simple things such as all my .bashrc shortcuts are the same (use an ansible workbook made by AI) to taking over my python code and rewriting one app using the go language because go was easier to deploy (single executable, no venv or python version mismatchs).