Welcome! Log In Create A New Profile

Advanced

How to avoid blocking Nginx with long request

MAGNIEN, Thierry
April 10, 2013 09:28AM
Hi,

I'm writing an Nginx module that uses information stored in memory to redirect requests to other servers. Basically when a GET requests arrives, it makes some checks and decides to which Location the requests shall be redirected. In order to have Nginx update the information it holds in memory, I send him a specific POST request to trigger it.

However, reloading information takes quite a lot of time and I have some questions related with this:
- while the POST request is handled in my module, the worker that took the request is blocked until it has finished processing, but if GET requests come in, are they handled by other workers or can I have some GET requests getting blocked ?
- if I want the processing not to block, can I use an event timer, in order to release the worker quickly and have the processing take place "in background" ? Or will it block a worker anyway ?

Thanks,
Thierry

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

How to avoid blocking Nginx with long request

MAGNIEN, Thierry 1012 April 10, 2013 09:28AM

Re: How to avoid blocking Nginx with long request

Maxim Dounin 369 April 10, 2013 09:42AM

Re: How to avoid blocking Nginx with long request

Jeff Kaufman 412 April 10, 2013 09:58AM

RE: How to avoid blocking Nginx with long request

MAGNIEN, Thierry 562 April 10, 2013 10:50AM



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

Online Users

Guests: 258
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