Big Data Learning Summary record-ssdb

Source: Internet
Author: User

Ssbd

Summary: A high-performance NoSQL database that supports rich data structures that can be used in place of Redis.

Details: SSDB is a NoSQL database developed by C + +, using Google's open source LevelDB engine as the underlying storage engine. Redis is a C language-developed memory NoSQL database. The SSDB uses the New BSD License license Agreement, a very loose and flexible protocol that supports master-slave replication and load balancing.

Why to replace Redis

Redis is very popular, not only because of its high performance and durability, but also because it supports a rich data structure that can express business models well. Redis's domestic Sina is widely used. However, the disadvantage of Redis is also obvious, that is its memory database model. All the data is in memory, and even the richest internet companies can't afford the fixed cost of $5000 (a server, 100G of memory) and the constant IDC rental cost to store a paltry 50GB of data, which is too expensive!

SSDB Advantages

SSDB has the main benefits of Redis-high performance, rich data structures, and the capabilities that Redis does not have-big storage capabilities. The SSDB server is 100 times times more capable of single-machine storage than Redis! Because SSDB can store the data on the hard disk. In the test of the same machine with the Ssdb-bench tool with SSDB and the Redis Redis-benchmark tool, the SSDB reads more than Redis, which is very unexpected. However, SSDB's write performance is still about 10% slower than Redis. You know, SSDB is a hard disk database, and Redis is an in-memory database, and the latter is understandable for its higher write performance.

Characteristics

    • 100 times times the capacity of Redis instead of Redis database
    • LevelDB network support, using C + + development
    • Redis API compatible, support for Redis clients
    • Suitable for storing collection data, such as list, hash, zset ...
    • The languages supported by the client API include: C + +, PHP, Python, Java, Go
    • Persistent Queue Service
    • Master-slave replication, load Balancing

Analysis access based on data more SSDB read operations than Redis, while write operations are about 10% less than Redis

However, because SSDB storage is a small memory requirement, large capacity, compared to Redis to save money, and storage services is support queue, so in the business choice is more than write operation Ssdb is a cheaper solution

SSDB Architecture

Master-Slave construction

Host:

Server

ip:192.168.31.128

port:8888

Slave machine:

Server

ip:192.168.31.128

port:8889

Readonly:yes

Replication

Binlog:yes

Slaveof:

Id:svc_1

Type:sync

host:192.168.31.128

port:8888

Master-Master Double main Building

Main 1

Server

ip:192.168.31.128

port:8888

Replication

Slaveof:

Type:mirror

host:192.168.31.128

port:8889

Main 2

Server

ip:192.168.31.128

port:8889

Replication

Slaveof:

Type:mirror

host:192.168.31.128

port:8888

Why can SSDB replace Redis?

Ssdb is a high-performance, open-source NoSQL database server developed by the C + + language, supports Key-value, Keyhashmap, Key-zset (sorted set) and other data structures (similar to Redis) and is ideal for storing hundreds of millions of-level lists. Sorting tables, such as collection data, is a redis alternative and enhancement scheme.

What is the difference between SSDB and Redis in use?

SSDB is a good NOSQL database implementation, and its rich interface and friendly use are good for specific usage scenarios, but because of the natural disadvantage of persistence and the storage engine, it is not suitable for businesses with high persistence requirements or random operations. As for the case of Redis, Redis has better durability in multi-node situations, and Redis's high performance is SSDB impossible, and SSDB should not be too much of a scenario to replace Redis. It is recommended that SSDB be used to monitor the caching of applications, non-persistent message queues, and sequential operations, i.e. allow data loss or shadow Read (shadow Read).

Pros and cons of Ssdb and Redis

Pros: SSDB is a less expensive option for low memory requirements.
Redis is superior in performance, stability, and community.
Cons: SSDB implementation is inefficient, mainly relies on the leveldb will be sorted by key features
   Redis test with a small amount of data, only read and write memory possibilities

SSDB General Instruction set reference:http://ssdb.io/docs/zh_cn/commands/index.html

Ssdb Source Analysis – Master-slave and multi-Master synchronization principles: (http://www.ideawu.net/blog/archives/849.html)

Substitution of Ssdb:redis (http://www.wzxue.com/ssdb/)

Big Data Learning Summary record-ssdb

Related Article

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.