Welcome! Log In Create A New Profile

Advanced

Re: Does Nginx have separate queuing mechanism for requests?

Maxim Dounin
October 02, 2013 11:42AM
Hello!

On Wed, Oct 02, 2013 at 10:04:23AM -0400, amehzenin wrote:

> Hello.
>
> Consider the following situation: you are deploying application that can
> serve 1 req./sec. What would happen if I send 10 request in 1 second? I
> wrote simple app to test that:
> https://github.com/amezhenin/nginx_slow_upstream .
> This test shows that your requests will be served _in_exact_same_order_
> they were sent.
>
> For now, this looks like Nginx have some kind of queue for requests, but my
> colleague(administrator) sayd that there is no any queues in Nginx. So I
> wrote another question about epoll here:
> http://stackoverflow.com/questions/19114001/does-epoll-preserve-the-order-in-which-fds-was-registered
> . From that discussion I figured that epoll does preserves the order of
> requests.
>
> I have two questions:
> 1) Is there any mistakes in reasoning/code above?
> 2) Does Nginx have some sort of queue for requests on top of epoll? Or Nginx
> uses pure epoll functionality?

There is no queue in nginx, but there is queue in a listen socket
of your backend app. It's called "listen queue" or "backlog" and
likely it's what preserves a request order for you.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

Does Nginx have separate queuing mechanism for requests?

amehzenin October 02, 2013 10:04AM

Re: Does Nginx have separate queuing mechanism for requests?

Maxim Dounin October 02, 2013 11:42AM

Re: Does Nginx have separate queuing mechanism for requests?

amehzenin October 03, 2013 10:26AM

Re: Does Nginx have separate queuing mechanism for requests?

Maxim Dounin October 03, 2013 11:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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