[11.x] Add support for phpredis backoff and max retry config options#54191
Merged
taylorotwell merged 1 commit intoJan 15, 2025
Merged
Conversation
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)
|
Shouldn't we add the default values to the actual config file, so people can see those and adjust accordingly? |
Contributor
Author
Default is those values are not set at all. You can of course add the values that indicate disabled, but that is just unecessary work with no effect. Besides, not every setup has the Redis extension installed and that would lead to referencing unknown constants. Those options are stated in the docs. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Redisclass, not forRedisClusteryet, 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.