What’s a low memory way to run a Python http endpoint?

Posted by alexp702@reddit | Python | View on Reddit | 72 comments

I have a simple process that has a single endpoint that needs exposing on http. Nothing fancy but need to run it in a container using minimal memory. Currently running with uvicorn which needs \~600Mb of ram on start up. This seems crazy.

I have also tried Grainian which seems similar usage.

For perspective a Nodejs container uses 128mb, and a full phpmyadmin uses 20!

I realise you shouldn’t compare but a 30x increase in memory is not a trivial matter with current ram pricing!