we are load balancing websocket connections with kong.
During our load tests we recognized that kong can handle much less websocket connections than the standard kubernetes nginx.
Kong gives up at 10k concurrent connections while for nginx we could reach 60k.
Error messages of kong:
[alert] 33#0: 16384 worker_connections are not enough [alert] 33#0: *21541620 16384 worker_connections are not enough while connecting to upstream, client: x.x.x.x, server: kong, request: "GET /cable?chatbot_name=bot HTTP/1.1", upstream: "http://10.42.64.27:8080/cable?chatbot_name=bot", host: "bot.example.com"
We tried to tune this but looking at the relevant parameters revealed kong it should be able to handle more connections than nginx.
worker_processes auto; # should be 16 in our case worker_connections 16384; worker_rlimit_nofile 1048576;
worker_processes 16; worker_connections 16384; worker_rlimit_nofile 64512;
Why are the limits for kong that much lower?
Any Tipps how to tune kong to get to a similar level?