31
Storing Data in Redis like a pro @omerlh

Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Storing Data in Redis like a pro@omerlh

Page 2: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

The storage quest

q Meet our requirements

q Secure

q We can access it

q We can monitor it

Page 3: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Storage Requirements

q High Availability

q High Performance

q Strong Consistency

q SaaS Solution

q Key-Value Store

Page 4: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan
Page 5: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Wait, what about Redis?

Page 6: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Storage Requirements

✓ High Availability

✓ High Performance

✓ Strong Consistency

✓ SaaS Solution

✓ Key-Value Store

Page 7: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

A note about high availability

● Replication

● Append Only File (AOF)

● Snapshots

● Redislabs SLA: 99.99%!

https://redislabs.com/redis-enterprise/technology/highly-available-redis/

Page 8: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Are we done?

Page 9: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

What about security?

Page 10: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

AUTH command

https://redis.io/commands/auth

Page 11: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Layers of security

● Very strong password (64 crypto random bytes)

● TLS with client-side certificate authentication

● IP filtering

● VNet/VPC

Page 12: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Are we done?

Page 13: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan
Page 14: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Solution: Rebrow

Page 15: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Rebrow

● Web UI for redis database

● Limit Redis access (read/delete)

● Optional: auth proxy

Page 16: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Are we done?

Page 17: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

What about monitoring?

Page 18: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Our use case: Keeping Redis in shape

● Our Redis plan has storage limits

● Redislabs will send a mail when we near the limits

● Issues:

○ Not flexible

○ Alert routing

Page 19: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

We need a better solution!

Page 20: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Simple solution: INFO command

https://redis.io/commands/INFO

Page 21: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan
Page 22: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan
Page 23: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Webdis

● HTTP interface for Redis

● Authentication/Authorization

● JSON output

Page 24: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan
Page 25: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

A secure monitoring solution

Webdis

https://blog.solutotlv.com/keep-redis-shape-3-simple-steps

Page 26: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Are we done?

Page 27: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

We have a storage:

✓ Strong Consistency, high availability storage

✓ Secure

✓ We can access it

✓ We can monitor it

Page 28: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Questions?

Page 29: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Demo

Checkout the code on GitHub

Page 30: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Come work with us!

jobs.soluto.com

Page 31: Using redis like a pro€¦ · Key-Value Store. A note about high availability Replication Append Only File (AOF) Snapshots ... Our use case: Keeping Redis in shape Our Redis plan

Thank You!

@omerlh

@SolutoEng