I'm trying to add mapping for 20K Ports (range [40k-60k]) in the nginx configuration. This config is added to nginx.conf
stream{
server {
listen 40000;
listen 40001;
.
.
.
listen 60000;
proxy_pass <backend-url>:$server_port;
}
}
Everything works jolly-good when number of mappings is < 500. But when it's increased to 20K mappings, the delay in response is tremendous. Any work-around or any other method to add port-forwarding?