Demystifying Process and Worker Models in Python Web Frameworks

Ashutosh Pednekar (~ashupednekar)




In the realm of Python web development, understanding process and worker models is vital for building performant and scalable applications. This talk aims to demystify the various process and worker models employed by popular Python web frameworks like Gunicorn, Uvicorn, and Gevent. We will explore the pros, cons, and use cases for each model, enabling attendees to make informed decisions when selecting the right framework for their projects.

In this talk, we will delve into the intricacies of process and worker models within Python web frameworks, shedding light on their strengths, limitations, and how to choose the most suitable model for specific use cases.

We will begin by examining Gunicorn's pre-fork worker model, which provides stability and load balancing by employing a master process that manages multiple worker processes. We will discuss the benefits of this model in terms of stability and resource utilization, as well as its limitations concerning high concurrency scenarios.

Next, we will dive into Uvicorn's asynchronous worker model, built upon the asyncio library. With a focus on efficiency and concurrency, Uvicorn's model allows for handling multiple requests concurrently using the event loop. We will explore the advantages of this model, such as high performance and scalability, and highlight considerations when working with asynchronous frameworks.

Lastly, we will explore Gevent, a coroutine-based networking library that enhances concurrency capabilities. Although not a web server itself, Gevent can be integrated with other frameworks to improve performance. We will discuss the cooperative threading provided by Gevent and its benefits in handling concurrent connections.

Throughout the talk, we will present real-world use cases and benchmarks to demonstrate the strengths and trade-offs of each model. Attendees will gain a comprehensive understanding of process and worker models in Python web frameworks, empowering them to choose the most suitable option based on their application's requirements.

Whether you are a beginner exploring web development or an experienced developer seeking to optimize your application's performance, this talk will provide valuable insights into process and worker models, equipping you with the knowledge to make informed decisions when selecting Python web frameworks for your projects.

Join us for an enlightening session as we demystify process and worker models in Python web frameworks, unraveling the key factors that determine the performance and scalability of your web applications.


Participants should have prior experience working with at least one Python web framework, such as Django, Flask, or FastAPI. This experience should include familiarity with concepts such as routing, handling requests and responses, templates (if applicable), and working with databases (if applicable).

Section: Web & App development
Type: Talks
Target Audience: Intermediate
Last Updated: