KakaoPage: Resolving BFF Outage Caused by Node.js keepAlive Default Value Error
Key point
The KakaoPage web team resolved CPU overload and TPS degradation on their BFF server, caused by the default `keepAlive` value (false) in Node.js HTTP Agent, by explicitly setting it to true.
Details
The KakaoPage web team experienced an outage where BFF server CPU usage reached 100% due to a traffic surge during the launch of a popular webtoon. Initially suspecting issues with backend APIs or infrastructure (Kubernetes, Ingress), nGrinder load testing revealed that TPS was significantly lower when routing through the BFF compared to calling backend APIs directly. This issue, which could not be resolved through middleware optimization or adjusting the number of Pods, was traced to the default configuration of Node.js's http.Agent. In versions prior to Node.js 19, the default value for the keepAlive option is false, causing overhead from establishing and tearing down TCP connections for every request. The team explicitly set keepAlive to true in https.Agent to enable connection reuse. Subsequent load tests showed a significant improvement in TPS for proxy requests from 720 to 3600, and for GraphQL requests from 560 to 1800.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.