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

[11.x] Add support for phpredis backoff and max retry config options #54191

Merged

Conversation

TheLevti
Copy link
Contributor

@TheLevti TheLevti commented Jan 14, 2025

This pull request adds support for the phpredis backoff/retry configs.

Those settings are crucial for high performance applications. Currently I am forced to overwrite the driver in many services to leverage those configs. It would be amazing if you can merge this to support those configs out of the box.

I have confirmed with the phpredis maintainer, that those settings are currently only available to the normal Redis class, not for RedisCluster yet, so I did not add them to the cluster setup.

Reasoning

This has been added to phpredis by recommendation from an AWS blog post: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

Especially when using phpredis with AWS Serverless where auto scaling constantly drops connections, it is important to spread out the reconnect attempts. The default phpredis is a linear backoff approach, which is not ideal.

@taylorotwell taylorotwell merged commit 0b6d699 into laravel:11.x Jan 15, 2025
40 checks passed
@TheLevti TheLevti deleted the feature/phpredis-backoff-algorithm branch January 15, 2025 20:52
TheLevti added a commit to TheLevti/docs that referenced this pull request Jan 15, 2025
Mention the newly added phpredis config options that users are able to specify (see: laravel/framework#54191)
taylorotwell pushed a commit to laravel/docs that referenced this pull request Jan 15, 2025
Mention the newly added phpredis config options that users are able to specify (see: laravel/framework#54191)
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

Successfully merging this pull request may close these issues.

2 participants