Skip to content

Use persistent connections to redis instance #55

Description

@iprok

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.

Activity

  1. mattab commented on Jun 21, 2017

    @mattab
    Member

    Thanks for the suggestion. Pull request welcome!

  2. siva538 commented on Sep 26, 2018

    @siva538

    @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.

  3. toredash commented on May 7, 2019

    @toredash
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions