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

support for multiple redis servers #66

Closed
ddplay opened this issue Apr 14, 2016 · 17 comments
Closed

support for multiple redis servers #66

ddplay opened this issue Apr 14, 2016 · 17 comments
Labels
type:enhancement Enhancement
Milestone

Comments

@ddplay
Copy link

ddplay commented Apr 14, 2016

No description provided.

@samdark
Copy link
Member

samdark commented Apr 14, 2016

Yes.

@samdark samdark closed this as completed Apr 14, 2016
@ddplay
Copy link
Author

ddplay commented Apr 15, 2016

how to use?

@samdark
Copy link
Member

samdark commented Apr 15, 2016

Well, define mutiple connections then use them.

@ddplay
Copy link
Author

ddplay commented Apr 15, 2016

well,i mean distributed Redis usage

@cebe cebe added type:enhancement Enhancement and removed question labels Apr 17, 2016
@cebe cebe reopened this Apr 17, 2016
@cebe cebe changed the title does this support multiple redis servers usage? support for multiple redis servers Apr 17, 2016
@samdark
Copy link
Member

samdark commented Apr 17, 2016

Do you mean redis cluster? http://redis.io/topics/cluster-tutorial

@crazyfd
Copy link

crazyfd commented Apr 25, 2016

@samdark @cebe how to define mutiple connections in yii2 redis

@samdark
Copy link
Member

samdark commented Apr 25, 2016

@crazyfd multiple connections or cluster?

@crazyfd
Copy link

crazyfd commented Apr 25, 2016

@samdark redis cluster server is work,how defind in yii2

@samdark
Copy link
Member

samdark commented Apr 25, 2016

If you need just multiple connections, define these as:

'components' => [
    'redis1' => [
        'class' => 'yii\redis\Connection',
        'hostname' => 'localhost',
        'port' => 6379,
        'database' => 0,
    ],
    'redis2' => [
        'class' => 'yii\redis\Connection',
        'hostname' => 'localhost',
        'port' => 6380,
        'database' => 0,
    ],
]

@imxyb
Copy link

imxyb commented Apr 25, 2016

@samdark now i have tow redis server save session,i want to do that when one server is crash the another server will continue read session or write session,how to do that?

@samdark
Copy link
Member

samdark commented Apr 25, 2016

Via using cluster?

@imxyb
Copy link

imxyb commented Apr 25, 2016

@samdark yes

@solracsf
Copy link
Contributor

@pavlelee
Copy link

pavlelee commented Dec 5, 2016

@samdark How to configure redis cluster

@cebe
Copy link
Member

cebe commented Dec 5, 2016

@pavlelee
Copy link

@smartyPHP https://github.com/Liv1020/yii2-redis Use Predis, and fully compatible with the yii2-redis

@cebe cebe added this to the 2.0.8 milestone Dec 11, 2017
ryusoft pushed a commit to ryusoft/yii2-redis that referenced this issue Dec 28, 2017
ryusoft pushed a commit to ryusoft/yii2-redis that referenced this issue Dec 29, 2017
ryusoft pushed a commit to ryusoft/yii2-redis that referenced this issue Dec 30, 2017
ryusoft pushed a commit to ryusoft/yii2-redis that referenced this issue Jan 1, 2018
ryusoft pushed a commit to ryusoft/yii2-redis that referenced this issue Jan 1, 2018
… class, so ignore the test for replica since we applied ensure function
ryusoft pushed a commit to ryusoft/yii2-redis that referenced this issue Jan 1, 2018
… class, so ignore the test for replica since we applied ensure function
cebe pushed a commit that referenced this issue Jan 4, 2018
* #66 distribute the read operation

* #66 Add in Replica enabled test

* #66 Add in some php meta description and change log

* Added nickname [skip ci]

* Doc adjustments [skip ci]

* Update docs and simplified implementation

* #66 Add in exception test

* #66 invalid config exception should be handled by the Instance class, so ignore the test for replica since we applied ensure function

* #66 invalid config exception should be handled by the Instance class, so ignore the test for replica since we applied ensure function
@cebe
Copy link
Member

cebe commented Jan 4, 2018

implemented by #132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Enhancement
Projects
None yet
Development

No branches or pull requests

7 participants