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

Redis Cluster support #23204

Closed
wants to merge 4 commits into from
Closed

Redis Cluster support #23204

wants to merge 4 commits into from

Conversation

RobinMcCorkell
Copy link
Member

This adds the ability to specify a Redis Cluster, rather than a single Redis server, with the new redis.cluster config.php key. There are no unit tests for this since we would need a way to run Docker containers for multiple Redis servers, with the whole kill-a-master-everything-should-work thing.

Note that this does NOT bring support for Redis Sentinel-based configurations, or manual master-slave configurations, that is a different architecture.

Also, there seems to be no way to do authentication or DB index selection with a cluster, for those features you'll want the single server mode

Fixes #21448

cc @pako81 @cdamken @MorrisJobke @MTRichards

@PVince81
Copy link
Contributor

CC @DeepDiver1975 @icewind1991

if(isset($config['password']) && $config['password'] !== '') {
self::$cache->auth($config['password']);
}
if ($config = $systemConfig->getValue('redis.cluster', [])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it makes sense to subclass here instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, actually, that's probably a really good idea.

@karlitschek
Copy link
Contributor

looks good. 👍 @DeepDiver1975 ?

@icewind1991
Copy link
Contributor

Code looks good, would prefer to have some additional testing before merging though

@RobinMcCorkell
Copy link
Member Author

⚠️ Currently, phpredis does not have a released version that includes clustering support. Their primary development git branch contains the necessary code, but there's no telling when they decide to release it. It seems that some admins compile their own versions of phpredis, so they get the nice new features... cc @Ethendrel

Not sure how we want to take this? Do enterprise customers want support now, even if that means compiling a development version of phpredis?

@Ethendrel
Copy link

As an enterprise edition customer I would like to see it implemented rather soon, as transactional file locking is apparently strongly recommended but requires redis. This feature would be needed to maintain the high availability in our clustered environment while using the preferred file locking mechanism.
the feature has been running without problems now in our setup for the last 2 days.
btw. I am using phpredis 2.2.7 which seems to be the stable version

@RobinMcCorkell
Copy link
Member Author

@Ethendrel Are you sure? That would be surprising to me, since 2.2.7 does not include the cluster code according to GitHub. Could it be that you've got a git-compiled version, but the version code in the extension is still 2.2.7 (they only update the version number at release)?

@RobinMcCorkell
Copy link
Member Author

Closed in favour of #24033

@RobinMcCorkell RobinMcCorkell deleted the redis-cluster branch April 18, 2016 08:31
@felixboehm
Copy link
Contributor

Is there cluster support in future? #24033 was put in backlog, so this might be of interest again.

@PVince81
Copy link
Contributor

@DeepDiver1975 since predis support was deferred to future, we should reopen this and revive @Xenopathic's PR for cluster support

@PVince81 PVince81 restored the redis-cluster branch April 26, 2016 14:36
@PVince81 PVince81 reopened this Apr 26, 2016
@MorrisJobke
Copy link
Contributor

@DeepDiver1975 since predis support was deferred to future, we should reopen this and revive @Xenopathic's PR for cluster support

Implement a completely new interface to just throw it away in the next release (or the one after that) 😕

@DeepDiver1975
Copy link
Member

Implement a completely new interface to just throw it away in the next release (or the one after that) 😕

Agreed - I honestly don't see this in the scope of 9.1 - this needs some serious thinking which usually has to be done before a release.

@karlitschek I'd like to put this to 9.2 and have a discussion first on where we want to go.
@cmonteroluque @MTRichards FYI

@MTRichards
Copy link
Contributor

@DeepDiver1975 that sounds like a GREAT idea. This has potentially a serious set of implications...

@DeepDiver1975 DeepDiver1975 added this to the 9.2-next milestone Apr 27, 2016
@DeepDiver1975
Copy link
Member

I'm closing this for now - we can restore the branch any time if necessary

@DeepDiver1975 DeepDiver1975 deleted the redis-cluster branch May 30, 2016 11:59
@DeepDiver1975 DeepDiver1975 restored the redis-cluster branch October 19, 2016 09:54
@DeepDiver1975 DeepDiver1975 reopened this Oct 19, 2016
@DeepDiver1975 DeepDiver1975 self-assigned this Oct 19, 2016
@DeepDiver1975
Copy link
Member

rebasing is pointless -> close and restart

@DeepDiver1975 DeepDiver1975 deleted the redis-cluster branch October 19, 2016 10:09
@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clustered ownCloud with clustered Redis in HA environment
9 participants