douban / beanseye

Proxy and monitor for beansdb in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

have some questions about yaml conf file, I have to ask you again.

weiliangwei opened this issue · comments

Hi,
I'm sorry to ask you again. I have ask some questions about the yaml file . But there are also some questions about the yaml conf file . About the example.yaml file :

  1. I saw that N=3 in the example.yaml file ,so there are 3 beansdb node in the cluster, but why Servers option only set one server(localhost:7900 and 127.0.0.1:7900 are the same server) only?
    2)The bucket in every beansdb which is in cluster have 16 numbers, Why only set '0 1 2' or ' A -1 B'?
    Why not set other buckets in the beansdb which is in the cluster?Could not
  2. I have two beansdb and one beanseye(IP is 192.168.1.1) ,I want to let the two beansdb (which ip are 192.168.1.2 and 192.168.1.3 ) in one cluster by the beanseye , and make them backup for each other . Is the following options in the yaml file right?
    Servers :
    192.168.1.2: 7900
    192.168.1.3: 7900
    I don't know how to set the buckets . How to set if I must set the buckets for each beansdb in the cluster ?
  3. the yaml file have options :
    threads : 8
    listen : 0.0.0.0
    readonly : false
    what are the options? How to set them ?

At last , thanks for your reply .

the example.yaml is not complete.
this is a better example:

buckets: 16
errorlog: /log/beansproxy/beansproxy_error.log
listen: 0.0.0.0
n:  3
w: 2
r:  1
port: 7705
proxies:
- 192.168.1.7:7905
- 192.168.1.8:7905
readonly: false
servers:
- 192.168.1.1:7900 7 6 5 4 3 2 1 0
- 192.168.1.2:7900 7 6 5 4 3 2 1 0
- 192.168.1.3:7900 7 6 5 4 3 2 1 0
- 192.168.1.4:7900 f e d c b a 9 8
- 192.168.1.5:7900 f e d c b a 9 8
- 192.168.1.6:7900 f e d c b a 9 8
slow: 100
threads: 16
webport: 7708

two set nodes(3 each, configure by "n"), each handle half(0-7 of 8-f) of the buckets。

alternatively, configure use 2 primary and 1 backup for each bucket. the backup node(.4 .6) only store data until fail to write one of the primaries, and you should sync them back when the primary recovers.

servers:
- 192.168.1.1:7900 7 6 5 4 3 2 1 0
- 192.168.1.2:7900 7 6 5 4 3 2 1 0
- 192.168.1.3:7900 -7 -6 -5 -4 -3 -2 -1 -0
- 192.168.1.4:7900 f e d c b a 9 8
- 192.168.1.5:7900 f e d c b a 9 8
- 192.168.1.6:7900 -f -e -d -c -b -a -9 -8