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

Use persistent connections to redis instance #55

Open
iprok opened this issue Apr 13, 2017 · 3 comments
Open

Use persistent connections to redis instance #55

iprok opened this issue Apr 13, 2017 · 3 comments

Comments

@iprok
Copy link

iprok commented Apr 13, 2017

Please make an option to use persistent connection to redis: https://github.com/phpredis/phpredis#pconnect-popen .

It's much faster then raw "connect" (and sometimes then unix socket!) and the only change to implement is to change "connect" to "pconnect" in your code when connecting to redis instance.

We've done it in our installation when we begin to get too many redis connections. Everything goes fine.

@mattab
Copy link
Member

mattab commented Jun 21, 2017

Thanks for the suggestion. Pull request welcome!

@siva538
Copy link

siva538 commented Sep 26, 2018

@iprok , can you please confirm if this has been performance tested? Seems the downside of this is more number of open connections in the Redis Server side, which I believe can be handled with the timeout setting.

Thanks in advance.

@toredash
Copy link
Contributor

toredash commented May 7, 2019

We have implemented twemproxy / nutcracker in our environment with great success. For this to work we had to modify https://github.com/matomo-org/plugin-QueuedTracking/blob/master/Queue/Backend/Redis.php#L260-L262 to not selecting as DB, as this is not a supported command in twemproxy.

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