jamesroberts / fastwsgi

An ultra fast WSGI server for Python 3
Other
428 stars 14 forks source link

Workers / Threads #2

Open tabebqena opened 2 years ago

tabebqena commented 2 years ago

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

jamesroberts commented 2 years ago

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

oz123 commented 1 year ago

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
ebursztein commented 1 year ago

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

remittor commented 1 year ago

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

ebursztein commented 1 year ago

@remittor thanks very helpful.