abhijeets25012-tech commented on code in PR #61494: URL: https://github.com/apache/airflow/pull/61494#discussion_r2776738246
########## airflow-core/docs/administration-and-deployment/web-stack.rst: ########## @@ -138,3 +138,36 @@ Use the default uvicorn when: - Running on Windows - Running in development or testing environments - Running short-lived containers (e.g., Kubernetes pods that get recycled) + +.. _running-uvicorn-on-kubernetes: + +Running Uvicorn on Kubernetes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When running the API server with ``server_type = uvicorn`` on Kubernetes, +the API server runs as a single long-lived process per pod and does not +support rolling worker restarts like ``gunicorn``. + +In long-running Kubernetes deployments, this may lead to gradual memory +growth or stale internal state over time. For this reason, it is recommended +to periodically restart API server pods when using uvicorn. + +Recommended approaches include: + +- **Kubernetes rolling restarts** of the API server Deployment to recycle pods + without downtime. +- ``Helm-based restarts``, such as triggering a ``rollout`` during a Helm upgrade + or by changing a restart annotation. +- **Cluster-level mechanisms** (for example, scheduled restarts) when running + uvicorn for extended periods. Review Comment: Thanks for the clarification! Noted about #61432. Glad this PR can be merged now -- 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]
