Part 1: Introduction
Part 2: Data Types & Commands
Part 3: Pipeline & Pub/Sub
Part 4: Clustering
Part 5: Summary
Part 1
Introduction
* Redis is NoSQL Database
NoSQL Types and Examples
Key-Value store?
Use Cases
- Cache
- Queues
- Full Text Search
- Geospatial Data
- more
Part 2
Data Types & Commands
String
- SET SET key value
- GET GET key (value)
- INCR INCR key (a = 2 -> a = 3)
- DECR INCR key (a = 3 -> a = 2)
Lists
- LPUSH new element on head
- RPUSH new element on tail
- LRANGE LRANGE mylist -3 2
- LTRIM create a list that never exceeds a given number of elements
Sets
* Just like list but elements are unique
- SADD Add element
- SREM Remove element
- SMEMBERS Get all elements
- SISMEMBER Check existence member!
Part 3
Pipeline & Pub/Sub
Pipeline
Pub/Sub
Part 4
Clustering
Terminology
- Highly Available (HA) - Master Slave
- Sharding
Redis Clustering
How handle failover!?
Open Sources that can make easier
- dynomite made by netflix available on: link
- twemproxy made by twitter available on: link
- codis made by CodisLabs available on: link
Summary
- Redis Basic & Command
- Pipeline & Pub/Sub
- Clustering
Thank you for your attention!