day 2 general session presentations redisconf

123
Salvatore Sanfilippo Creator of Redis

Upload: redis-labs

Post on 16-Jan-2017

348 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: Day 2 General Session Presentations RedisConf

Salvatore SanfilippoCreator of Redis

Page 2: Day 2 General Session Presentations RedisConf

Yiftach ShoolmanCo-Founder & CTO Redis Labs

Page 3: Day 2 General Session Presentations RedisConf

2 Hot Topics+

1 New Trend

Page 4: Day 2 General Session Presentations RedisConf

Redis on New Memory Technologies

Page 5: Day 2 General Session Presentations RedisConf

DRAM NV-DIMM/PM NVMe SSD SATA SSD$0

$1

$2

$3

$4

$5

$6

$7

$8

$9

$10

0.01

0.12

1.20

12.00

120.00

1,200.00

0.10

250.00

0.10

500.001 GB cost vs. Read/Write Performance

1 GB cost Read latency Write latency

$/G

B

mic

rose

c

$9

$0.4

High DRAM Cost and Low Flash Performance

Page 6: Day 2 General Session Presentations RedisConf

High DRAM Cost and Low Flash Performance

DRAM NV-DIMM/PM NVMe SSD SATA SSD$0

$1

$2

$3

$4

$5

$6

$7

$8

$9

$10

0.01

0.12

1.20

12.00

120.00

1,200.00

0.10

90.00250.00

0.10

25.00

500.001 GB cost vs. Read/Write Performance

1 GB cost Read latency Write latency

$/G

B

mic

rose

c

$9

$0.4$1

Page 7: Day 2 General Session Presentations RedisConf

High DRAM Cost and Low Flash Performance

DRAM NV-DIMM/PM NVMe SSD SATA SSD$0

$1

$2

$3

$4

$5

$6

$7

$8

$9

$10

0.01

0.12

1.20

12.00

120.00

1,200.00

0.10

1.00

90.00

250.00

0.10

1.00

25.00

500.001 GB cost vs. Read/Write Performance

1 GB cost Read latency Write latency

$/GB

mic

rose

c

$9

$0.4$1

$2

Page 8: Day 2 General Session Presentations RedisConf

Bring Redis Performance on Persistent Memories

Close to Redis Performance on DRAM

The Challenge

Page 9: Day 2 General Session Presentations RedisConf

Before dealing with this challenge…

Page 10: Day 2 General Session Presentations RedisConf

Is Persistent Memory Really Persistent ?

NVMe

NV-DIMM

Cloud Instance

Page 11: Day 2 General Session Presentations RedisConf

NVMe

NV-DIMM

Failed Instance

Is Persistent Memory Really Persistent ?

Page 12: Day 2 General Session Presentations RedisConf

Is Persistent Memory Really Persistent ?

NVMe

NV-DIMM

Failed Instance

NVMe

NV-DIMM

New Empty Instance

Page 13: Day 2 General Session Presentations RedisConf

Data Loss

Is Persistent Memory Really Persistent ?

NVMe

NV-DIMM

Failed Instance

NVMe

NV-DIMM

New Empty Instance

Page 14: Day 2 General Session Presentations RedisConf

Alternative Solution

Redundant Flash Array

Cloud Instance

Page 15: Day 2 General Session Presentations RedisConf

Alternative Solution

New non-empty Instance

Redundant Flash Array

Failed Instance

Page 16: Day 2 General Session Presentations RedisConf

Another Alternative

• Requires ultra high-speed/low-

latency network like Fiber-Channel

or Infiniband

• Latency is still at ~ 100microsec

• Expensive, complex and not

supported by cloud vendors New non-empty Instance

Redundant Flash Array

Failed Instance

Page 17: Day 2 General Session Presentations RedisConf

Persistent Memory = Ephemeral Memory

Persistent Storage

AOF, SnapshotNVMe

NV-DIMM

Cloud Instance

Page 18: Day 2 General Session Presentations RedisConf

Redis on Flash (RoF)

• Flash used as a RAM extender (not as a persistent storage)

• In RAM: dict & keys & hot values

• On Flash: cold values

• Values are either in RAM or on Flash

• Multi-shard; multi-threaded; asynchronous

• Pluggable storage engine (RocksDB and IBM’s ark)

• 100% compatible with the OSS Redis

Page 19: Day 2 General Session Presentations RedisConf

Flexible RAM/Flash Ratios

Page 20: Day 2 General Session Presentations RedisConf

Behind the Scene

Page 21: Day 2 General Session Presentations RedisConf

Increase RAM ratio Scale-out Cluster

2500 GB2500 GB

50%50%

Page 22: Day 2 General Session Presentations RedisConf

RoF is Fast

Avg: 2.04M ops/secMax: 2.14M ops/sec

Avg: 0.91msecMax: 0.98 msec% below 1msec:100%

Avg: 313RMB / 9.4WMBMax: 1.71RGB / 96WMB

Avg: 1.45Gbps (Tx) / 0.97Gbps (Rx)Max: 1.6Gbps (Tx) / 1.2Gbps (Rx)

>2M Ops/sec, > 1GB disk bandwidth, @ <1 msec latency

readwrite

readwrite

Page 23: Day 2 General Session Presentations RedisConf

Master-Master Replication

Page 24: Day 2 General Session Presentations RedisConf

Customer Perspective

• Keep the speed of Redis

• Maintain all Redis commands - simple and complex

• Flexible configuration across regions

• Any # of regions, single/multi-az/rack, any combination of nodes/shards

• Fully-managed service

Page 25: Day 2 General Session Presentations RedisConf

How it Should Work? Start

Synced

Not synced

Page 26: Day 2 General Session Presentations RedisConf

How it Should Work? Write

Locally

Synced

Not synced

App

App

Page 27: Day 2 General Session Presentations RedisConf

How it Should Work? Distribute P2P

Asynchronously

Synced

Not synced

App

App

Page 28: Day 2 General Session Presentations RedisConf

PartiallyConverged

How it Should Work?

Synced

Not synced

App

App

Page 29: Day 2 General Session Presentations RedisConf

App

App

FullyConverged

How it Should Work?

Synced

Not synced

Page 30: Day 2 General Session Presentations RedisConf

Our Approach to Master-Master

• Behaves like local Redis, performs like local Redis

• Based on CRDT (Conflict-free Replication Data Type)

• Supports Strong Eventual Consistency• No consensus protocol; no need for R + W > N

• Any two nodes that have received the same (unordered) set of updates will be

in the same state

• More to come…

Page 31: Day 2 General Session Presentations RedisConf

1 New Trend

Page 32: Day 2 General Session Presentations RedisConf

Foreword

Page 33: Day 2 General Session Presentations RedisConf

If you are here …

Page 34: Day 2 General Session Presentations RedisConf

You’re probably a geek

Page 35: Day 2 General Session Presentations RedisConf

Or a geekette (the female geek)

Page 36: Day 2 General Session Presentations RedisConf

• Dealing with simple problems

• Writing code in shitty languages

• Using silly npm packages

• Not refactoring your poor old architecture because of politics

You are tired of…

Page 37: Day 2 General Session Presentations RedisConf

And you really want to solve real problems

Page 38: Day 2 General Session Presentations RedisConf

So what are your options ?

Page 39: Day 2 General Session Presentations RedisConf

Option #1 – Create your own startup

Page 40: Day 2 General Session Presentations RedisConf

50% of startups fail in the first year

and 

95% percent fail within five years

Page 41: Day 2 General Session Presentations RedisConf

Option #2 – Create a Redis Module

Page 42: Day 2 General Session Presentations RedisConf

Get respect from the community

Page 43: Day 2 General Session Presentations RedisConf

And (hopefully) get many stars on GitHub

Page 44: Day 2 General Session Presentations RedisConf

How do you make $$$ ?

Page 45: Day 2 General Session Presentations RedisConf

• A marketplace for OSS and closed source modules

• All modules are certified by Redis Labs for these platforms:

Module Hub

1M+ instances 350K+ instances 100+ F500 Companies

www.redismodules.com

Page 46: Day 2 General Session Presentations RedisConf

Geo Clustering

Page 47: Day 2 General Session Presentations RedisConf

Geo Clustering

Page 48: Day 2 General Session Presentations RedisConf

Adding a Module to Module Hub

Upload

A few clicks

Page 49: Day 2 General Session Presentations RedisConf

Adding a Module to Module Hub

Upload CertificationProcess

One monthA few clicks

Page 50: Day 2 General Session Presentations RedisConf

Adding a Module to Module Hub

Upload AlphaCertificationProcess

One monthA few clicks Still not shown in the marketplace.

Test by 10 selected customers

Page 51: Day 2 General Session Presentations RedisConf

Adding a Module to Module Hub

Upload Alpha BetaCertificationProcess

One month At least 1 month free

A few clicks Still not shown in the marketplace.

Test by 10 selected customers

Page 52: Day 2 General Session Presentations RedisConf

Adding a Module to Module Hub

Upload Alpha Beta GACertificationProcess

One month Still not shown in the marketplace.

Test by 10 selected customers

At least 1 month free

A few clicks

Page 53: Day 2 General Session Presentations RedisConf

So – can you make $$$ here ?

Page 54: Day 2 General Session Presentations RedisConf

Full text search Prefix search0.00

5.00

10.00

15.00

20.00

25.00

30.00

3.15 2.40

21.00

8.70

24.57

10.61

Average Latency (msec)

RLEC Elasticsearch Solr

Full text search Prefix search0

5,000

10,000

15,000

20,000

25,000

20,045

6,831

690

3,686

621

3,133

Ops/sec

RLEC Elasticsearch Solr

85% higher

32x higher

7.8x faster 4.1x faster

redisearch

The world fastest text search engine

Page 55: Day 2 General Session Presentations RedisConf

For only $0.114/hr

redisearch – the world fastest text search engine

Full text search Prefix search0.00

5.00

10.00

15.00

20.00

25.00

30.00

3.15 2.40

21.00

8.70

24.57

10.61

Average Latency (msec)

RLEC Elasticsearch Solr

Full text search Prefix search0

5,000

10,000

15,000

20,000

25,000

20,045

6,831

690

3,686

621

3,133

Ops/sec

RLEC Elasticsearch Solr

85% higher

32x higher

7.8x faster 4.1x faster

Page 56: Day 2 General Session Presentations RedisConf

The Possibilities areTruly Endless

Thank You@yiftachsh

Page 57: Day 2 General Session Presentations RedisConf

Salvatore SanfilippoCreator of Redis

Page 58: Day 2 General Session Presentations RedisConf

Adrian Colyer Venture Partner at Accel

Author of the Morning Paper BlogFormer CTO, VMWare, Pivotal and Spring Source

Page 59: Day 2 General Session Presentations RedisConf

As I get older, my memory just keeps getting better and better!

Page 60: Day 2 General Session Presentations RedisConf

blog.acolyer.org

350Foundation

sFrontiers

Page 61: Day 2 General Session Presentations RedisConf

A new era of hardware (and what it might mean for Redis)

A new era of data structures?

Talk outline

a

b

Page 62: Day 2 General Session Presentations RedisConf

Human computers at Dryden by NACA (NASA) - Dryden Flight Research Center Photo Collection

http://www.dfrc.nasa.gov/Gallery/Photo/Places/HTML/E49-54.html. Licensed under Public Domain via Commons - https://commons.wikimedia.org/wiki/File:Human_computers_-_Dryden.jpg#/media/File:Human_computers_-_Dryden.jpg

Page 63: Day 2 General Session Presentations RedisConf

Computing on a human scale

63

10ns70ns10ms

10s1:10

s116d

Registers & L1-L3

File on desk

Main memory

Office filing cabinet

HDDTrip to the warehouse

Page 64: Day 2 General Session Presentations RedisConf

ComputeHTMPersistent Memory NIFPGAGPUs

MemoryNVDIMMsPersistent Memory

Networking

100GbERDMA

StorageNVMe

Next-gen NVM

Next generation hardwareAll change please

64

Page 65: Day 2 General Session Presentations RedisConf

2-10m

Computing on a human scale

65

10s1:10

s116d

File on deskOffice filing cabinetTrip to the warehouse

4x capacity fireproof local filing cabinets

23-40mPhone another office (RDMA)3h20

mNext-gen warehouse

Page 66: Day 2 General Session Presentations RedisConf

The new ~numbers everyone should know

66

Latency Bandwidth Capacity/IOPS

Register 0.25ns

L1 cache 1ns

L2 cache 3ns 8MB

L3 cache 11ns 45MB

DRAM 62ns 120GBs 6TB - 4 socket

NVRAM’ DIMM 620ns 60GBs 24TB - 4 socket

1-sided RDMA in Data Center 1.4us 100GbE ~700K IOPS

RPC in Data Center 2.4us 100GbE ~400K IOPS

NVRAM’ NVMe 12us 6GBs 16TB/disk,~2M/600K

NVRAM’ NVMf 90us 5GBs 16TB/disk, ~700/600K

Page 67: Day 2 General Session Presentations RedisConf

NVMe Example: Redis on Flash

67

• 2M IOPS• Sub-ms latency

• 1:4 DRAM:NVM split

(40x SATA SSD)

Page 68: Day 2 General Session Presentations RedisConf

NVMf Example: E8 Storage

68

$12M Series B led by Accel

• 10M IOPS in single appliance, accessed via RDMA• 100us/50us read/write latency• ...and this is with NAND Flash!

Page 69: Day 2 General Session Presentations RedisConf

Data tiering in heterogeneous memory systems

DDR-DRAM NVMCapacity per CPU 100s of GBs Terabytes

Read latency 1x 2x to 4x

Write bandwidth 1x ⅛ x to ¼ x

Estimated cost 5x 1x

Endurance 1016 106 to 108

Dulloor et al. 2016 (EuroSys)

Page 70: Day 2 General Session Presentations RedisConf

What will it mean?

70

this!

All DRAM (baseline)

All NVM

tiered memory, with increasingNVM proportion

Impact on cost?

Impact on performance?

Impact on performance/$?

Page 71: Day 2 General Session Presentations RedisConf

Key-value store results - performance impact

Proportion of DRAM

Performance relative to all DRAM

NVM only 1.15 - 1.45x

1/8 1.14 - 1.4x

1/4 1.06 - 1.13x

1/2 1.05x

beware!

Page 72: Day 2 General Session Presentations RedisConf

Key-value store results - cost impact

Proportion of DRAM

Performance/$ relative to all DRAM

NVM only 3.45 - 4.5x

1/8 3.1x

1/4 2.3x

1/2 1.6x

Page 73: Day 2 General Session Presentations RedisConf

And don’t forget about capacity!

Proportion of DRAM

Performance relative to all DRAM

Performance/$ relative to all DRAM

Capacity relative to all DRAM

NVM only 1.15 - 1.45x 3.45 - 4.5x 4 - 10x

1/8 1.14 - 1.4x 3.1x 3.6 -8.9x

1/4 1.06 - 1.13x 2.3x 3.3 - 7.8x

1/2 1.05x 1.6x 2.5 - 5.5x

Page 74: Day 2 General Session Presentations RedisConf

74

Ultra low latency, PBs of data

• The RAMCloud storage system - Ousterhout et al. 2015• Implementing linearizability at large scale and low latency - Lee et al. 2015

1000+ Servers

PB+ Memory RDMA RIFL

Page 75: Day 2 General Session Presentations RedisConf

75

RAMCloud Performance

Operation End-to-end Latency median (99.9%-ile)

Read 4.7 (9.2)μs

Write (durable) 13.4 (148)μs

Transaction 20μs

5-object transaction 27μs

TPC-C throughput (10 nodes) 35K tps

Page 76: Day 2 General Session Presentations RedisConf

76

No compromisesDistributed transactions with consistency, availability, and performance

Dragojević et al. 2015

“This paper demonstrates that new software in modern data centers can eliminate the need to compromise. It

describes the transaction, replication, and recovery protocols in FaRM, a main memory distributed computing

platform. FaRM provides distributed ACID transactions with strict serializability, high availability, high throughput and low latency. These protocols were designed from first principles to leverage two hardware trends appearing in

data centers: fast commodity networks with RDMA and an inexpensive approach to providing non-volatile

DRAM.”

Page 77: Day 2 General Session Presentations RedisConf

77

FaRM PerformancePerformance

TPC-C tps (90 nodes) 4.5M

99%-ile latency 1.9ms

K-V Store* qps (20 nodes) 146M

latency (at peak throughput) 35μs

(* FaRM: Fast Remote Memory - Dragojević et al. 2014)

Page 78: Day 2 General Session Presentations RedisConf

78

Exploiting HTM...

Persist.Memory RDMA HTM DrTM

Fast in-memory transaction processing using RDMA & HTM - Wei et al. 2015

5.5Mtps(TPC-C, 6 node cluster)

Page 79: Day 2 General Session Presentations RedisConf

Redis is way more than just a ‘K-V store’...

b A new era of data structures?

Page 80: Day 2 General Session Presentations RedisConf

Evolution of the humble data structure

80

Collection classes& stdlibs

?

single thread/core

Concurrentdata types

multi- thread/core

Distributeddata types

multi-server

Sharedconcurrentdata types

shared-server

PACELC

Page 81: Day 2 General Session Presentations RedisConf

81

Libraries, Servers, & PACELC

App Instance App InstanceApp InstanceCRDT Library

DS Server DS Server

Client Client Client Client Client

CRDT Server

Page 82: Day 2 General Session Presentations RedisConf

82

CRDT Evolution

Operation Based

● prepare and effect

● smaller messages

● require reliable exactly-once causal broadcast

● membership management

● no batching

State Based

● state shipping and idempotent join

● larger messages

● support unreliable communication channels

● accommodate batching

Delta-State Based

● local execution, ship representation of the effect & idempotently join

● smaller messages

● support unreliable communication channels

● accommodate batching

Page 83: Day 2 General Session Presentations RedisConf

Data Structures! E.g. GCounter and PNCounter{ replica_id value }

83

What are CRDTs made of?

{“A”->3, “B”->5}HINCRBY gcounter A 1{“A”->4, “B” -> 5}

HVALS gcounter… 4+5 = 9

{“A” -> 4, “B” -> 7}

{“A”->3, “B”->5}HINCRBY gcounter B 1HINCRBY gcounter B 1{“A”->3, “B” -> 7}

{“A” -> 4, “B” -> 7}

delta B -> 7

delta A -> 4

A B

Page 84: Day 2 General Session Presentations RedisConf

Causal Context X Dot Store

84

Causal ∂-CRDTs

version vector(Redis hash) Dot.Event

(Redis set or hash)

Dot = replica_id:sequence_no

INCR

+ a delta queue for propagation...

WATCH my_crdt:seq_nonext = INCR my_crdt:seq_no MULTIHSET my_crdt:ccontext replica_id nextSADD my_crdt:dotstore “replica_id:next:val”RPUSH my_crdt:deltaq deltaEXEC

Page 85: Day 2 General Session Presentations RedisConf

A new era of hardware (and what it might mean for Redis)

A new era of data structures

Summary

a

b

Page 86: Day 2 General Session Presentations RedisConf

Thank You@adriancolyer

Page 87: Day 2 General Session Presentations RedisConf

Salvatore SanfilippoCreator of Redis

Page 88: Day 2 General Session Presentations RedisConf

Laura MerlingFormer VP and GM of IoT Initiative at SAP

Page 89: Day 2 General Session Presentations RedisConf

The Internet of Things Real Time Reality

Page 90: Day 2 General Session Presentations RedisConf

The IoT Landscape

PLATFORMS AND ENABLEMENTSOFTWARE, FULL-STACK, DEVELOPER, ANALYTICS, OPEN SOURCE

Page 91: Day 2 General Session Presentations RedisConf

Big Data with an IOT View

Variability

Velocity

Volume

VarietyComplexity

VelocityData streams and near-real time; RFID tags, sensors and smart metering.

VarietyStructured and unstructured.

VariabilityInconsistent; event triggered.

ComplexityMultiple sources; connect and correlate

relationships, hierarchies and multiple data linkages.

VolumeBillions of sensors and machine to

machine transactions.

Page 92: Day 2 General Session Presentations RedisConf

Analytics Continuum

DiagnosticDescriptive

PrescriptivePredictive

What Happened Why Did it Happen What Will Happen Make it HappenIn Real Time

Page 93: Day 2 General Session Presentations RedisConf

Geospatial

The Redis IOT Opportunity

PubSub DatabaseCaching

Time Series

Page 94: Day 2 General Session Presentations RedisConf

Challenges• Latency• Automation• Complexity

Oil and Gas

Page 95: Day 2 General Session Presentations RedisConf

Challenges• Transformer• Distribution

Electric Vehicle Charging

Page 96: Day 2 General Session Presentations RedisConf

Manufacturing

Challenges• Unpredictable • Adherence • Unavailable

Page 97: Day 2 General Session Presentations RedisConf

Construction

Challenges• Awareness• Congestion• Slow

Page 98: Day 2 General Session Presentations RedisConf

Connected Home

Challenges• Latency• Interaction• Simplification

Page 99: Day 2 General Session Presentations RedisConf

Retail

Challenges• Latency• Interaction/Engagement• Inventory

Page 100: Day 2 General Session Presentations RedisConf

The Data

MINING IoT FOR THE UNFILTERED TRUTH

Page 101: Day 2 General Session Presentations RedisConf

Thank You@magicmerl

Page 102: Day 2 General Session Presentations RedisConf

Salvatore SanfilippoCreator of Redis

Page 103: Day 2 General Session Presentations RedisConf

Reynold XinChief Architect Spark at Databricks

Page 104: Day 2 General Session Presentations RedisConf

Spark and Redis: In-situ analytics beyond Hadoop

Reynold Xin@rxin2016-05-11 RedisConf

Page 105: Day 2 General Session Presentations RedisConf

About DatabricksFounded by creators of Spark in 2013

Cloud enterprise data platform- Managed Spark clusters- Interactive data science- Production pipelines- Data governance, security, …

Page 106: Day 2 General Session Presentations RedisConf

Please put up your hand

if you know what Spark is?

Page 107: Day 2 General Session Presentations RedisConf

Please put up your hand

if you think your significant otherknows what Spark is?

Page 108: Day 2 General Session Presentations RedisConf

open source data processing engine built around speed, ease of use, and sophisticated analytics

largest open source data project with 1000+ contributors

Page 109: Day 2 General Session Presentations RedisConf
Page 110: Day 2 General Session Presentations RedisConf
Page 111: Day 2 General Session Presentations RedisConf
Page 112: Day 2 General Session Presentations RedisConf
Page 113: Day 2 General Session Presentations RedisConf

“Spark is the Taylor Swift of big data software.”

- Derrick Harris, Fortune

Page 114: Day 2 General Session Presentations RedisConf

Analytics: a traditional approach

Hadoop is complex to operateData consistency is difficult to maintain

Page 115: Day 2 General Session Presentations RedisConf

Analytics in-situSQL

ML

Streaming

Page 116: Day 2 General Session Presentations RedisConf

Analytics in-situSQL

Streaming

MLEnable SQL analytics over RedisUse Redis to store streaming data

Use Redis to serve results generated by Spark

Page 117: Day 2 General Session Presentations RedisConf

Demoby Richard Garris

Page 118: Day 2 General Session Presentations RedisConf

Discount code: Meetup16SF

Page 119: Day 2 General Session Presentations RedisConf

Thank You@rxin

Page 120: Day 2 General Session Presentations RedisConf

Salvatore SanfilippoCreator of Redis

Page 121: Day 2 General Session Presentations RedisConf

Enjoy RedisConf

UpdatesYour morning break is located downstairs in the Sponsor Showcase

Three concurrent Breakout Sessions will begin at 11:15am

The Developer Workshop begins at 1:00pm in the Developer Café

Save your Redis Community Raffle ticket for today’s drawingfor a chance to win a Phantom Drone

Page 122: Day 2 General Session Presentations RedisConf

11:15am-12:00pm New Redis Capabilities: Own, Make, Share

1:00pm-1:45pm SSH I/O Streaming Via Redis-based Persistent Message Queue

2:00pm-2:45pm Walmart and IBM Revisit the Linear Road Benchmark

3:15pm-4:00pm Back your App with MySQL & Redis, the Cloud Foundry Way

4:15pm-5:00pm Postgres and Redis Sitting in a Tree

122

BREAKOUTS: WEDNESDAY, MAY 11

Page 123: Day 2 General Session Presentations RedisConf

Salvatore SanfilippoCreator of Redis