Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Redis e Memcached - Daniel Naves - Omnilogic

2,011 views

Published on

Published in: Technology
  • Be the first to comment

Redis e Memcached - Daniel Naves - Omnilogic

  1. 1. Redis vs Memcached Daniel Naves de Carvalho - daniel@omnilogic.com.br
  2. 2. OmniLogic • Since nov/2009 • Data-Mining • Computational Intelligence • Optimization • Business Intelligence
  3. 3. Memcached • Free & open source • High-performance • Distributed memory object caching system • Generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. • In-memory key-value store for small chunks of arbitrary data (strings, objects from database calls, API calls etc) • At heart it is a simple Key-Value store
  4. 4. Memcached - Clients • C / C++ • PHP • Java • Python • Ruby • Perl • Windows/.NET • MySQL • PostgreSQL • Erlang • Lua • Lisp • ColdFusion • OCaml • Io • etc
  5. 5. Features • Simple Key-Value Store • Servers are disconected from each other • Forgetting data is a feature(LRU) • O(1)
  6. 6. Redis vs Memcached Redis Memcached In Memory x x Persistent x Atomic x x Consistent x x Replication x Authentication x Key / Value x x Key Enumeration x Key / Value buckets x
  7. 7. Redis vs Memcached Redis Memcached Maximum Key Length 2^31bytes 250 bytes Maximum String size 512m 1m Data Structures x Channel Pub/Sub x Consistent hasing x x Memory Usage 10-20% less Speed(Single Instance, Multicore) 100.000 req/s 125.000 req/s Speed(Multiple Instances, Single Thread) 200.000 req/s 200.000 req/s
  8. 8. Redis – Real Use Cases • R eal-time model-prediction caching • Page fragments caching • Jobs Queue
  9. 9. Redis – Network layout
  10. 10. Page fragments caching • Speedup +5x • Low memory usage • Faster than pre-render file caching
  11. 11. Jobs Queue • Easy to maintain • Persistent • Multi-queue multi-workers
  12. 12. Resque
  13. 13. R eal-time model-prediction caching • Speed-up +100x • Faster sorting vs Lib Sorting • Easy to maintain • Scales horizontally
  14. 14. Questions???

×