Skip to content

Commit

Permalink
documented echo_blocking_sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh committed Oct 14, 2009
1 parent 10e9b86 commit 79e97bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README
Expand Up @@ -56,12 +56,18 @@ This is a sample configuration snippet in your nginx.conf file:

As you can see, the directives currently provided by this module are
"echo", "echo_client_request_headers", "echo_sleep", and "echo_flush".
And there's also an "echo_blocking_sleep" directive for completeness.

The "echo_sleep" directive is a non-blocking sleep on the server side. So if your
nginx worker process is "sleeping" for one request, it could serve other requests
*at the same time*. On my laptop, with only 1 nginx worker process, my nginx can
achieve 5500+ requests per second at the concurrency level of 10k.

On the other hand, "echo_blocking_sleep" is a blocking version of
"echo_sleep" and it will freeze the whole Nginx worker process. It's
provided merely meant to be compared with "echo_sleep". And you should
never use it for production.

The "echo_flush" directive is needed whenever you need to force flushing the previous
outputs potentially buffered without sending to the client.

Expand Down

0 comments on commit 79e97bb

Please sign in to comment.