Rate This Document
Findability
Accuracy
Completeness
Readability

Tuning Backend Connections

In the test environment, if the connections between Nginx and Memcached are short connections, the main thread of Memcached spends a great deal of time allocating connections to other threads. The core usage of the main thread reaches 100%, which becomes a performance bottleneck. Therefore, you need to set the Nginx-Memcached connections to persistent connections to reduce the overhead of the main thread and improve the overall performance of the server.

Add the keepalive configuration to the upstream section in the nginx.conf file.
upstream memcached_backend{
server 172.19.22.53:11211;
keepalive 500; }