Welcome! Log In Create A New Profile

Advanced

Using single persistent socket to send subrequests

December 29, 2021 01:32AM
Hi,

We have a auth module in our code that sends requests to a server and waits for response to approve the request before proceeding to forward the request to a proxy server.

We use the function ngx_http_post_request to post the subrequest.

As I understand, this function adds the request to a queue which is then processed by ngx_http_run_posted_requests function.

We observe that every single subrequest is sent over a new socket connection. Unfortunately, when we scale to more than 1000 concurrent subrequests, we start seeing socket failures.

Is there a way to specify to this function, to maintain a persistent socket connection with the auth server and reuse the same socket connection for sending multiple subrequests?

Any help is appreciated.

Thanks,
Devashi
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Using single persistent socket to send subrequests

dtandon 743 December 29, 2021 01:32AM

Re: Using single persistent socket to send subrequests

Maxim Dounin 210 December 29, 2021 09:38AM

Re: Using single persistent socket to send subrequests

dtandon 440 December 30, 2021 03:00AM

Re: Using single persistent socket to send subrequests

Maxim Dounin 247 December 30, 2021 03:20AM

Re: Using single persistent socket to send subrequests

dtandon 296 January 13, 2022 02:28AM

Re: Using single persistent socket to send subrequests

dtandon 391 January 28, 2022 01:16AM

Re: Using single persistent socket to send subrequests

Maxim Dounin 233 January 28, 2022 05:28PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 229
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready