Back

[SOLVED] Sequential/Parallel functions

  • 0
  • Functions
danilo73
15 Apr, 2023, 23:03

Hi, I was reading https://github.com/appwrite/appwrite/issues/1425 Please could someone clarify (in nodejs 18.0, dotnet 6.0 and python 3.10) if many executions to the same functon are triggered at the same time, they run sequentially or parallel in the runtime container of that function?

Im using version 1.3.1

TL;DR
The user is asking whether multiple executions of the same function run sequentially or in parallel in the runtime container. The response clarifies that synchronous executions are processed concurrently, while asynchronous executions are processed sequentially by default in the Appwrite self-hosted installation with only one worker. In order to process them concurrently, the user would need to scale out the workers. Solution: To process executions concurrently, scale out the workers.
Drake
16 Apr, 2023, 00:26

There are two types of function executions: synchronous and asynchronous.

Synchronous executions are created by calling the create execution API and passing false for async. These executions are processed concurrently.

Every other function execution is asynchronous. These executions get queued and are processed by the functions worker. Because the default self hosted installation of Appwrite only has 1 worker, each event is processed sequentially. In order to process them concurrently, you would have to scale out the workers.

danilo73
16 Apr, 2023, 01:45

Understood 👍 thank you

danilo73
16 Apr, 2023, 02:26

[SOLVED] Sequential/Parallel functions

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more