ops-baidu / bdrp Goto Github PK
View Code? Open in Web Editor NEWbaidu redis cluster
baidu redis cluster
看代码,发现 bns_whitelist,在一个shell运行一个命令,能不能大概描述下想做什么用,谢谢
请问以下这些功能如何配置:
•1. 读写分离可配置化
•2. 连接数控制
•3. 流量配额控制
•5. 增加流量数据采集端口
我这边已经配置了server1和server2,我想动态增加server3??
增加后,数据会迁移到server3吗??
nutcracker可以链接到多个sentinel上吗???
考虑到数据的一致性,是否支持在线的迁移,比如incr操作,迁移过程中高并发仍然保证数据的准确。
.cd src && make all
/mkreleasehdr.sh: Permission denied
make[1]: Entering directory /home/june/bdrp/redis/redis-2.6.16/src' make[1]: *** No rule to make target
release.h', needed by release.o'. Stop. make[1]: Leaving directory
/home/june/bdrp/redis/redis-2.6.16/src'
make: *** [all] Error 2
redis 192.168.1.1:12120> set tst 1
OK
redis 192.168.1.1:12120> get tst
(nil)
不知道这个是怎么回事
We have used c client to connect with this, but it always refuses.
BTW, I'm not sure it's the problem of bdrp or twemproxy itself.
RT:是否会推出基于redis2.8版本的BDRP呢?
单独编译jemalloc位置:
[root@localhost jemalloc]# pwd
/root/bdrp/redis/redis-2.6.16/deps/jemalloc
[root@localhost jemalloc]#
./configure
.....
checking for _Bool... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/html.xsl
config.status: creating doc/manpages.xsl
config.status: creating doc/jemalloc.xml
config.status: creating include/jemalloc/jemalloc.h
config.status: creating include/jemalloc/internal/jemalloc_internal.h
config.status: error: cannot find input file: test/jemalloc_test.h.in
直接编译:
[root@localhost redis-2.6.16]# make
cd src && make all
make[1]: Entering directory /root/bdrp/redis/redis-2.6.16/src' CC adlist.o In file included from zmalloc.h:50, from adlist.c:34: ../deps/jemalloc/include/jemalloc/jemalloc.h:17:27: error: jemalloc_defs.h: No such file or directory In file included from zmalloc.h:50, from adlist.c:34: ../deps/jemalloc/include/jemalloc/jemalloc.h:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘const’ ../deps/jemalloc/include/jemalloc/jemalloc.h:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ ../deps/jemalloc/include/jemalloc/jemalloc.h:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’ ../deps/jemalloc/include/jemalloc/jemalloc.h:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ ../deps/jemalloc/include/jemalloc/jemalloc.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ ../deps/jemalloc/include/jemalloc/jemalloc.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory
/root/bdrp/redis/redis-2.6.16/src'
make: *** [all] Error 2
[root@localhost redis-2.6.16]#
请问应该如何解决该问题呢?
[work@nj02-sys-ra05junheng2pluswz234 bin]$./nutcracker -c ../conf/nutcracker.yml -w ../whitelist
[Mon May 4 16:33:19 2015] nc.c:189 nutcracker-0.2.4 started on pid 13206
[Mon May 4 16:33:19 2015] nc.c:193 run, rabbit run / dig that hole, forget the sun / and when at last the work is done / don't sit down / it's time to dig another one
[Mon May 4 16:33:19 2015] nc_whitelist.c:127 Success to get the name of bns:[../bns]
[Mon May 4 16:33:19 2015] nc_whitelist.c:206 The BNS_whitelist(../bns) doesn't exist or cannot be readed!
[Mon May 4 16:33:19 2015] nc_whitelist.c:135 Ip/bns whitelist update failed!Turn off the function of whitelist,whitelist thread exit now
[Mon May 4 16:33:19 2015] nc_util.c:291 [0] /lib64/tls/libpthread.so.0 [0x302b80c420]
[Mon May 4 16:33:19 2015] nc_util.c:291 [1] ./nutcracker(server_unref+0x5a) [0x406e4a]
[Mon May 4 16:33:19 2015] nc_util.c:291 [2] ./nutcracker(server_close+0x1ae) [0x40810e]
[Mon May 4 16:33:19 2015] nc_util.c:291 [3] ./nutcracker(core_loop+0x129) [0x406259]
[Mon May 4 16:33:19 2015] nc_util.c:291 [4] ./nutcracker(main+0x595) [0x4139d5]
[Mon May 4 16:33:19 2015] nc_util.c:291 [5] /lib64/tls/libc.so.6(__libc_start_main+0xdb) [0x302af1c4bb]
[Mon May 4 16:33:19 2015] nc_util.c:291 [6] ./nutcracker [0x405c4a]
[Mon May 4 16:33:19 2015] nc_signal.c:122 signal 11 (SIGSEGV) received, core dumping
Segmentation fault (core dumped)
你好!
在使用贵项目中集成的nutcracker时,发现如下问题:
1.nutcracker有一个--pid-file选项,所以执行如下命令时
/usr/bin/nutcracker -c /etc/redis/nutcracker.yml --pid-file=/var/run/nutcracker.pid -d
会正常的生成/var/run/nutcracker.pid,且经验证该文件的内容确实是正确的pid。
但是,当用该pid执行kill命令(不是kill -9),当该进程被kill掉后,该pid-file仍然存在,且内容不变。
2.同上,执行如下命令时:
/usr/bin/nutcracker -c /etc/redis/nutcracker.yml --pid-file=/var/run/nutcracker.pid -d
会正常的生成/var/run/nutcracker.pid,且经验证该文件的内容确实是正确的pid。
但,如果继续再次执行该命令,即重复执行,一方面不会有任何错误信息,另一方面返回码$?是正常的0.用ps -ef|grep nutcracker验证,系统中仍然只有一个Nutcracker在运行,且Pid还是最初的Pid.
但是,/var/run/nutcracker.pid这个文件却被删掉了.
求解惑,这是不是nutcracker的bug啊,不知道bdrp有没有在原始的nutcracker上修改什么..
在配置文件中增加一项
quota: 100
报错了,查看nf_conf.c没有这个配置项
sigma:
listen: 0.0.0.0:22125
hash: crc16
distribution: slot
preconnect: true
auto_eject_hosts: false
redis: true
backlog: 512
client_connections: 0
server_connections: 1
server_retry_timeout: 2000
server_failure_limit: 2
servers:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.