Twemproxy proxy Key-Value database SSDB for Distributed Data Storage

Source: Internet
Author: User
SSDB is a high-performance NoSQL database that supports a wide range of data structures. It is used to replace Redis or store billions of List data with Redis. It has been applied by many well-known enterprises. We use SSDB to convert the existing

SSDB is a high-performance NoSQL database that supports a wide range of data structures. It is used to replace Redis or store billions of List data with Redis. It has been applied by many well-known enterprises. We use SSDB to convert the existing

SSDB is a high-performance NoSQL database that supports a wide range of data structures. It is used to replace Redis or store billions of List data with Redis. It has been applied by many well-known enterprises. We use SSDB to migrate keys in existing redis to SSDB to break the GB Storage Limit of existing redis (of course it can be extended, but the cost will be abandoned after calculation ).

Twemproxy is an open-source redis and memcache proxy server of twtter. Here we use the Twemproxy proxy to proxy the SSDB cluster for Distributed Data Storage, that is, shared.

1. node planning:

Twemproxy 192.168.0.100

Ssdb1 master 192.168.0.101

Ssdb1 slave 192.168.0.102

Ssdb2 master 192.168.0.103

Ssdb2 slave 192.168.0.104

2. Install SSDB

# Unzip the downloaded ssdb package $ unzip ssdb-master.zip # Install gcc, gcc-c ++, make and other tools # compile and install ssdb, it will be installed in $ cd ssdb-master $ make & make install # Under/usr/local/ssdb/to enter the installation directory $ cd/usr/local/ssdb/# Start ssdb -server $. /ssdb-server-dssdb. confssdb 1.8.2Copyright (c) 2012-2014 ssdb. io ## verify whether the startup is successful. If Port 8888 is listened on, $ netstat-alnut | grep 8888tcp 0 0 127.0.0.1: 8888 0.0.0.0: * LISTEN # client connection $. /ssdb-cli-p8888 ssdb (cli)-ssdb command line tool. copyright (c) 2012-2014 ssdb. io 'H' or 'help' forhelp, 'q' to quit. server version: 1.8.2ssdb 127.0.0.1: 8888 & gt;

3. Master/Slave configuration. ssdb1 is used as an example.

# Modify the configuration file of ssdb1 master, as shown below # ssdb-server config # MUST indent by TAB! # Relative to path of this file, directorymust existswork_dir =. /varpidfile =. /var/ssdb. pid server: ip: 192.168.0.101 port: 8888 # 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 # auth password must be at least 32 characters # auth: very-strong-password replication: binlog: yes # Limit sync spee D to * MB/s,-1: no limit sync_speed:-1 slaveof: # to identify a master even ifit moved (ip, port changed) # if set to empty or notdefined, ip: port will be used. # id: svc_2 # sync | mirror, default is sync # type: sync # ip: 127.0.0.1 # port: 8889 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 co Mpaction_speed: 1000 # yes | no compression: yes # modify the configuration file of ssdb1 slave, as follows # ssdb-server config # MUST indent by TAB! # Relative to path of this file, directorymust existswork_dir =. /varpidfile =. /var/ssdb. pid server: ip: 192.168.0.102 port: 8888 # 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 # auth password must be at least 32 characters # auth: very-strong-password replication: binlog: yes # Limit sync speed to * MB/s,-1: no limit sync_speed:-1 slaveof: # to identify a master even if itmoved (ip, port changed) # if set to empty or notdefined, ip: port will be used. id: svc_1 # sync | mirror, default is sync type: sync ip: 192.168.0.101 port: 8888 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: yes


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.