vatsrahul1001 commented on issue #43035:
URL: https://github.com/apache/airflow/issues/43035#issuecomment-2547978428

   The current GunicornMonitor provides the following capabilities:
   
   1. [Automatic worker restarts if workers crash or 
hang](https://github.com/apache/airflow/blob/main/airflow/cli/commands/local_commands/webserver_command.py#L257):
  
      Ensures that if a worker crashes or becomes unresponsive, it is 
automatically restarted.
   
   3. [Graceful worker scaling and 
reloads](https://github.com/apache/airflow/blob/main/airflow/cli/commands/local_commands/webserver_command.py#L162):
     This allows for addition and removal of workers and reloads workers 
gracefully when needed.
   
   4. [Timeout management for unresponsive 
workers](https://github.com/apache/airflow/blob/main/airflow/cli/commands/local_commands/webserver_command.py#L154):
   Gunicorn monitors workers for unresponsiveness and can terminate them if 
they exceed a set timeout, preventing hangs.
   
   
   If we switch to `uvicorn.run()`, we would lose these features since 
`uvicorn.run() `lacks built-in process management. Specifically:
   
   If a worker dies, there's no master process to restart it.
   There will be no automatic scaling of workers, and no handling of worker 
timeouts or periodic restarts.
   To replicate this functionality, we would need an external process manager 
like systemd or supervisord, which adds additional complexity and overhead.
   
   cc: @kaxil @ashb 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to