mliezun / caddy-snake

Caddy plugin to serve Python apps
MIT License
68 stars 2 forks source link

Isolating apps by using subinterpreters #10

Open mliezun opened 3 months ago

mliezun commented 3 months ago

Run each app on a separate subinterpreter, that will make them isolated from each other.

Since Python 3.12, subinterpreters can have their own GIL. That will also make the faster and more resource efficient.

As of now, there's a draft PR #9. While working on it I found a bug that doesn't allow to successfully use subinterpreters in Python 3.12 or later. I filed an issue on the CPython project https://github.com/python/cpython/issues/117482

Overall subinterpreters don't seem stable and I think they still need some improvements in future Python versions to make them usable.