Skip to content
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

Connect to non-zero Redis databases #1726

Closed
logronoide opened this issue Oct 9, 2016 · 3 comments
Closed

Connect to non-zero Redis databases #1726

logronoide opened this issue Oct 9, 2016 · 3 comments

Comments

@logronoide
Copy link

Summary

Some plugins (request/response rate limits) can use Redis as an external fast persistent storage. To connect to Redis, the parameters are host, port and password (optional). It's not possible to select a non-zero database in Redis. As result, it's not possible to share an existing Redis deployment if the zero database is already in use.

I suggest to add a new parameter with the cardinal of the database in Redis, being zero by default. The resyt-redis author suggest to implement this feature as follows: openresty/lua-resty-redis#53

Steps To Reproduce

  1. Configure a rate-limiting plugin to connect to an existing Redis database with zero database in use.
  2. Both data sets will be stored in the same database.
  3. There is a chance of data corruption.
@thibaultcha
Copy link
Member

I can see the value in this indeed. We'd need a new configuration field in the plugin configuration I believe, and as mentioned: select a different database on first connection, and use a different connection pool for each database.

@flypenguin
Copy link

flypenguin commented Feb 13, 2017

just to be sure - it is supported in Kong 0.9.9, and not yet in the documentation, right?

and the field in the config is config.redis_database, right?

please clarify :)

(/CC @andersonbn)

@subnetmarco
Copy link
Member

It's supported in 0.10 (you can play with the RC) but not in 0.9.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants