You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,21 @@ local redis, err = rc:connect{
104
104
}
105
105
```
106
106
107
+
## Proxy Mode
108
+
109
+
Enable the `connection_is_proxied` parameter if connecting to Redis through a proxy service (e.g. Twemproxy).
110
+
These proxies generally only support a limited sub-set of Redis commands, those which do not require state and do not affect multiple keys.
111
+
Databases and transactions are also not supported.
112
+
113
+
Proxy mode will disable switching to a DB on connect.
114
+
Unsupported commands (defaults to those not supported by Twemproxy) will return `nil, err` immediately rather than being sent to the proxy, which can result in dropped connections.
115
+
116
+
`discard` will not be sent when adding connections to the keepalive pool
117
+
118
+
119
+
## Disabled commands
120
+
121
+
If configured as a table of commands, the command methods will be replaced by a function which immediately returns `nil, err` without forwarding the command to the server
107
122
108
123
## Default Parameters
109
124
@@ -115,16 +130,20 @@ local redis, err = rc:connect{
115
130
connection_options= {}, -- pool, etc
116
131
keepalive_timeout=60000,
117
132
keepalive_poolsize=30,
118
-
133
+
119
134
host="127.0.0.1",
120
135
port="6379",
121
136
path="", -- unix socket path, e.g. /tmp/redis.sock
0 commit comments