fastwsgi icon indicating copy to clipboard operation
fastwsgi copied to clipboard

Workers / Threads

Open tabebqena opened this issue 3 years ago • 5 comments

Thanks for developing this needed package. Is it has support for multiple workers / theads or greenlets?

tabebqena avatar Dec 16 '21 09:12 tabebqena

Thanks for reaching out!

Multiple workers (processes) is coming soon. I currently only have it working on Linux. I want to get it working on all platforms before I release it. At the moment, FastWSGI only starts a single worker when running the server

jamesroberts avatar Dec 16 '21 09:12 jamesroberts

Side note: in a platform like Linux or FreeBSD, it's easy to start many instances of FastWSGI using containers or jails. With docker-compose or k8s, it's even easier. This is a real great reason not to deploy on Windows.

image-generator-rest: 
   restart: always
   profiles:
   - backend
   build:
     dockerfile: Dockerfile-rest-generator
     context: ./image-generator
   image: oz123/myapp:latest
   env_file:
   - secrets/compose.env
   deploy:
     mode: replicated
     replicas: 3 
     endpoint_mode: vip

oz123 avatar Oct 20 '22 21:10 oz123

@jamesroberts do you think you can push a branch with multi workers so its testable?

ebursztein avatar Jul 22 '23 14:07 ebursztein

@ebursztein Look this: https://gist.github.com/remittor/c9411e62b5ea4776200bee288a331016#file-server-py-L140 only nix*s are supported

remittor avatar Jul 24 '23 07:07 remittor

@remittor thanks very helpful.

ebursztein avatar Aug 05 '23 15:08 ebursztein