Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Cache] improve perf when using RedisCluster by reducing roundtrips to the servers #28269

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

Merged

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 26, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Improves perf when using RedisCluster by:

  • disabling versioning and replacing by per-master clear/flush
  • grouping multiple "get" in one "mget"
  • enabling pipelining in PredisCluster mode

Might need adjustment depending on the answer to predis/predis#520

@stof
Copy link
Member

stof commented Aug 27, 2018

Do you have some benchmark ?

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Aug 27, 2018

Yes: https://blackfire.io/profiles/compare/8faaebbb-ced2-49e2-a043-ac9d6361d97e/graph

image

From 1.6s to 1.4s on a simple multifetch done 10k times (Blackfire disabled).

@nicolas-grekas nicolas-grekas force-pushed the cache-redis-cluster-optim branch from b48dc34 to 5155f48 Compare August 31, 2018 08:53
@nicolas-grekas nicolas-grekas merged commit 5155f48 into symfony:master Aug 31, 2018
nicolas-grekas added a commit that referenced this pull request Aug 31, 2018
… roundtrips to the servers (nicolas-grekas)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] improve perf when using RedisCluster by reducing roundtrips to the servers

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Improves perf when using RedisCluster by:
- disabling versioning and replacing by per-master clear/flush
- grouping multiple "get" in one "mget"
- enabling pipelining in PredisCluster mode

~Might need adjustment depending on the answer to predis/predis#520

Commits
-------

5155f48 [Cache] improve perf when using RedisCluster by reducing roundtrips to the servers
@nicolas-grekas nicolas-grekas deleted the cache-redis-cluster-optim branch September 1, 2018 17:07
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.2 Nov 1, 2018
andrerom pushed a commit to andrerom/symfony that referenced this pull request Mar 11, 2019
…e servers

This is slimmed down version of: symfony#28269 _(many of the fixes here are already part of 3.4)_

Adds:
- Test coverage for Predis with RedisCluster
- Removes usage of key versioning when on RedisCluster, besides performance aspect of that simplify / aligning clear() handling across cases
andrerom pushed a commit to andrerom/symfony that referenced this pull request Mar 11, 2019
…e servers

This is slimmed down version of: symfony#28269 _(many of the fixes here are already part of 3.4)_

Adds:
- Test coverage for Predis with RedisCluster
- Removes usage of key versioning when on RedisCluster, besides performance aspect of that simplify / aligning clear() handling across cases
andrerom pushed a commit to andrerom/symfony that referenced this pull request Mar 11, 2019
…e servers

This is slimmed down version of: symfony#28269 _(many of the fixes here are already part of 3.4)_

Adds:
- Test coverage for Predis with RedisCluster
- Removes usage of key versioning when on RedisCluster, besides performance aspect of that simplify / aligning clear() handling across cases
nicolas-grekas added a commit that referenced this pull request Mar 13, 2019
…trips to the servers (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Fix perf when using RedisCluster by reducing roundtrips to the servers

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

This is slimmed down version of: #28269 _(many of the fixes there are already part of 3.4)_

Does:
- Adds test coverage for Predis with RedisCluster
- Removes usage of key versioning when on RedisCluster, besides performance aspect of that it simplifies / aligning clear() handling across all clients
- reuse doDelete() from clear to make sure we call singular del calls when in predis cluster

Commits
-------

dacf179 [Cache] Fix perf when using RedisCluster by reducing roundtrips to the servers
symfony-splitter pushed a commit to symfony/cache that referenced this pull request Mar 13, 2019
…e servers

This is slimmed down version of: symfony/symfony#28269 _(many of the fixes here are already part of 3.4)_

Adds:
- Test coverage for Predis with RedisCluster
- Removes usage of key versioning when on RedisCluster, besides performance aspect of that simplify / aligning clear() handling across cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants