Redis vs Memcached Daniel Naves de Carvalho - daniel@omnilogic.com.br
OmniLogic •  Since nov/2009 •  Data-Mining •  Computational Intelligence •  Optimization •  Business Intelligence
Memcached •  Free & open source •  High-performance •  Distributed memory object caching system •  Generic in nature, but ...
Memcached - Clients •  C / C++ •  PHP •  Java •  Python •  Ruby •  Perl •  Windows/.NET •  MySQL •  PostgreSQL •  Erlang •...
Features •  Simple Key-Value Store •  Servers are disconected from each other •  Forgetting data is a feature(LRU) •  O(1)
Redis vs Memcached Redis Memcached In Memory x x Persistent x Atomic x x Consistent x x Replication x Authentication x Key...
Redis vs Memcached Redis Memcached Maximum Key Length 2^31bytes 250 bytes Maximum String size 512m 1m Data Structures x Ch...
Redis – Real Use Cases •  R eal-time model-prediction caching •  Page fragments caching •  Jobs Queue
Redis – Network layout
Page fragments caching •  Speedup +5x •  Low memory usage •  Faster than pre-render file caching
Jobs Queue •  Easy to maintain •  Persistent •  Multi-queue multi-workers
Resque
R eal-time model-prediction caching •  Speed-up +100x •  Faster sorting vs Lib Sorting •  Easy to maintain •  Scales horiz...
Questions???
Upcoming SlideShare
Loading in …5
×

Redis e Memcached - Daniel Naves - Omnilogic

1,891 views
1,722 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,891
On SlideShare
0
From Embeds
0
Number of Embeds
60
Actions
Shares
0
Downloads
21
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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???

×