I have a python runtime function that is making API calls to 3-4 external services, and the slowest of them can take about 15 seconds to respond.
This function can be called through the frontend quite often (I can have hundreds of simultaneous calls)
To simulate, I added a simple time.sleep(15) to a test function, and called this function execution x num of times in parallel.
Looks like the function cannot handle more than 4 (amount of cores in my instance) requests. i.e. at a time only 4 requests can be executed, which means the cores are tied up when this call is made, which is expected.
However, apparently I can't use await asyncio.sleep because python worker definition is not async.
This is quite different from node runtime. I added a sleep function there, and due to the nature of node event loop, it allowed me to execute 100 functions at once.
Looking for suggestions on how to improve this number in python runtime.
Recommended threads
- TOO_MANY_REDIRECTS after temporarily ena...
I am losing my mind over this, I enabled this setting because I was having issues with sites not making links with https. I enabled it, ran into issues, so I di...
- TablesDB `updateRows` returns `database_...
Hi Appwrite team! I’m seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...
- [SOLVED] Realtime Missing Channels
```js useEffect(() => { let subscription: RealtimeSubscription; async function loadChips() { try { const {rows: chi...