HMSET session:1 user 8754 name dave ip 10:20:104:31 hits 1
HMGET session:1 user name ip hitsRedis Overview and Use Cases
Redis Demo
Redis Enterprise
Google Cloud and Redis Enterprise
Google Cloud Demo
Optimized architecture
Advanced processing
Efficient client/server interaction


Cache
Messaging
User Sessions
Real-time Recommendation Engine
Leaderboards
… and much more
Multiple database calls create impossibly slow web page response times
Strings store text or binary
SET lets you store any payload
GET to retrieve values
Optional expiration
Listen for changes on keys and expirations
Multiple eviction policies supported
Maintain session state across multiple servers
Multiple session variables
High speed/low latency required
Hashes store session variables as key/value pairs
HMSET to store key/value pairs
HMGET to retrieve values
HINCRBY to increment a field within the hash
HDEL to delete one key/value
HMSET session:1 user 8754 name dave ip 10:20:104:31 hits 1
HMGET session:1 user name ip hits+------+--------------+ | user | 8754 | +------+--------------+ | name | dave | +------+--------------+ | ip | 10.20.104.31 | +------+--------------+ | hits | 1 | +------+--------------+
HINCRBY session:1 hits 1+------+--------------+ | user | 8754 | +------+--------------+ | name | dave | +------+--------------+ | ip | 10.20.104.31 | +------+--------------+ | hits | 2 | +------+--------------+
HSET session:1 last home+------+--------------+ | user | 8754 | +------+--------------+ | name | dave | +------+--------------+ | ip | 10.20.104.31 | +------+--------------+ | hits | 2 | +------+--------------+ | last | home | +------+--------------+
HGET session:1 lastpage (1)
HDEL session:1 lastpage (2)
DEL session:1 (3)Get lastpage field from hash
Delete lastpage entry from hash
Delete the whole hash
Tasks need to be worked on asynchronously
Lots of items to be worked on
Assign items to worker and remove from queue
Similar to buffering high speed data-ingestion
High speed/low latency required
Lists are perfect for this
LPUSH/RPUSH add values at head or tail
RPOPLPUSH: pop from queue, push to another
LPUSH queue:1 red +-------------+-------------+-------------+-------------+-------------+
queue∶1|cRED red | | | | |
+-------------+-------------+-------------+-------------+-------------+LPUSH queue:1 green +-------------+-------------+-------------+-------------+-------------+
queue∶1|cGREgreen |cRED red | | | |
+-------------+-------------+-------------+-------------+-------------+RPUSH queue:1 blue +-------------+-------------+-------------+-------------+-------------+
queue∶1|cGREgreen |cRED red | | |cBLU blue |
+-------------+-------------+-------------+-------------+-------------+RPOPLPUSH queue:1 queue:2 +-------------+-------------+-------------+-------------+-------------+
queue∶1|cGREgreen |cRED red | | | |
+-------------+-------------+-------------+-------------+-------------+
|
+------------------------------------------------------+
|
v
+-------------+-------------+-------------+-------------+-------------+
queue∶2|cBLU blue | | | | |
+-------------+-------------+-------------+-------------+-------------+Many users playing a game or collecting points
Display real-time leaderboard
Who is your nearest competition
Disk-based DB is too slow
Sorted sets automatically keep sorted list of users
ZADD to add/update
ZRANGE, ZREVRANGE to get user
ZRANK will get any user’s rank instantaneously
ZADD game:1 10000 id:1
ZADD game:1 21000 id:2
ZADD game:1 34000 id:3
ZADD game:1 35000 id:4+------+-------+ | id∶4 | 35000 | +------+-------+ | id∶3 | 34000 | +------+-------+ | id∶2 | 21000 | +------+-------+ | id∶1 | 10000 | +------+-------+
ZINCRBY game:1 10000 id:3+------+-------+ | id∶3 | 44000 |<-+ +------+-------+ | | id∶4 | 35000 |--+ +------+-------+ | id∶2 | 21000 | +------+-------+ | id∶1 | 10000 | +------+-------+
ZREVRANGE game:1 0 0 (1)
ZREVRANGE game:1 0 3 WITHSCORES (2)Get the top player
Get the top 3 players with their scores
Devices send data to multiple services
Apps send out events to multiple users

Fully-managed Redis Enterprise
Integrated billing
Multi-model:
RediSearch
RedisGraph
RedisTimeSeries
Hyper-scale: Redis on Flash
Google Cloud: built for new gen of enterprise software
Redis: “Most Loved Database” on Stack Overflow for 3 years running
Google Cloud: low latency network
Redis Enterprise delivers sub-ms latency
Google Cloud committed to OSS with expanded partnerships at NEXT
Redis has largest global OSS community of any NoSQL database
Curate social media
Power real-time leaderboards & rating systems
Enable online chat
Improve game responsiveness
Reduce need to access legacy databases
Ensure real-time content
High speed data processing
Fast, predictable sub-millisecond performance
Linear scalability: 50M ops/sec @ <1 ms latency
User session data
In-game risk analysis
Process high volumes of in-game data
Personalized session data
Player notifications
Manage large datasets with Redis on Flash
70% infra cost savings using tiered memory