This study presents a performance optimization method for Flask-based SaaS web services under high concurrency. To address blocking I/O issues in the default Sync Worker model, we converted Gunicorn to Gevent Worker and applied Monkey Patching. Experi...
This study presents a performance optimization method for Flask-based SaaS web services under high concurrency. To address blocking I/O issues in the default Sync Worker model, we converted Gunicorn to Gevent Worker and applied Monkey Patching. Experimental results showed that while Sync Worker (workers=10) experienced response delays under multiple concurrent connections, Gevent Worker (workers=8, worker_connections=300) maintained stable response times even with 100 concurrent connections. Notably, we achieved a 78.1% response time improvement in a 50-user concurrent environment. By reducing the number of workers while increasing worker_connections, we achieved stable handling of more simultaneous connections, thereby accomplishing both memory efficiency and high concurrency. This study demonstrates a cost-effective optimization approach for achieving high concurrency with limited resources.