kaxil commented on PR #60919: URL: https://github.com/apache/airflow/pull/60919#issuecomment-3784520811
## Additional Gotcha: No Memory Sharing Worth adding to the Gotchas section: **No memory sharing between workers**: Unlike Gunicorn (which uses preload + fork for copy-on-write memory sharing), uvicorn's multiprocess mode spawns independent workers that each load everything separately. This means: - Each worker has its own copy of all loaded modules, configurations, and cached data - Total memory usage scales linearly with worker count (N workers = ~NĂ— memory) - For memory-constrained deployments with multiple workers, consider using `gunicorn` server_type (from #60921) instead, which shares read-only memory pages across workers This is an inherent limitation of uvicorn's multiprocessing approach vs gunicorn's preload+fork model. -- 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]
