Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Redis: based on real story

Poga Po
March 31, 2012

Redis: based on real story

Talk @ NoSQL Taiwan

Poga Po

March 31, 2012
Tweet

More Decks by Poga Po

Other Decks in Programming

Transcript

  1. Dependency Feb 25, 2009 First public beta Oct 14, 2011

    Redis 2.4 First external dependency jemalloc Mar 31, 2012
  2. Installation Feb 25, 2009 First public beta Oct 14, 2011

    Redis 2.4 First external dependency jemalloc Mar 31, 2012 make install make install
  3. =

  4. No Race Condition every command in redis is atomic use

    redis as a incremental counter “There are very few systems that support an “increment and return” operation, and Redis is one of them (Oracle sequences are another).” http://nateware.com/2010/02/18/an-atomic-rant/
  5. No Race Condition every command in redis is atomic Combine

    multiple command: still atomic! MULTI SET key 123 SET key2 456 EXEC Warning: Don’t confuse with transaction
  6. i

  7. How? Sorted Set: Per user notification String: API request limiter

    String, List: Request logging List: Job Queue
  8. RDB • Snapshot • Compact • .rdb file can be

    transfered to other backup system • Chances to lose data
  9. Presharding Single Machine Redis instance Redis instance Redis instance Redis

    instance Redis instance Redis instance Redis instance Redis instance Redis instance Redis instance Multiple Machine