当我 运行 一张 Docker 图片时,消息 "start worker process" 是什么意思?

What does the message "start worker process" mean when I run a Docker image?

每当我为我的特定应用程序执行 docker-compose 时,我都会看到打印出一连串的“启动工作进程”消息:

2022/03/31 19:24:42 [notice] 1#1: start worker processes
2022/03/31 19:24:42 [notice] 1#1: start worker process 77
2022/03/31 19:24:42 [notice] 1#1: start worker process 78
2022/03/31 19:24:42 [notice] 1#1: start worker process 79
2022/03/31 19:24:42 [notice] 1#1: start worker process 80
2022/03/31 19:24:42 [notice] 1#1: start worker process 81
2022/03/31 19:24:42 [notice] 1#1: start worker process 82
2022/03/31 19:24:42 [notice] 1#1: start worker process 83

我猜这条消息是一条非常普通的消息,这就是为什么我找不到任何关于它的讨论的原因。不过我很想知道:

docker-compose.yml 文件:

version: '3.4'

services:

  nginx:
    build:
      network: host
      context: cfg/nginx/.
    ports:
      - "80:80"
    volumes:
      - web-static:/var/www/web_reflectivity/static
      - ./cfg/nginx/django.conf:/etc/nginx/conf.d/django.conf
      - ./cfg/nginx/docker-entrypoint.sh:/docker-entrypoint.d/docker-entrypoint.sh
    depends_on:
      - web

  web:
    restart: always
    build:
      network: host
      context: src/.
    hostname: web
    expose:
      - "8000"
      - "22"
    volumes:
      - ./src:/var/www/web_reflectivity/app
      - web-static:/var/www/web_reflectivity/static
      - ./src/docker-entrypoint.sh:/usr/bin/docker-entrypoint.sh
    env_file:
     - .env
    command: /usr/bin/docker-entrypoint.sh
    depends_on:
      - db
      - redis

  db:
    restart: always
    image: code.ornl.gov:4567/rse/images/postgres:9.6.23
    env_file:
     - .env
    ports:
      - "${DATABASE_PORT}:${DATABASE_PORT}"
    volumes:
      - pgdata:/var/lib/postgresql/data

  redis:
    image: code.ornl.gov:4567/rse/images/redis:6.2.5
    expose:
      - "6379"
    volumes:
      - /tmp/log/web_reflectivity/redis:/var/log
      - ./cfg/redis/redis.conf:/usr/local/etc/redis/redis.conf
    command: redis-server /usr/local/etc/redis/redis.conf

  worker:
    image: code.ornl.gov:4567/rse/images/refl1d:0.8.15
    volumes:
      - ./cfg/worker/docker-entrypoint.sh:/opt/refl1d/docker-entrypoint.sh
    env_file:
      - .env
    expose:
      - "22"
    command: /opt/refl1d/docker-entrypoint.sh

volumes:
  pgdata:
  web-static:

nginx 生成进程来处理传入的请求。

From the beginner's guide:

nginx has one master process and several worker processes. The main purpose of the master process is to read and evaluate configuration, and maintain worker processes. Worker processes do actual processing of requests. nginx employs event-based model and OS-dependent mechanisms to efficiently distribute requests among worker processes. The number of worker processes is defined in the configuration file and may be fixed for a given configuration or automatically adjusted to the number of available CPU cores