We are using Channels to serve part of huge ERP application that does transaction processing. Obviously, we can’t be pure async just yet, and we are having issues load testing against large tenants (3000 WS clients making a request every second)
We’ve tried scaling out and up (96 cores on 4 servers or 96 servers with 4 cores), but the limitation I believe is centered around the sync (mostly DB) code. Once a given requests eats an ASGI thread and takes more that a second or two, we start to get errors (connection closes, connects start failing).
I’ve created a test rig, that running a pure async consumer even with a simulated delay, flys and never errors. Once I change the rig to use database_sync_to_async() calling a method that simulates a DB delay, it rolls over quickly.
Still trying to understand how to configure Channels/Guicorn/Uvicorn to handle this load. Maybe someone can enlighten me…