SlideShare a Scribd company logo
Redis and its many uses
   Christian Joudrey - @cjoudrey
‘‘Redis is an open source,
 advanced key-value store.

                             ’’
Key-value what?!
SET name "fido"
GET name
=> "fido"
EXPIRE name 120
So it's like
memcached?
Atomic operations
SET count 0
INCR count
=> 1
Ordered lists
LPUSH friends "Tom"
LPUSH friends "Sam"
LLEN friends
=> 2
LPUSH           RPUSH

        Sam   Tom
LRANGE friends 0 0
=> ["Sam"]
LRANGE friends 0 -1
=> ["Sam", "Tom"]
Sets, Hashes,
 Sorted Sets
Save to disk
Download it
http://redis.io/download


... and try it ...
    $ redis-cli
    redis> SET name "Chris"
    OK
    redis> GET name
    "Chris"
What about node?!
GitHub
   http://git.io/redis

... or via npm ...
    $ npm install redis
Use case #1:
Caching
var redis = require('redis'),
    client = redis.createClient();

function getSomeValue (callback) {
   client.get('someVal', function (err, val) {
     if (val) return callback(null, val);
     // Do call directly to Db
     // and cache result.
   });
};
Use case #2:
Session store
var app = require('express').createServer();
var RedisStore = require('connect-redis')(express);

app.use(express.session({
     secret: 'keyboard cat', store: new RedisStore
}));

app.get('/', function(req, res){
  res.send('hello world');
});

app.listen(3000);




http://expressjs.com/guide.html#session-support
Use case #3:
Pub/Sub
Chat                Chat
Server              Server



          Load
         Balancer
Use case #4:
Job Queue
i.e.:
Image resize API
1) Download image
   2) Resize image with GD




            Node
            Server




GET /image_resize?url=http://...
orker                     Job
      Resize
                               Queue
      Workers




1) Download image              Node
2) Resize image with GD
                               Server




                   GET /image_resize?url=http://...
Kue
https://github.com/learnboost/kue
There's a lot more!
 11 Common Web Use Cases Solved in Redis
           http://bit.ly/pgDmXn
Questions? :)

More Related Content

What's hot (20)

PDF
Oracle Extended Clusters for Oracle RAC
Markus Michalewicz
 
PDF
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 
PPTX
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Carlos Sierra
 
PDF
ORM2Pwn: Exploiting injections in Hibernate ORM
Mikhail Egorov
 
PDF
InnoDB Internal
mysqlops
 
PDF
[245] presto 내부구조 파헤치기
NAVER D2
 
PPTX
Redis Persistence
Ismaeel Enjreny
 
PPTX
Oracle RAC features on Exadata
Anil Nair
 
PPTX
Static Application Security Testing Strategies for Automation and Continuous ...
Kevin Fealey
 
PDF
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Tanel Poder
 
PDF
Linux dma engine
pradeep_tewani
 
PDF
How to Analyze and Tune MySQL Queries for Better Performance
oysteing
 
PDF
10 Deadly Sins of SQL Server Configuration - APPSEC CALIFORNIA 2015
Scott Sutherland
 
PDF
SIL - All you need to know about Swift Intermediate Language
Bartosz Polaczyk
 
PDF
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
PDF
Threat Hunting Workshop
Splunk
 
PDF
HKG15-311: OP-TEE for Beginners and Porting Review
Linaro
 
PDF
Linux Kernel vs DPDK: HTTP Performance Showdown
ScyllaDB
 
PDF
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 
Oracle Extended Clusters for Oracle RAC
Markus Michalewicz
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Carlos Sierra
 
ORM2Pwn: Exploiting injections in Hibernate ORM
Mikhail Egorov
 
InnoDB Internal
mysqlops
 
[245] presto 내부구조 파헤치기
NAVER D2
 
Redis Persistence
Ismaeel Enjreny
 
Oracle RAC features on Exadata
Anil Nair
 
Static Application Security Testing Strategies for Automation and Continuous ...
Kevin Fealey
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Tanel Poder
 
Linux dma engine
pradeep_tewani
 
How to Analyze and Tune MySQL Queries for Better Performance
oysteing
 
10 Deadly Sins of SQL Server Configuration - APPSEC CALIFORNIA 2015
Scott Sutherland
 
SIL - All you need to know about Swift Intermediate Language
Bartosz Polaczyk
 
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
Threat Hunting Workshop
Splunk
 
HKG15-311: OP-TEE for Beginners and Porting Review
Linaro
 
Linux Kernel vs DPDK: HTTP Performance Showdown
ScyllaDB
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 

Viewers also liked (20)

PDF
Introduction to some top Redis use cases
Josiah Carlson
 
PPT
Redis use cases
Bottom Wang
 
PPTX
See who is using MemSQL
jenjermain
 
PPTX
Redis Use Patterns (DevconTLV June 2014)
Itamar Haber
 
PPTX
Riak add presentation
Ilya Bogunov
 
KEY
Riak seattle-meetup-august
pharkmillups
 
PPTX
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
Basho Technologies
 
PDF
Redis : Play buzz uses Redis
Redis Labs
 
PDF
Scaling with Riak at Showyou
John Muellerleile
 
PDF
Modelling Data as Graphs (Neo4j)
Michal Bachman
 
PDF
Riak Use Cases : Dissecting The Solutions To Hard Problems
Andy Gross
 
PDF
An intro to Neo4j and some use cases (JFokus 2011)
Emil Eifrem
 
PDF
Recommendations with Neo4j (FOSDEM 2015)
Michal Bachman
 
PDF
Advanced Neo4j Use Cases with the GraphAware Framework
Michal Bachman
 
PDF
Modelling Data in Neo4j (plus a few tips)
Michal Bachman
 
PDF
Best Buy Web 2.0
Lee Aase
 
PPTX
Introduction to Redis Data Structures: Sorted Sets
ScaleGrid.io
 
PPTX
The BestBuy.com Cloud Architecture
joelcrabb
 
PDF
Redis : Database, cache, pub/sub and more at Jelly button games
Redis Labs
 
PPTX
Redis Labs and SQL Server
Lynn Langit
 
Introduction to some top Redis use cases
Josiah Carlson
 
Redis use cases
Bottom Wang
 
See who is using MemSQL
jenjermain
 
Redis Use Patterns (DevconTLV June 2014)
Itamar Haber
 
Riak add presentation
Ilya Bogunov
 
Riak seattle-meetup-august
pharkmillups
 
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
Basho Technologies
 
Redis : Play buzz uses Redis
Redis Labs
 
Scaling with Riak at Showyou
John Muellerleile
 
Modelling Data as Graphs (Neo4j)
Michal Bachman
 
Riak Use Cases : Dissecting The Solutions To Hard Problems
Andy Gross
 
An intro to Neo4j and some use cases (JFokus 2011)
Emil Eifrem
 
Recommendations with Neo4j (FOSDEM 2015)
Michal Bachman
 
Advanced Neo4j Use Cases with the GraphAware Framework
Michal Bachman
 
Modelling Data in Neo4j (plus a few tips)
Michal Bachman
 
Best Buy Web 2.0
Lee Aase
 
Introduction to Redis Data Structures: Sorted Sets
ScaleGrid.io
 
The BestBuy.com Cloud Architecture
joelcrabb
 
Redis : Database, cache, pub/sub and more at Jelly button games
Redis Labs
 
Redis Labs and SQL Server
Lynn Langit
 
Ad

Similar to Redis and its many use cases (20)

PPTX
Get more than a cache back! - ConFoo Montreal
Maarten Balliauw
 
PPTX
05 integrate redis
Erhwen Kuo
 
PDF
Counting image views using redis cluster
Redis Labs
 
PDF
Introduction to redis - version 2
Dvir Volk
 
PDF
Redis as a Cache Boosting Performance and Scalability
Inexture Solutions
 
PDF
Speed up your Symfony2 application and build awesome features with Redis
Ricard Clau
 
PDF
Redis Everywhere - Sunshine PHP
Ricard Clau
 
PDF
Introduction to Redis
Dvir Volk
 
PDF
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
Redis Labs
 
PPTX
Scalable Web Apps
Piotr Pelczar
 
PDF
Redis for the Everyday Developer
Ross Tuck
 
PDF
Redis 101
Geoff Hoffman
 
PPTX
Why Your MongoDB Needs Redis
Itamar Haber
 
PPT
New York REDIS Meetup Welcome Session
Aleksandr Yampolskiy
 
PPTX
REDIS327
Rajan Bhatt
 
PDF
Redis — The AK-47 of Post-relational Databases
Karel Minarik
 
PDF
Fosdem how you can benefit from redis, javier ramirez @ teowaki
javier ramirez
 
PDF
dba_lounge_Iasi: Everybody likes redis
Liviu Costea
 
PDF
An Introduction to Redis for Developers.pdf
Stephen Lorello
 
PDF
Redis
Socialmetrix
 
Get more than a cache back! - ConFoo Montreal
Maarten Balliauw
 
05 integrate redis
Erhwen Kuo
 
Counting image views using redis cluster
Redis Labs
 
Introduction to redis - version 2
Dvir Volk
 
Redis as a Cache Boosting Performance and Scalability
Inexture Solutions
 
Speed up your Symfony2 application and build awesome features with Redis
Ricard Clau
 
Redis Everywhere - Sunshine PHP
Ricard Clau
 
Introduction to Redis
Dvir Volk
 
RedisConf18 - Redis at LINE - 25 Billion Messages Per Day
Redis Labs
 
Scalable Web Apps
Piotr Pelczar
 
Redis for the Everyday Developer
Ross Tuck
 
Redis 101
Geoff Hoffman
 
Why Your MongoDB Needs Redis
Itamar Haber
 
New York REDIS Meetup Welcome Session
Aleksandr Yampolskiy
 
REDIS327
Rajan Bhatt
 
Redis — The AK-47 of Post-relational Databases
Karel Minarik
 
Fosdem how you can benefit from redis, javier ramirez @ teowaki
javier ramirez
 
dba_lounge_Iasi: Everybody likes redis
Liviu Costea
 
An Introduction to Redis for Developers.pdf
Stephen Lorello
 
Ad

Recently uploaded (20)

PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 

Redis and its many use cases