发布于 2014-10-14 09:17:21 | 952 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的SSDB PHP 客户端 API 文档,程序狗速度看过来!

SSDB NoSQL 数据库

SSDB是一个开源的高性能数据库服务器, 使用Google LevelDB作为存储引擎, 支持T级别的数据, 同时支持类似Redis中的zset和hash等数据结构, 在同时需求高性能和大数据的条件下, 作为Redis的替代方案.


本文为大家讲解的是ssdb的主从服务器同步配置方法,感兴趣的同学参考下。

SSDB是一个开源的高性能数据库服务器, 使用Google LevelDB作为存储引擎, 支持T级别的数据, 同时支持类似Redis中的zset和hash等数据结构, 在同时需求高性能和大数据的条件下, 作为Redis的替代方案.

ssdb主机:

192.168.1.104
192.168.1.108

 

修改ssdb.conf

104主机

 
# ssdb-server config
# MUST indent by TAB!

# relative to path of this file, directory must exists
work_dir = ./var
pidfile = ./var/ssdb.pid

server:
    #ip: 127.0.0.1
    port: 11111
    # bind to public ip
    ip: 0.0.0.0
    # format: allow|deny: all|ip_prefix
    # multiple allows or denys is supported
    #deny: all
    #allow: 127.0.0.1
    #allow: 192.168

replication:
    binlog: yes
    # Limit sync speed to *MB/s, -1: no limit
    sync_speed: -1
    slaveof:
        # to identify a master even if it moved(ip, port changed)
        # if set to empty or not defined, ip:port will be used.
        id: svc_1
        # sync|mirror, default is sync
        type: mirror
        ip: 192.168.1.108
        port: 11111

logger:
    level: debug
    output: log.txt
    rotate:
        size: 1000000000

leveldb:
    # in MB
    cache_size: 500
    # in KB
    block_size: 32
    # in MB
    write_buffer_size: 64
    # in MB
    compaction_speed: 1000
    # yes|no
    compression: no

 

108同上

 
# ssdb-server config
# MUST indent by TAB!

# relative to path of this file, directory must exists
work_dir = ./var
pidfile = ./var/ssdb.pid

server:
    #ip: 127.0.0.1
    port: 11111
    # bind to public ip
    ip: 0.0.0.0
    # format: allow|deny: all|ip_prefix
    # multiple allows or denys is supported
    #deny: all
    #allow: 127.0.0.1
    #allow: 192.168

replication:
    binlog: yes
    # Limit sync speed to *MB/s, -1: no limit
    sync_speed: -1
    slaveof:
        # to identify a master even if it moved(ip, port changed)
        # if set to empty or not defined, ip:port will be used.
        id: svc_2
        # sync|mirror, default is sync
        type: mirror
        ip: 192.168.1.104
        port: 11111

logger:
    level: debug
    output: log.txt
    rotate:
        size: 1000000000

leveldb:
    # in MB
    cache_size: 500
    # in KB
    block_size: 32
    # in MB
    write_buffer_size: 64
    # in MB
    compaction_speed: 1000
    # yes|no
    compression: no
 

外面的客户端直接连接vip,端口11111,读写即可。

 

在rs主机上用ssdb-cli 11111进入管理shell,直接get查看数据即可。

 

------------------------------------------------------------------------------------------------------------

附ssdb关闭的命令

kill `cat ~/var/ssdb.pid`

注意,cat之前的不是单引号,是esc按键



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务