Open roed314 opened 5 days ago
asyncpg uses async, which makes sense, but will also make it harder for others to use
I was just curious how much actual speedup we would get from using asyncpg. I doubt we would get the factor of 5 speedup they advertise, but hitting the 30 second gunicorn timeout less frequently would be nice.
How will it make it harder for others to use?
Learning how to use async
properly takes an effort, and I still get confused, but perhaps we do not need to expose this to the final user.
This will enable proper usage of async workers in gunicorn, but for us to take advantage of it we would need to perhaps make certain parts os psycopg async.
There are several alternatives to psycopg2 available. Two that look promising are psycopg3 and asyncpg.
We should see how hard each would be to switch to and benchmark them for our use cases.