• 2014-10-25

    SSDB 1.7.0.0

    Views: 459 | 1 Comment

    1.7.0.0

    • New features:
      • export(ssdb-cli) command supports -i(interactive) option(2014-10-16)
      • ssdb-cli performance improved(2014-10-11)
      • Add export, import commands in ssdb-cli(2014-10-11)
      • Add qtrim_front, qtrim_back commands(2014-10-11)
      • ssdb-dump support auth(2014-10-10)
      • Add max_open_files config, default is 100(2014-10-08)
      • Add auth command(2014-09-20)
      • Enable qpop multi elements at a time(2014-09-16)
    • Incompatible changes:
      • Rewrite hexmem, this affects log messages(2014-10-10)

    SSDB official website: http://ssdb.io/

    Posted by ideawu at 2014-10-25 23:44:22
  • 2014-06-30

    SSDB working with Twemproxy

    Views: 3283 | 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: 3816 | 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:
  • 2014-05-03

    Config rails devise to use GET for sign_out

    Views: 1310 | No Comments

    If you get rails route error like this:

    No route matches [GET] "/sign_out"
    

    That’s because Devise uses HTTP DELETE to logout the session, but you will never be able to do this by clicking a link in a web page.

    Then, just config your config/initializers/devise.rb to use

    # The default HTTP method used to sign out a resource. Default is :delete.
    config.sign_out_via = :get
    

    Restart rails server.

    Posted by ideawu at 2014-05-03 16:15:28
  • 2014-04-12

    Libevent HTTP server memory leak

    Views: 2188 | No Comments

    The c1000k comet/push server icomet has just fixed a bug of memory leak. This bug is caused by not pairing every call to evhttp_send_reply_start() with evhttp_send_reply_end().

    The icomet project use libevent’s HTTP server API to easily set up a comet server, when a client connected, it calls:

    evhttp_send_reply_start(req, HTTP_OK, "OK");
    

    To send chunked data. And after a few seconds(by configuration) the long-polling times out, it ends up the HTTP request by calling:

    evhttp_send_reply_end(req);
    

    But when the client interupts the request, the callback function registered by evhttp_connection_set_closecb() is called, and evhttp_send_reply_end() is not called, so libevent will never free that request, memory leaks!

    Posted by ideawu at 2014-04-12 12:04:55
|<<<123456789>>>| 1/15 Pages, 73 Results.