Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plugins) don't call redis:select when not necessary (#3973)
In rate-limiting and response-ratelimiting, a redis:select is called when connection is reused, even though the current configured redis database is 0, to clear the previously selected database. This will be problem when for some use cases like twemproxy where select is not supported, and sending `select` call will cause the connection to be closed. The patch uses a host+port+database based redis connection pool, so that we always know the current connection is using correct database.
- Loading branch information
Showing
2 changed files
with
50 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters