Skip to content
Back

Question about adding duplicate worker-functions in docker-compose.yml

  • 0
  • Self Hosted
  • Cloud
Mike Shoebox
29 Apr, 2025, 21:32

1.) Is this still this is a valid strategy for having parallel processing of async function executions? I saw some support threads on the appwrite site which were unclear to me.

2.) If I have 2 workers processing function executions in parallel, are the instances isolated from each other? e.g. if I have one exceution running which downloads files locally to operate on them, I do not want the 2nd parallel execution to overwrite these files or do any operations on the files from the other function execution. I want to be 100% sure these executions have their own namespace on disk (I'm not referring to persistent storage btw -- just parallel execution using additional worker-functions).

TypeScript
appwrite-worker-functions-1:
  image: appwrite/appwrite:1.5.7
  entrypoint: worker-functions
  # <<: *x-logging
  container_name: appwrite-worker-functions-1
  restart: unless-stopped
  # networks:
  #   - appwrite
  depends_on:
    - appwrite-redis
    - appwrite-mariadb
    - openruntimes-executor
  environment:
    - _APP_ENV
    - ... more envs
  
appwrite-worker-functions-2:
  image: appwrite/appwrite:1.5.7
  entrypoint: worker-functions
  # <<: *x-logging
  container_name: appwrite-worker-functions-2
  restart: unless-stopped
  # networks:
  #   - appwrite
  depends_on:
    - appwrite-redis
    - appwrite-mariadb
    - openruntimes-executor
  environment:
    - _APP_ENV
    - ... more envs

...
TL;DR
- Developer wants to know if adding duplicate worker-functions in docker-compose.yml is a valid strategy for parallel processing of async function executions. - Developer seeks clarification on whether instances of parallel executions are isolated from each other to avoid file conflicts. - Make sure each worker-function has its own namespace on disk to prevent overwriting or interference with files from other executions.
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