Welcome! Log In Create A New Profile

Advanced

Re: Does Nginx block on file IO?

May 01, 2011 09:54PM
Andy Wrote:
-------------------------------------------------------
> I was always under the impression that Nginx is
> non-blocking for file IO. Then I was told it
> wasn't.

Actually AIO support was added not so long ago. It can be non-blocking for file IO on systems with AIO.

> If Nginx blocks for file IO, then
> using Nginx here wouldn't be any better than using
> Apache, right?

How is it even related? There is a difference between getting a file from disk and serving it to the client from buffer. You can get it really fast and block for a very little time but than send it to the client very slowly. So asynchronous front-end would be a really good idea.
Other than that you might find that neither nginx nor apache can serve your images fast enough from any common filesystem. You will need something like Bitcask to go farther. The idea is to get an entire image to the buffer in a single disk seek.
Subject Author Posted

Does Nginx block on file IO?

Andy May 01, 2011 08:26PM

Re: Does Nginx block on file IO?

jjjx128 May 01, 2011 09:54PM

Re: Does Nginx block on file IO?

Piotr Sikora May 02, 2011 01:24AM

Re: Does Nginx block on file IO?

Piotr Sikora May 02, 2011 01:30AM

Re: Does Nginx block on file IO?

Justin Cormack May 02, 2011 07:08AM

Re: Does Nginx block on file IO?

jjjx128 May 02, 2011 07:17AM

Re: Does Nginx block on file IO?

jjjx128 May 02, 2011 07:25AM

Re: Does Nginx block on file IO?

Cliff Wells May 02, 2011 02:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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