• 2014-06-30

    SSDB working with Twemproxy

    Views: 10809 | No Comments

    Twemproxy is a fast and lightweight proxy for memcached and redis protocol, developped by twitter. It was primarily built to reduce the connection count on the backend caching servers. You can use twemproxy + Redis for load balance, hight availability, etc.

    SSDB database supports Redis protocol, so you can use Twemproxy + SSDB as Twemproxy + Redis, or even Twemproxy + SSDB + Redis.

    Twemproxy + SSDB are already work online for production environment.

    Twemproxy: https://github.com/twitter/twemproxy

    Posted by ideawu at 2014-06-30 15:11:38 Tags: ,
  • 2014-05-10

    What to do with Redis if data exceed memory size

    Views: 9721 | No Comments

    Redis is great! It is super fast, easy to use, the data structures(kv, hash, zset) make it powerful to store business data.

    But Redis has some problems, the most significant problem is memory size. Redis a single-instance storage, which means it is not distributed, so it could not store big data, and the data it stores must not exceed the memory size of a server for it holds all data in meory.

    WHat can we do if data exceed memory size?

    First, manually sharding. You will have to shard data into multi instances across machines, all by your own. Redis does not provide official solution yet.

    Second, try some distributed storage system. But we still want to be able to work will data structures, not stupid pure key-value!

    Third, use SSDB instead! SSDB is an alternative to Redis, it supports Redis network protocol and nearly all redis clients(redis-cli, hiredis, phpredis, etc). And the storage capacity of SSDB is usually 100 times of Redis’, for SSDB stores data in hard-disk, and holds hot data in memory.

    SSDB is widely used by many internet companies, including QIHU 360, Baidu.com, TOPGAME, Autohome.com, BYD auto, and many other[see here].

    Posted by ideawu at 2014-05-10 00:28:41 Tags:
  • 2013-12-31

    SSDB supports Redis protocol and clients

    Views: 10764 | 2 Comments

    SSDB users had been asking for Redis protocol supports for a long time, because they want to use existing Redis clients, and do not want do any modification on their codes.

    SSDB now supports Redis protocol – finally.

    That means you can use existing Redis clients to connect to a SSDB server. Only redis-cli and phpredis is tested by now.

    Not all Redis commands are supported, see http://www.ideawu.com/ssdb/docs/redis-to-ssdb.html.

    During the development, I have found Redis network protocol unneccessarily complicated, because it concerns about data types. The Redis network protocol deals with request and response, while SSDB’s network protocol treats requests and responses the same. Redis network protocol impmentation has to deal with many types of response: status, error, integer, list, … As a contrast, data types are transparent to SSDB protocol implementors.

    Posted by ideawu at 2013-12-31 00:01:30 Tags:
  • 2013-12-19

    SSDB 1.6.7 supports key expiration(TTL)

    Views: 15222 | 6 Comments

    Since SSDB 1.6.7, the key expiration(TTL) feature is supported. You can set a value to a key, with a time to live. After this time, the will be automatically deleted. With this feature, you can use SSDB as a persistent cache service.

    Usage:

    $ssdb->setx('key', 'value', 60);
    

    The code above set key=value, and key will be expired after 60 seconds.

    Download SSDB NoSQL database: https://github.com/ideawu/ssdb

    Posted by ideawu at 2013-12-19 13:46:06 Tags: , ,
  • 2013-11-18

    SSDB beats Redis!

    Views: 15914 | 2 Comments

    With ssdb-bench and redis-benchmark tools, we can compare SSDB’s performance vs Redis. With 10, 20, 30, 40, 50 concurrent clients, SSDB’s get operation reaches a super fast speed of 55000 qps! Which is faster than Redis is(53000 qps).

    However, SSDB’s set operation is a bit slower than Redis, which is as expected.

    Posted by ideawu at 2013-11-18 17:00:11 Tags:
|<<<12>>>| 1/2 Pages, 6 Results.