New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to select a database while connecting. #31
Comments
you can simply run in the same Lua block: redis2_query select 8; This works because the queries are pipelined before using redis2_pass |
Oké, does this mean i'll also get twice the raw tcp information back? |
@NicholasMolenaar Yes. A more flexible and efficient approach is to use ngx_lua with the lua-resty-redis library instead. See |
Sorry guys, I don't undestand, I did a tcpodump for the redis_queries above: 09:27:19.310969 IP localhost.46289 > localhost.distinct: Flags [P.], seq 1:47, ack 1, win 512, options [nop,nop,TS val 62266277 ecr 62266277], length 46 I see both redis command batched in one packet and only once. |
@maurorappa Redis supports command pipelining, which is much more efficient. See |
All though the usage of databases in Redis seems some what useless. its a really handy feature when hosting multiple websites on the same server to avoid key collision.
Could we add this feature or put it into the documentation if it already exists?
The text was updated successfully, but these errors were encountered: