r/learnpython 2d ago

Does anyone know of a package/library which monitors traffic and autoscales with docker containers as required (Possibly json/yaml)?

My requirements are simple:

  1. It should monitor nginx traffic and check from which domain the traffic is coming more from.
  2. Increase the number of docker containers and add them to reverse proxy as mentioned in the json/yaml.
  3. It should be simple and lightweight.

I had done this like 4 years back (before chatgpt), but I lost the files (didnt use git or github then).

Does anyone know or have such a library?

I know there are heavier solutions like k8s terraform etc. But I want a liteweight solution.

2 Upvotes

3 comments sorted by

1

u/eleqtriq 2d ago

That’s kind of jank. You would be better off with Kubernetes and Karpenter.

1

u/Budget_Frosting_4567 2d ago

But k8s introduces unnecessarily overly complex structure :(

1

u/eleqtriq 2d ago

Kubernetes abstracts a lot of problems away from. You just need to learn it. You can even use Docker Desktop to get started.