Gunicorn is a production-grade WSGI HTTP server designed for deploying Python web applications. It functions as a process manager that utilizes a pre-fork worker model, where a master process initializes the application and spawns multiple child processes to handle incoming requests in parallel. This architecture ensures high performance and stability by isolating application execution within persistent worker processes.
The server distinguishes itself through its flexible concurrency models and robust process lifecycle management. It supports interchangeable worker types, including synchronous, threaded, and asynchronous event loops, allowing it to accommodate diverse application requirements ranging from standard request-response cycles to persistent connections like WebSockets. The master process orchestrates these workers using signal-based control, enabling zero-downtime upgrades, dynamic worker scaling, and graceful reloads without dropping active client connections.
Beyond core process management, the server provides a comprehensive suite of operational tools for production environments. It includes features for request security, SSL/TLS encryption, and integration with reverse proxies via standard protocols. The system also offers extensive observability through configurable logging, metrics instrumentation, and support for task offloading to maintain responsiveness under load.
The software is distributed as a Python package and can be executed via command-line interface or embedded programmatically within custom application environments.