Build Highly Resilient Applications with Redis Enterprise Clustering - - PowerPoint PPT Presentation

build highly resilient applications with redis enterprise
SMART_READER_LITE
LIVE PREVIEW

Build Highly Resilient Applications with Redis Enterprise Clustering - - PowerPoint PPT Presentation

Build Highly Resilient Applications with Redis Enterprise Clustering MAY 2019 | MANUEL HURTADO Redis Introduction Most Loved Databases 2017, 2018 & 2019 Stack Overflow survey, among >100K developers % of devs who expressed interest in


slide-1
SLIDE 1
slide-2
SLIDE 2

Build Highly Resilient Applications with Redis Enterprise Clustering

MAY 2019 | MANUEL HURTADO

slide-3
SLIDE 3

Redis Introduction

slide-4
SLIDE 4

Most Loved Databases 2017, 2018 & 2019

Stack Overflow survey, among >100K developers % of devs who expressed interest in continuing to develop with a database

slide-5
SLIDE 5

Most Popular Database Container

Number of containers (in Billions) launched at Docker Hub (as of Dec 2018)

0.0 5 0.2 0.5 9 1.1 4 1.1 7

slide-6
SLIDE 6

Redis Top Differentiators

Simplicity Extensibility Performance

NoSQL Benchmark

1

Redis Data Structures

2 3

Redis Modules 6

Lists Hashes Bitmaps Strings Bit field Streams Hyperloglog Sorted Sets Sets Geospatial Indexes

slide-7
SLIDE 7

Performance: The Most Powerful Database

Highest Throughput at Lowest Latency in High Volume of Writes Scenario Least Servers Needed to Deliver 1 Million Writes/Sec

Benchmarks performed by Avalon Consulting Group Benchmarks published in the Google blog

7

1

Servers used to achieve 1M writes/sec

slide-8
SLIDE 8

Simplicity: Data Structures - Redis’ Building Blocks

Lists [ A → B → C → D → E ] Hashes { A: “foo”, B: “bar”, C: “baz” } Bitmaps 0011010101100111001010 Strings "I'm a Plain Text String!” Bit field {23334}{112345569}{766538}

Key

8

2

”Retrieve the e-mail address of the user with the highest bid in an auction that started on July 24th at 11:00pm PST”

ZREVRANGE 07242015_2300 0 0

=

Streams

฀ {id1=time1.seq1(A:“xyz”, B:“cdf”), d2=time2.seq2(D:“abc”, )}฀

Hyperloglog 00110101 11001110 Sorted Sets { A: 0.1, B: 0.3, C: 100 } Sets { A , B , C , D , E } Geospatial Indexes { A: (51.5, 0.12), B: (32.1, 34.7) }

slide-9
SLIDE 9

Extensibility: True Multi-Model Functionality for All Use Cases

9

  • Implemented by Redis Modules, independent of

the Redis core

  • Add-ons that use a Redis API to seamlessly

support additional use cases and data structures

  • Loosely coupled design, i.e. load only models

needed for your use case

  • Optimal data structure implementation for JSON,

Graph, Search (and other) functionality, not just APIs

  • Add new capabilities and data structures to Redis

– in speeds similar to normal Redis commands

  • Redis Enterprise Modules are tested and certified

by Redis Labs

3

Search JSON Graph ML

5X Faster search and throughput Serves models 2000 times faster Based on GraphBLAS technology Native JSON handling

slide-10
SLIDE 10

Real Time Analytics User Session Store Real Time Data Ingest High Speed Transactions Job & Queue Management Time Series Data Complex Statistical Analysis Notifications Distributed Lock Content Caching Geospatial Data Streaming Data Machine Learning Search

Uniquely Suited to Modern Use Cases

A full range of capabilities that simplify and accelerate next generation applications

slide-11
SLIDE 11

Highest Performance at Any Use Case

11

ML Serving – x2,000 Search – x5 Graph – x400

Servers used to achieve 1M writes/sec

NoSQL – x150 Streams – x500

slide-12
SLIDE 12

Redis Enterprise Architecture

slide-13
SLIDE 13

What is a Redis Enterprise cluster

13

Database Types

  • Simple database (single master

shard)

  • Highly available (HA) database
  • Clustered database (no replication)
  • Clustered HA database
slide-14
SLIDE 14

Shared-Nothing, Linearly Scalable, Multi-Tenant, Symmetric Architecture

14

Separation between the data path and and the control path components. Benefits:

  • Performance
  • Availability
  • Security
  • Manageability
slide-15
SLIDE 15

Redis Enterprise Cluster Components

15

slide-16
SLIDE 16

Linear Scaling with Redis Enterprise

slide-17
SLIDE 17

Scaling Shards and Nodes

Scaling Up

17

slide-18
SLIDE 18

Scaling Shards and Nodes

Scale out, Rebalancing, Resharding

18

slide-19
SLIDE 19

Scaling Proxies

19

slide-20
SLIDE 20

Scalability with Open Source (OSS) Cluster API

20

slide-21
SLIDE 21

Scaling ‘Read’ using ‘Replica-Of’

21

slide-22
SLIDE 22

Highly Available Redis

slide-23
SLIDE 23

Redis Enterprise: HA system with only two replicas

23

The Cost of 90GB Dataset HA Deployment on AWS (reserved instances)

slide-24
SLIDE 24

High Availability: Redis shard Failure

Auto-failover

P P P P P M R M M R R M 1 2 2 1 2 1 2 1

Slave sync. Re-balancing Redis 1 fails Redis 1 recovers

P P P

slide-25
SLIDE 25

High Availability: Proxy Failure

P M R R M R M R M 1 2 2 1 2 1 2 1 P P P

Proxy fails Proxy recovers

P P

slide-26
SLIDE 26

High Availability: Node Failure

Auto-failover

M R M M R 1 2 2 1 2 1

Replica sync. Node fails Node recovers

P P P P

slide-27
SLIDE 27

Watchdogs

27

  • Node watchdog: Monitors all

processes running on a given node.

  • Cluster watchdog – Responsible

for the health of the cluster nodes and uses a gossip protocol to manage the membership of the nodes in the cluster.

slide-28
SLIDE 28

Multi-AZ (Availability-Zone) / Rack Deployment

28

Conditions required

  • Three or more cluster nodes, with total

number being uneven

  • Three or more AZs/racks, with total

number being uneven

  • The number of nodes in a given AZ/rack

should always be a minority

  • Network latency between the AZ/rack

should be <10ms

slide-29
SLIDE 29

Redis Enterprise Geo Distribution

slide-30
SLIDE 30

Active-Passive Geo Distribution

30

Replica – of: unidirectional replication between DBs

  • Each source several destinations (one-to-

many)

  • Each destination replicated from several

sources (many-to-one)

  • Each destination can be a source (chained

replication)

  • Each database different database settings,

and different cluster settings

  • Automatic compression
  • Optional encryption
slide-31
SLIDE 31

Active - Active Geo Distribution (CRDT-Based)

31

CDRT (Conflict-free Replicated Data Types)

  • High Performance: Read and write with low

local sub-millisecond latency

  • Guaranteed data consistency: CRDT based:

The datatypes are conflict-free by design. All databases eventually converge automatically to the same state with strong eventual consistency. Supports causal consistency executing read and write

  • perations in an order that reflects causality
  • Simplifies the app design: Develop as if it’s a

single app in a single geo, we take care of all the rest

slide-32
SLIDE 32

Solutions that benefit from Redis Enterprise with Active-Active support

Geo Distributed Trading/Bidding

  • Auctions, Bids/Asks: Lists/Sorted Sets tracking Bids and

Asks

Dashboards & Scoreboards

  • Tracking Geo Distributed Scoreboards: Sorted Sets

tracking ordered scores

Real-time Metering Apps

  • Tracking Usage/Consumption: Sets/Lists Tracking

Consumption Events

And more….. Fraud Mitigation

  • Geo Distributed Event Tracking: Sets Gathering Geo

Distributed Events

Social Engagement Apps

  • Encoding Social Engagement: Distributed Counters for

“Likes”, “Shares”, “Retweets”

Collaboration Apps

  • Constructing Smart Timelines: Merged Lists Ordering Posts
  • Instant Messaging & Conversation Tracking: Merged Lists

Ordering Conversations

slide-33
SLIDE 33

Demo

slide-34
SLIDE 34

Demo

  • DB Creation
  • Client load (memtier_benchmark)
  • UI Console
  • rladmin
  • DB Scaling: sharding
  • Failover scenarios
slide-35
SLIDE 35

Thank you!

redislabs.com

35