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

help me how to scale out the rack and dc #116

Closed
137-rick opened this issue Apr 21, 2015 · 5 comments
Closed

help me how to scale out the rack and dc #116

137-rick opened this issue Apr 21, 2015 · 5 comments

Comments

@137-rick
Copy link

we are using this with phpredis extension
and we have two rack(rack1 rack2) and each have two node

the question is:
1.what's token ,it's mean the same dataset?
2.did i need set each node have same token or make the node different each.
3.how can we add rack .when i add a new rack to dc.it's cant get the "old" data.
4.we tried to make rack1(node1:token 1,node2:token2) rack2(node3:token2,node4:token1) we found only one token redis server have aof increased.and if this redis down the data lost too
5.when the write data redis down the data lost...

@timiblossom
Copy link
Contributor

@xcl3721 Here are the answers.

  1. A token along with DC and Rack is like an identifier for a node. Based on this, nodes can know what subset of data they can own. Of course, nodes in different rack/dc can own the same subset of data.
  2. Look at this script and it gives you an idea how you should generate tokens:
    https://github.com/Netflix/dynomite/blob/master/scripts/generate_yamls.py
  3. Answer is similar to Gossip component #2. Take a look at the output files from that script to understand the topology
  4. I don't see this is the case. Please explain in more details. Probably you had a wrong configuration somewhere.
  5. You can read this issue here as it relates to your question:
    What would happen when DataCenter1 crash and reover? #51
    Furthermore, we are currently working on data repair as additional process to fix bad data.

@137-rick
Copy link
Author

thank u sir
can we support php extension like dyo?

my config is here

dyn_o_mite:
datacenter: dc
rack: rack1
dyn_listen: 172.1.1.61:8101
dyn_seed_provider: simple_provider
dyn_seeds:

  • 172.1.1.62:8101:rack1:dc:1721162
  • 172.1.1.63:8101:rack2:dc:1721161
  • 172.1.1.64:8101:rack2:dc:1721162
    listen: 0.0.0.0:6399
    timeout: 3000
    server_retry_timeout: 3000
    servers:
  • 127.0.0.1:6379:1
    tokens: '1721161'
    secure_server_option: datacenter
    server_connections: 4
    auto_eject_hosts: true
    server_failure_limit: 3
    pem_key_file: /etc/dynomite/dynomite.pem
    redis: true

dyn_o_mite:
datacenter: dc
rack: rack1
dyn_listen: 172.1.1.62:8101
dyn_seed_provider: simple_provider
dyn_seeds:

  • 172.1.1.61:8101:rack1:dc:1721161
  • 172.1.1.63:8101:rack1:dc:1721161
  • 172.1.1.64:8101:rack1:dc:1721162
    listen: 0.0.0.0:6399
    timeout: 3000
    server_retry_timeout: 3000
    servers:
  • 127.0.0.1:6379:1
    tokens: '1721162'
    secure_server_option: datacenter
    server_connections: 4
    auto_eject_hosts: true
    server_failure_limit: 3
    pem_key_file: /etc/dynomite/dynomite.pem
    redis: true

dyn_o_mite:
datacenter: dc
rack: rack2
dyn_listen: 172.1.1.63:8101
dyn_seed_provider: simple_provider
dyn_seeds:

  • 172.1.1.61:8101:rack1:dc:1721161
  • 172.1.1.62:8101:rack1:dc:1721162
  • 172.1.1.64:8101:rack2:dc:1721162
    listen: 0.0.0.0:6399
    timeout: 3000
    server_retry_timeout: 3000
    servers:
  • 127.0.0.1:6379:1
    tokens: '1721161'
    secure_server_option: datacenter
    server_connections: 4
    auto_eject_hosts: true
    server_failure_limit: 3
    pem_key_file: /etc/dynomite/dynomite.pem
    redis: true

dyn_o_mite:
datacenter: dc
rack: rack2
dyn_listen: 172.1.1.64:8101
dyn_seed_provider: simple_provider
dyn_seeds:

  • 172.1.1.61:8101:rack1:dc:1721161
  • 172.1.1.62:8101:rack1:dc:1721162
  • 172.1.1.63:8101:rack2:dc:1721161
    listen: 0.0.0.0:6399
    timeout: 3000
    server_retry_timeout: 3000
    servers:
  • 127.0.0.1:6379:1
    tokens: '1721162'
    secure_server_option: datacenter
    server_connections: 4
    auto_eject_hosts: true
    server_failure_limit: 3
    pem_key_file: /etc/dynomite/dynomite.pem
    redis: true

and then add new one config--------------
dyn_o_mite:
datacenter: dc
rack: rack
dyn_listen: 172.1.1.66:8101
dyn_seed_provider: simple_provider
dyn_seeds:

  • 172.1.1.61:8101:rack1:dc:1721161
  • 172.1.1.62:8101:rack1:dc:1721162
  • 172.1.1.64:8101:rack2:dc:1721162
  • 172.1.1.63:8101:rack2:dc:1721161
    listen: 0.0.0.0:6399
    timeout: 3000
    server_retry_timeout: 3000
    servers:
  • 127.0.0.1:6379:1
    tokens: '3333333'
    secure_server_option: datacenter
    server_connections: 1
    auto_eject_hosts: true
    server_failure_limit: 3
    pem_key_file: /etc/dynomite/dynomite.pem
    redis: true

@timiblossom
Copy link
Contributor

Sorry but we don't have the resource for PHP client like Dyno at this time.
However, you can just use any Redis PHP client and take care of the failover in your application layer yourself?

@137-rick
Copy link
Author

ok
:) ~ thank u~

@ipapapa ipapapa closed this as completed Sep 29, 2015
@patademahesh
Copy link

How can we achieve failover in application layer using PHP redis client ?

Any hints.. !!

Thanks
Mahesh

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

No branches or pull requests

4 participants