Skip to content

Commit

Permalink
added a sample for using with ngx_http_upstream_keepalive.
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh committed Dec 16, 2010
1 parent 117c88d commit ed7e6e1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README
Expand Up @@ -46,9 +46,31 @@ Directives

Connection Pool
You can use Maxim Dounin's excellent ngx_http_upstream_keepalive module
( http://mdounin.ru/hg/ngx_http_upstream_keepalive/ )
with this module to privide TCP connection pool
for Redis.

A sample config snippet looks like this

http {
upstream backend {
server 127.0.0.1:6379;

# a pool with at most 1024 connections
# and do not distinguish the servers:
keepalive 1024 single;
}

server {
...
location /redis {
set_unescape_uri $query $arg_query;
redis2_query $query;
redis2_pass backend;
}
}
}

Installation
1. Grab the nginx source code from nginx.net (<http://nginx.net/>), for
example, the version 0.8.53 (see nginx compatibility),
Expand Down

0 comments on commit ed7e6e1

Please sign in to comment.