3 ms·
Using an ASGI server that supports async/await, such as Uvicorn, instead of green threads, forking, etc, seems like a good idea these days. Also means you can u
by j88439h84 7y ago
Using an ASGI server that supports async/await, such as Uvicorn, instead of green threads, forking, etc, seems like a good idea these days. Also means you can use Starlette which has a much nicer design IMO than some of the old frameworks.
- https://www.uvicorn.org/ https://www.uvicorn.org/
- https://www.starlette.io/ https://www.starlette.io/
- rcarmo 7y agoI'm digging https://github.com/RobertoPrevato/BlackSheep https://github.com/RobertoPrevato/BlackSheep myself, since I prefer the terseness of Bottle and stacking decorators to add functionality to handlers. Any of the above (or Sanic) can do ~3K RPS on a single core on a Raspberry Pi (which is where I test things for portability, optimisation and a little fun), and the RAM overhead is generally not that bad small (just did a little "hello world" uvicorn/blacksheep app and I see 22MB resident/10MB shared per worker, and one of my Clojure servers taking up over four times that...)