Repository navigation
Async Session of SQLalchemy in middleware #2644
Replies: 1 comment 8 replies
|
Hey Juliana @ubuntujule! Regarding your question, I was planning to add async support to Would it be possible for you to share a small sample app? Do I understand it correctly that you are getting only ~10-20 requests per minute? One potential pitfall is using scoped sessions in general, it's basically an escape hatch for How are you measuring the throughput? How many parallel requests are you sending from your client(s) at a time? Which application server are you using? @CaselIT since you are also an expert in SQLAlchemy, do you have any ideas what one might be bottlenecking on? |
Uh oh!
There was an error while loading. Please reload this page.
Hey there, I'm using the falcon framework for 3 projects since more than 4 Years.
Since begin I am combining it with SQLAlchemy - postres connections.
Now first time I started programming an Async API, I use async_scoped_session(async_sessionmaker) to create AsyncSession Objects in my process_request. I have a session pooler defined with pool_size, also a postgres patroni cluster with 3 DB-Servers.
But I don't understand fully where my bottleneck is, to make my API faster. I use semaphore to control async requests and measure them with prometheus, I don't know what should be default time for requests, but there are big differences between 10 and 20 minutes for the same ~200 requests.
Anyone here has more input for me? - Documentations, Convention insights, expieriences...? Thank you very much.
I love the flexibility of falcon API in difference to other Python API Frameworks. <3
All reactions