-
-
Notifications
You must be signed in to change notification settings - Fork 310
Using Resty Redis Cluster library
Conor McKnight edited this page May 28, 2026
·
5 revisions
The script will work without the need for any external libraries but I did build in the option to use them if you like.
To use the resty redis cluster library all you need to do is edit your nginx config to include this in your http block http {
# Updated and maintained Library https://github.com/api7/lua-resty-redis-cluster
lua_package_path "./conf/lua/lua-resty-redis-cluster/lib/resty/?.lua;;";Then you can change your config to work with Resty Redis Cluster like so.
localized.remote_servers_table = {
8, --storage server for cache redis = 1 memcached = 2 lrucache = 3 ngx.shared.dict = 4 resty.redis.fast = 5 resty.redis.cluster.fast = 6 resty.memcached.fast = 7 rediscluster = 8This library is up-to-date and maintained by API7 :)