april 24, 2017 - percona · 3. open source. the leading . in-memory database platform, supporting...

38
Home of Redis April 24, 2017

Upload: others

Post on 20-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

Home of Redis

April 24, 2017

Page 2: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

2

• Introduction to Redis and Redis Labs

• Redis with MySQL

• Data Structures in Redis

• Benefits of Redise

Page 3: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

3

Open source. The leading in-memory database platform, supporting any high performance operational, analytics or hybrid use case.

The open source home and commercial provider of Redis Enterprise (Redise) technology, platform, products & services.

Redis and Redis Labs

Page 4: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

4

Stack Overflow Survey of 64,000 Developers:“Redis is the MOST LOVED Database”

Redis Tops Database Popularity Rankings

Page 5: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

5

Redis Tops Database Popularity Rankings

………#1 database technology on AWS

………#1 database used by Node.js developers

………#1 database in Top Paying Technologies

………#1 NoSQL among Top 10 Data Stores

………#1 database on Docker

………#1 NoSQL in User Satisfaction

………#1 in growth among top 3 NoSQL databases

………#1 database in skill demand

Page 6: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

6

Redis Top Differentiators

Simplicity Extensibility Performance

ListsSorted Sets

Hashes Hyperloglog

Geospatial Indexes

Bitmaps

SetsStrings

Bit field

NoSQL Benchmark Redis Data Structures Redis Modules

Page 7: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

7

Performance: the Most Powerful Database

Highest Throughput at Lowest Latency in High Volume of Writes Scenario

Lowest number of servers needed to deliver 1 Million writes/second

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

Page 8: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

8

• Data Structures like programmer’s “Lego” blocks

• Simple commands for complex operations

Examples:

Simplicity: Data Structures - Redis’ Building Blocks

ListsSorted Sets

Hashes Hyperlog-logs

Geospatial Indexes

Bitmaps

SetsStrings

Bit field

x x +

RPOPLPUSH SINTER HINCRBY

Page 9: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

9

While we say Redis is like Lego, some say it is like a…..

Page 10: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

10

Redise - Swiss Army Knife of Microservices Architecture

Plays different roles• Cache server• Primary database• Session store• Search engine• Time-series database• Analytics database• Message Broker

Application ServerAuthentication

Site Pages

Customer Profile

Management

Search and Discovery

Product Catalog

Session Store/Shopping Cart

Order Processing Fulfillment Analytics

Product Catalog

Manager

Site Manager

Order Fulfillment Application

Business Intelligence

Message Queue

Page 11: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

11

Popular Use Cases

Page 12: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

Redise with MySQL

Page 13: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

13

Common Cache Use Case

Page 14: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

14

A Simple Get/Set Programimport redis

r = redis.StrictRedis(\host='redis-10854.c11.us-east-1-2.ec2.cloud.redislabs.com ',\port=10854,\password=‘mypassword’)

r.set('key1', '123')print(r.get('key1'))

Page 15: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

15

A Simple Get/Set Programimport redis.clients.jedis.Jedis;

public class RedisTest{

public static void main(String[] args) throws Exception{private static final String URL =

"redis-10854.c11.us-east-1-2.ec2.cloud.redislabs.com";private static final int PORT = 10854;private static final String PASSWORD = "mypassword";

jedis = new Jedis(URL, PORT);jedis.auth(PASSWORD);

jedis.set(“key1",“123");System.out.println(jedis.get(“key1"));

}}

Page 16: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

16

Get creative with your keysSelect * from student_listWhere course = “Redis” and location = “Santa Clara”

How would you cache the results?

SET “student_list:Redis:Santa Clara” [Results]

Page 17: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

17

Get creative with your keys

The advantage of separating attributes

1. Get students enlisted to Redis course at all locationsKEYS “student_list:Redis:*” MGET “student_list:Redis:Santa Clara” “student_list:Redis:New York”…

2. Get students enlisted to all the courses in Santa ClaraKEYS “student_list:*:Santa Clara”MGET “student_list:Redis:Santa Clara” “student_list:MySQL:Santa Clara”…

Page 18: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

18

Why Redis is the best Cache Server?

• In-memory store – fast access time• Implemented in C, optimized for best performance• Pipelining

Page 19: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

19

Why Redis is the best Cache Server?

• Is binary safe• Value can be as large

as .5GB• You can even have a

JPEG as a key• Operations are atomic

Page 20: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

20

Why Redis is the best Cache Server?

Wide variety of eviction policies to suit your application needs• noeviction

• allkeys-lru

• volatile-lru

• allkeys-random

• volatile-random

• volatile-ttl

Page 21: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

21

Why Redis is the best Cache Server?

• High Availability with instant, in-memory replication

• Persistence –snapshots, AOF (every second or every write)

• Scalable shared-nothing clustering

Page 22: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

22

Redis is not just a caching layer

High Speed Transactions

Caching Analytics Messaging

Fast Data Ingest

Geo spatial Indexing

Job & QueueTime Series Search

Machine Learning

Redis offers a full range of capabilities that simplify and accelerate next generation applications

Page 23: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

23

Redis Powers a Range of Solutions

Metering

IoT

Real-time

Fraud Detection

Social Apps

E-commerce

Personalization

…AND MANY MORE

Page 24: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

Introduction to Data Structures in Redis

Page 25: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

Redis Enterprise

Page 26: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

26

Redise Cloud Private

Redis Labs Products

Redise Cloud Redise Pack ManagedRedise Pack

SERVICES SOFTWARE

Fully managed Redise

service in VPCs within AWS, MS Azure, GCP &

IBM Softlayer

Fully managed Redise

service on hosted servers within AWS, MS Azure,

GCP, IBM Softlayer, Heroku, CF & OpenShift

Downloadable Redise

software for any enterprise datacenter or

cloud environment

Fully managed Redise

Pack in private data centers

or or or

Page 27: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

27

Redise Technology

Redis Database Instances

Page 28: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

28

Redise Technology

Cluster Manager

Enterprise Layer

Open Source Layer

REST APIZero latency proxy

Page 29: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

29

Redise Technology

Enterprise Layer

Open Source Layer

Zero latency proxyCluster Manager

REST API

Redise Node

Page 30: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

30

Redise Technology

Redise Cluster• Shared nothing cluster architecture

• Fully compatible with open source

commands & data structures

Page 31: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

31

Redise - Shared Nothing Symmetric Architecture

ClusterManagementPath

ProxiesNode WatchdogCluster Watchdog

Node 1 Node 2 Node N (odd number)…

Redis Shards

Unique multi-tenant “Docker” like architecture enables running hundreds of databases over a single, average cloud instance without performance degradation and with maximum security provisions

Data Path

Distributed ProxiesSingle or Multiple Endpoints

Page 32: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

32

Scale Out with Rebalancing & Resharding

Resharding Rebalancing Resharding

Page 33: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

33

Redise Flash

• Optimize read/writes with RAM-Extension• Gain speed with smart caching between RAM and Flash• Available on Redise Pack and Redise Cloud Private

Large Datasets with Near RAM Latency at a Lower Cost

Page 34: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

34

Why Redise Flash?Serve large datasets at a much lower cost

512 GB RAM

>70%Lower Cost with RAM+Flash

Compared to all-in-RAM128GB RAM

384 GB Flash

Page 35: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

35

Redis on RAM Redise Flash

Dataset size 10 TB 10 TB

Database size with replication 30 TB 20 TB*

AWS instance type x1.32xlarge i3.16xlarge

Actual instance size (RAM, and RAM+Flash) 1.46 TB 3.66 TB

# of instances needed 21 6+1

Persistent Storage (EBS) 154 TB 110 TB

1 year cost (reserved instances) $1,595,643 $298,896

Savings - 81.27%

Cost Comparison of RAM vs Flash on AWS

* Redise handles quorum issues at the node level and needs only two copies of data for high availability

Page 36: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

36

How?

http://redislabs.com

Page 37: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

37

How?

http://redislabs.com

Page 38: April 24, 2017 - Percona · 3. Open source. The leading . in-memory database platform, supporting any high performance operational, analytics or hybrid use case. The open source home

38

Register Today!

http://redisconf.comCode: RedisHero2017