Top Banner
40

REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Mar 17, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services
Page 2: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

REDISRUN THE MOST LOVED DATABASE IN

YOUR CONTAINERS INFRASTRUCTURE

Tug Grall

Redis Labs

@tgrall

Page 3: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

• Tugdual “Tug” Grall• Redis Labs (TAM) • Red Hat (PM Director Dev

Experience) • MapR (DevRel & PM) • MongoDB (DevRel) • Couchbase (DevRel) • eXo Platform (CTO) • Oracle (PM & Soft Engineer)

About me

3

tgrall

tgrall

https://tgrall.github.io

[email protected]

[email protected]

• Pet Projects• https://promoglisse-speed-challenge.com • Promoglisse Mobile App (iOS/Android)

Page 4: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

MOST LAUNCHED MOST USED MOST LOVED

Sumo Logic, Sept. 2019 Stack Overflow, 2017, 2018, 2019Launches/day: Docker Hub, Nov. 2019

How popular is Redis ?

Page 5: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Why?

Page 6: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Why Redis ?

100ms

50ms

50ms

DatabaseApp servers

Humans

Apps

Machines

Page 7: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Why Redis ?

100ms

50ms

50ms

1ms

App servers

Humans

Apps

Machines

Page 8: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Use cases?

User Session Store

Real Time Data Ingest

High Speed Transactions

Job & Queue Management

Time Series Data Notifications Distributed Lock

Content Caching

Location-based Processing

Streaming Processing

ML/DL Serving Search

OPERATIONAL

Real Time Analytics

Complex Statistical Analysis

Real Time Data Ingest

Time Series Data

Location-based Processing

Search & Secondary Index

Page RankingRecommendation Engine

Leaderboards

Counting

ANALYTICS

Page 9: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Hashes

Bitmaps

Strings

Bit Field

Streams

Hyperloglog

Sorted Sets

Sets

Geospatial

Search

Graph

TimeSeries

AI

JSON

Gears

Redis core Redis modules

BloomFilter

Redis

Lists

Page 10: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

• Redis Streams: (Redis Core) XADD mystream * sensor-id 1234 temperature 19.8XRANGE mystream - + COUNT 2

• RediSearch: FT.SEARCH myIdx "hello world" LIMIT 0 10FT.SUGGET autocomplete “he"

• Redis TimeSeries: TS.ADD temperature:3:11 1548149181 30 TS.RANGE temperature:3:11 1548149180 1548149210 AGGREGATION avg 5

Multi-Model Databasehttps://oss.redislabs.com/

Page 11: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

• RedisGraph: (Cipher query) GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = 'Yamaha' RETURN r.name, t.name”

• RedisJSON: JSON.SET foo . ‘"bar"' JSON.NUMINCRBY num . 1.5 JSON.ARRPOP arr

• RedisBloom: BF.ADD newFilter foo BF.EXISTS newFilter foo BF.MEXISTS myFilter foo nonexist bar

Multi-Model Databasehttps://oss.redislabs.com/

Page 12: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Hashes

Bitmaps

Strings

Bit Field

Streams

Hyperloglog

Sorted Sets

Sets

Geospatial

Search

Graph

TimeSeries

AI

JSON

Gears

Redis core Redis modules

BloomFilter

Redis Enterprise core

Redis Enterprise

Lists

Linear scalability HA Geo-Distribution Durability Backup & restore Tiered-memory access SecurityMulti-tenant

Page 13: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

RedisInsight : A standard UI for Redis

• Developer-friendly UI

• Adds insight to existing and new data structures: Streams, Search, JSON, Graph, Time-series

• Enhanced memory-analysis and recommendation capabilities

• Admin monitoring, commands tracer,CLI interface, bulk operations

redislabs.com/redisinsight

Page 14: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

How?

Page 15: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Cloud Essentials

Cloud Pro, Ultimate

Downloadable Native Kubernetes Essentials

PCF over BOSH or PKS

Essentials

OpenShift over Kubernetes

DATABASE-AS-A-SERVICE SOFTWARE

QA & Dev,Small Prod Workloads

Production, Hosted or in

customer’s VPC

Multiple Delivery Models

Page 16: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

• Images available on Docker Hub: – Redis Enterprise + Modules : docker pull redislabs/redis

– Redis OSS Core : docker pull redis

– RedisSearch : docker pull redislabs/redisearch

– Redis TimeSeries : docker pull redislabs/redistimeseries

– Redis Graph : docker pull redislabs/redisgraph

– Redis Bloom : docker pull redislabs/rebloom

– Redis JSON : docker pull redislabs/rejson

– Redis Insight : docker pull redislabs/redisinsight

• Or From RedisLabs download center: – Docker, Kubernetes, PCF : https://redislabs.com/download-center/

Develop with Redis ContainerRun Redis locally easily

Page 17: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Redis & Docker

17

Page 18: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Run a Redis Enterprise Cluster with Docker

http://tgrall.github.io/blog/2019/09/05/multi-nodes-redis-cluster-with-docker/

Page 19: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Run a Redis Enterprise Cluster with Docker

http://tgrall.github.io/blog/2019/09/05/multi-nodes-redis-cluster-with-docker/

Page 20: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Redis & Kubernetes

Page 21: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Redis Enterprise Scalable Architecture on Kubernetes

Redis Enterprise Node Redis Enterprise Cluster

Fully compatible with open source commands & data structures

Page 22: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Redis Enterprise & Kubernetes : Architecture

22

Page 23: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Kubernetes Operator

https://github.com/RedisLabs/redis-enterprise-k8s-docs

> kubectl apply -f redis-enterprise-operator.yml > kubectl apply -f redis-enterprise-crd.yml > kubectl apply -f redis-enterprise-cr.yml

Page 24: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a Kubernetes environment

Page 25: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a k8s environment

1 Dual orchestrator

Page 26: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a k8s environment

1 Dual orchestrator

2 Uneven number of pods

Page 27: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a k8s environment

1 Dual orchestrator

2 Uneven number of Pods

3 Stateful set

Page 28: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a k8s environment

1 Dual orchestrator

2 Uneven number of Pods

3 Stateful set

4 Anti-affinity

Page 29: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a k8s environment

1 Dual orchestrator

2 Uneven number of Pods

3 Stateful set

4 Anti-affinity

5 Multi-AZ (failure domains)

Page 30: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a k8s environment

1 Dual orchestrator

2 Uneven number of Pods

3 Stateful set

4 Anti-affinity

5 Multi-AZ (failure domains)

6 Rolling upgrade

Page 31: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

8 principles for managing production Redis in a k8s environment

1 Dual orchestrator

2 Uneven number of Pods

3 Stateful set

4 Anti-affinity

5 Multi-AZ (failure domains)

6 Rolling upgrade

7 Automated cluster recovery

Page 32: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Active-Active Redis (CRDTs-based)Disaster Recovery

8

Page 33: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Session Management Disaster Recovery

Active-Active Redis (CRDTs-based)8

Page 34: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Globally distributed applications

₤$

$

Session management Disaster recovery

Local latency <1ms

Active-Active Redis (CRDTs-based)8

Page 35: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

App

App

App

App

35

Multi-cloud, on-premises, and hybrid deployments

On Premises

Page 36: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Redis & Kubernetes &

Your Microservices

Page 37: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

BloomFilter JSONGraph Search TimeSeries AI

Authentication Users Catalog SearchFraud

detection

Microservices running in Kubernetes

Page 38: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

BloomFilter JSONGraph Search TimeSeries AI

Authentication Users Catalog SearchFraud

detection

Microservices running in Kubernetes

Page 39: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

• Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

• http://redislabs.com • https://redislabs.com/tech-blog/ • https://redis.io • http://university.redislabs.com

• Kuberneted Blog posts: • Redis Enterprise Operator for Kubernetes

• Automated Cluster Recovery Comes to the Redis Enterprise Kubernetes Operator

• Redis Enterprise Release Using Helm Charts

• Running Redis Enterprise Kubernetes Service

Conclusion

Page 40: REDIS · • Redis your Cloud Native Database • Run anywhere: Bare Metal, Docker, Kubernetes, OpenShift, Pivotal, AWS, GCP, Azure… • Multi-model database for your micro services

Thank You

Tug Grall

Redis Labs

@tgrall