https://doi.org/10.36719/2663-4619/110/111-116
Tunar Babali
"Zakalar" lyceum No. 287
11th grade student
https://orcid.org/0009-0008-1767-8148
Nail Mammadov
Azerbaijan State Oil and Industry University
PhD student
https://orcid.org/0000-0003-2820-6265
Optimizing High-Concurrency Access to Conditions Data: A Kubernetes Orchestrated Solution with PostgreSQL and Django
Abstract
In modern web development, ensuring scalable and high-performance applications is essential to meet growing user demand. This article explores the use of Gunicorn and Nginx in scaling Python backends for production environments. Gunicorn, a Python WSGI HTTP server, utilizes a pre-fork worker model to manage concurrent requests efficiently, supporting both synchronous and asynchronous workloads. This scalability is enhanced by configuring the number of workers based on CPU cores.
Nginx, serving as a reverse proxy and load balancer, complements Gunicorn by distributing HTTP requests, handling SSL termination, and reducing server load by serving static content. Together, these technologies create a robust, scalable system capable of handling high traffic volumes while maintaining performance and security. The article delves into key configuration strategies, including worker process management, timeout settings, load balancing, and security considerations, emphasizing best practices for optimizing resource utilization in high-demand environments.
Keywords: gunicorn, nginx, python, FastCGI, scaling