Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated the docs for the limitations on redis pub/sub. thanks LazyZhu…

… for pointing out the potential confusions.
  • Loading branch information...
commit 1e14554f631ac89d9e556d3e7a1ac691eb931b39 1 parent af49d3b
@agentzh agentzh authored
Showing with 20 additions and 4 deletions.
  1. +9 −1 README
  2. +6 −2 README.markdown
  3. +5 −1 doc/HttpRedis2Module.wiki
View
10 README
@@ -487,7 +487,10 @@ Redis Publish/Subscribe Support
You can surely parse the replies with the [[LuaRedisParser]] library if
you're using Lua to access this module's location.
- Publish/Subscribe Limitations
+ Limitations For Redis Publish/Subscribe
+ If you want to use the Redis pub/sub (<http://redis.io/topics/pubsub>)
+ feature with this module, then you must note the following limitations:
+
* You cannot use [[HttpUpstreamKeepaliveModule]] with this Redis
upstream. Only short Redis connections will work.
@@ -498,6 +501,11 @@ Redis Publish/Subscribe Support
* You should tune the various timeout settings provided by this module
like redis2_connect_timeout and redis2_read_timeout.
+ If you cannot stand these limitations, then you are highly recommended
+ to switch to the lua-resty-redis
+ (<https://github.com/agentzh/lua-resty-redis>) library for
+ [[HttpLuaModule]].
+
Performance Tuning
* When you're using this module, please ensure you're using a TCP
connection pool (provided by [[HttpUpstreamKeepaliveModule]]) and
View
8 README.markdown
@@ -496,13 +496,17 @@ And then publish a message for the key `/foo/bar` in the `redis-cli` command lin
You can surely parse the replies with the [LuaRedisParser](http://wiki.nginx.org/LuaRedisParser) library if you're using Lua to access this module's location.
-Publish/Subscribe Limitations
------------------------------
+Limitations For Redis Publish/Subscribe
+---------------------------------------
+
+If you want to use the [Redis pub/sub](http://redis.io/topics/pubsub) feature with this module, then you must note the following limitations:
* You cannot use [HttpUpstreamKeepaliveModule](http://wiki.nginx.org/HttpUpstreamKeepaliveModule) with this Redis upstream. Only short Redis connections will work.
* There may be some race conditions that produce the harmless `Redis server returned extra bytes` warnings in your nginx's error.log. Such warnings might be rare but just be prepared for it.
* You should tune the various timeout settings provided by this module like [redis2_connect_timeout](http://wiki.nginx.org/HttpRedis2Module#redis2_connect_timeout) and [redis2_read_timeout](http://wiki.nginx.org/HttpRedis2Module#redis2_read_timeout).
+If you cannot stand these limitations, then you are highly recommended to switch to the [lua-resty-redis](https://github.com/agentzh/lua-resty-redis) library for [HttpLuaModule](http://wiki.nginx.org/HttpLuaModule).
+
Performance Tuning
==================
View
6 doc/HttpRedis2Module.wiki
@@ -471,12 +471,16 @@ And then publish a message for the key <code>/foo/bar</code> in the <code>redis-
You can surely parse the replies with the [[LuaRedisParser]] library if you're using Lua to access this module's location.
-== Publish/Subscribe Limitations ==
+== Limitations For Redis Publish/Subscribe ==
+
+If you want to use the [http://redis.io/topics/pubsub Redis pub/sub] feature with this module, then you must note the following limitations:
* You cannot use [[HttpUpstreamKeepaliveModule]] with this Redis upstream. Only short Redis connections will work.
* There may be some race conditions that produce the harmless <code>Redis server returned extra bytes</code> warnings in your nginx's error.log. Such warnings might be rare but just be prepared for it.
* You should tune the various timeout settings provided by this module like [[#redis2_connect_timeout|redis2_connect_timeout]] and [[#redis2_read_timeout|redis2_read_timeout]].
+If you cannot stand these limitations, then you are highly recommended to switch to the [https://github.com/agentzh/lua-resty-redis lua-resty-redis] library for [[HttpLuaModule]].
+
= Performance Tuning =
* When you're using this module, please ensure you're using a TCP connection pool (provided by [[HttpUpstreamKeepaliveModule]]) and Redis pipelining wherever possible. These features will significantly improve performance.
Please sign in to comment.
Something went wrong with that request. Please try again.