SlideShare a Scribd company logo
This is REDIS
- Feature and USECASE
About Me
 Kris jeong(정경석)
 Author a Book of REDIS
 ‘This is REDIS’ in korean

 Software development
Over 14 years.
 Web service dev.
 Messaging server dev.

 Recommendation dev.

 Interested about NoSQL
http://www.aladin.co.kr/shop/wproduct.aspx?ISBN=8968480591
What is
 REDIS is In-Memory Database

 Variety data types
 Support persistence
 Key value based NoSQL
IMDB(In-Memory DB)
Disk based data store

In-Memory data store

Query Engine

Query Engine

Speed

Storage
Manager

Memory(Cache)

Disk

Memory

Durability

Disk is optional

Disk
Redis is cache server?

Not a cache server.
But, It can be.
Turn off Persistence.
Running platform

https://github.com/MSOpenTech/redis
Install and test
$ wget http://download.redis.io/redis-stable.tar.gz
$ tar xvf redis-stable.tar.gz
$ cd redis-stable
$ make
…
…
done.
$ make test

※ CentOS 6.4 64bit
Feature
Super fast (TPS)
$ ./src/redis-benchmark --csv -d 1024
"PING_INLINE","34602.07"
"PING_BULK","35971.22"
"SET","35211.27"
"GET","31347.96"
…
"LPUSH (needed to benchmark LRANGE)","32467.53"
"LRANGE_100 (first 100 elements)","4714.76"
"LRANGE_300 (first 300 elements)","1605.91"
"LRANGE_500 (first 450 elements)","1030.93"
"LRANGE_600 (first 600 elements)","735.13"
"MSET (10 keys)","22471.91"

※ CentOS 6.4 64bit, Core i5 3337U@1.8Gz
Feature - expire
 Duration cache
 expire user:212:cart 259200

seconds

It will be expired 3 days later.

 Specified time cache
 expireat user:212:item:sward 1388534400
It will be expired 2014/01/01

Unix timestamp
Support data types
 String

key

value
{
"product": {
"id": "2951",
"name": "testing 01",
"options": {
"color": "red"
},
"quantity": 4
}

user:1:cart_info

}

※ Up to 512MB
Support data types (cont.)
 Hash

Key

field

value

name
min damage

13

max damage

20

durability

32/50

price

item:1:info

bastard sword

3500

add a new value
durability

31/50
Support data types (cont.)
 Hash

Key

field

value

name
min damage
item:1:info

bastard sword
13

max damage

20

durability

31/50
32/50

price

3500
Support data types (cont.)
 List

Key
user:1:messag
e

elements

hi~

how r you.

bye.

add a new value
Support data types (cont.)
 List

Key
user:1:messag
e

elements

hi~

how r you.

bye.
Support data types (cont.)
 Set

kris
mike
frank

user:1:friend

martin

tom

add a new value
chris
Support data types (cont.)
 Set

kris
mike
user:1:friend

frank
martin

tom
chris
Support data types (cont.)
 Sorted Set

score

Key

value

1
91

mike

200

frank

250

martin

251

user:ranking

kris

tom

add a new value
220

chris
Support data types (cont.)
 Sorted Set

Key

score

value

1
91

user:ranking

kris
mike

200

frank

220
250

chris
martin

250
251

martin
tom

251

tom
Feature – RDB(Snapshot)
Redis instance

Redis data

Data dump
to disk

Dump file
(Redis.rdb)

When snapshot event raised
Check point of Redis snapshot
 Redis data size vs Physical memory size ratio
 vm.overcommit_memory setting
 Disk I/O rate for swap
Feature – AOF(Append Only File)
Redis instance
Command
logging

Redis data

Data change command
Redis client

Check point of Redis aof
 Disk space
 Restart time is slower than RDB

appendonly.aof
Replication – Single slave
Redis cluster

Master Node

Slave Node

Replication
key1

test value

set key1 ‘test value’ key1

set key1 ‘test value’
Redis client

test value
Replication – Multiple slave
Redis cluster
Slave Node 1

Replication
Master Node

Slave Node 2

Slave Node 3

Read

Write
Redis client
Replication – Multiple slave (cont.)
Redis cluster
1st Replication
Master Node

Slave Node 1
2nd Replication

Slave Node 2

Slave Node 3

Write
Redis client

Slave Node 4

Read
Redis client
Sharding – range
● Data range based data split
User Key 1 ~ 100
User Key 1~50

User Key 51~100

Shard 1

Shard 2

Master Node

Master Node

Slave Node

Slave Node

Slave Node

Slave Node
Sharding - vertical
● Schema based data split
User info

Content

Shard 1

Shard 2

Master Node

Master Node

Slave Node

Slave Node

Slave Node

Slave Node
Sharding - consistent hashing
● Key based data split
User Key 1 ~ 100
Key % Number of Shard(Key % 2)

Shard 1

Shard 2

Master Node

Master Node

Slave Node

Slave Node

Slave Node

Slave Node
Sharding – Redis client
Shard 1

Shard N
…

Sharding Calc
Read/Write

Read/Write
Redis client

Check point of Redis Sharding
 Redis does not support server-side sharding
 Most Redis client support hash based sharding
 Re sharding issue
Useage
PV/UV Calculation 1Billion user
 Daily logged in user count
 Weekly logged in user count
 List of Logged-in account at least once of week

Most popular News list - Real time
 Top 10 of news by click count
 News list by popular by comment count

Real time gamers ranking
 Score based Top 10 ranker.

 Recent user list
Demo

More Related Content

What's hot

Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
NexThoughts Technologies
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
Eugene Fidelin
 
Redis Introduction
Redis IntroductionRedis Introduction
Redis IntroductionAlex Su
 
redis basics
redis basicsredis basics
redis basics
Manoj Kumar
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Arnab Mitra
 
深入了解Redis
深入了解Redis深入了解Redis
深入了解Redis
iammutex
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
Carlos Abalde
 
An Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAn Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL database
Ali MasudianPour
 
Your 1st Ceph cluster
Your 1st Ceph clusterYour 1st Ceph cluster
Your 1st Ceph cluster
Mirantis
 
Bluestore
BluestoreBluestore
Bluestore
Patrick McGarry
 
Ceph Performance and Sizing Guide
Ceph Performance and Sizing GuideCeph Performance and Sizing Guide
Ceph Performance and Sizing Guide
Jose De La Rosa
 
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
Ontico
 
Redis, another step on the road
Redis, another step on the roadRedis, another step on the road
Redis, another step on the road
Yi-Feng Tzeng
 
Redis database
Redis databaseRedis database
Redis database
Ñáwrás Ñzár
 
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Ontico
 
Redis acc 2015_eng
Redis acc 2015_engRedis acc 2015_eng
Redis acc 2015_eng
DaeMyung Kang
 
Setting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutesSetting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutes
Sudheer Kondla
 
Redis tutoring
Redis tutoringRedis tutoring
Redis tutoring
Chen-Tien Tsai
 
librados
libradoslibrados
librados
Patrick McGarry
 
SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)
Lars Marowsky-Brée
 

What's hot (20)

Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
 
Redis Introduction
Redis IntroductionRedis Introduction
Redis Introduction
 
redis basics
redis basicsredis basics
redis basics
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
深入了解Redis
深入了解Redis深入了解Redis
深入了解Redis
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
 
An Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL databaseAn Introduction to REDIS NoSQL database
An Introduction to REDIS NoSQL database
 
Your 1st Ceph cluster
Your 1st Ceph clusterYour 1st Ceph cluster
Your 1st Ceph cluster
 
Bluestore
BluestoreBluestore
Bluestore
 
Ceph Performance and Sizing Guide
Ceph Performance and Sizing GuideCeph Performance and Sizing Guide
Ceph Performance and Sizing Guide
 
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
 
Redis, another step on the road
Redis, another step on the roadRedis, another step on the road
Redis, another step on the road
 
Redis database
Redis databaseRedis database
Redis database
 
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
Tarantool: как сэкономить миллион долларов на базе данных на высоконагруженно...
 
Redis acc 2015_eng
Redis acc 2015_engRedis acc 2015_eng
Redis acc 2015_eng
 
Setting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutesSetting up mongodb sharded cluster in 30 minutes
Setting up mongodb sharded cluster in 30 minutes
 
Redis tutoring
Redis tutoringRedis tutoring
Redis tutoring
 
librados
libradoslibrados
librados
 
SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)
 

Similar to This is redis - feature and usecase

Cost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWSCost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWS
Amazon Web Services
 
Ceph
CephCeph
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Odinot Stanislas
 
Storage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewStorage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewAlan McSweeney
 
Intro to Apache Spark
Intro to Apache SparkIntro to Apache Spark
Intro to Apache Spark
Robert Sanders
 
Intro to Apache Spark
Intro to Apache SparkIntro to Apache Spark
Intro to Apache Spark
clairvoyantllc
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Redis Labs
 
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red_Hat_Storage
 
Day 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConfDay 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConf
Redis Labs
 
Hadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_PlanHadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_Plan
Narayana B
 
Data Replication Options in AWS
Data Replication Options in AWSData Replication Options in AWS
Data Replication Options in AWS
Irawan Soetomo
 
Redis meetup
Redis meetupRedis meetup
Redis meetup
Nikhil Dole
 
What's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsWhat's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis Labs
Redis Labs
 
In-memory database
In-memory databaseIn-memory database
In-memory database
Chien Nguyen Dang
 
Quick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage ClusterQuick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage Cluster
Patrick Quairoli
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Itamar Haber
 
quickguide-einnovator-10-redis-admin
quickguide-einnovator-10-redis-adminquickguide-einnovator-10-redis-admin
quickguide-einnovator-10-redis-adminjorgesimao71
 
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
javier ramirez
 

Similar to This is redis - feature and usecase (20)

Cost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWSCost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWS
 
Ceph
CephCeph
Ceph
 
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
 
Storage, San And Business Continuity Overview
Storage, San And Business Continuity OverviewStorage, San And Business Continuity Overview
Storage, San And Business Continuity Overview
 
Intro to Apache Spark
Intro to Apache SparkIntro to Apache Spark
Intro to Apache Spark
 
Intro to Apache Spark
Intro to Apache SparkIntro to Apache Spark
Intro to Apache Spark
 
Firebird and RAID
Firebird and RAIDFirebird and RAID
Firebird and RAID
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
 
SQL 2005 Disk IO Performance
SQL 2005 Disk IO PerformanceSQL 2005 Disk IO Performance
SQL 2005 Disk IO Performance
 
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
 
Day 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConfDay 2 General Session Presentations RedisConf
Day 2 General Session Presentations RedisConf
 
Hadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_PlanHadoop Architecture_Cluster_Cap_Plan
Hadoop Architecture_Cluster_Cap_Plan
 
Data Replication Options in AWS
Data Replication Options in AWSData Replication Options in AWS
Data Replication Options in AWS
 
Redis meetup
Redis meetupRedis meetup
Redis meetup
 
What's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsWhat's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis Labs
 
In-memory database
In-memory databaseIn-memory database
In-memory database
 
Quick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage ClusterQuick-and-Easy Deployment of a Ceph Storage Cluster
Quick-and-Easy Deployment of a Ceph Storage Cluster
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
quickguide-einnovator-10-redis-admin
quickguide-einnovator-10-redis-adminquickguide-einnovator-10-redis-admin
quickguide-einnovator-10-redis-admin
 
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
 

Recently uploaded

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 

Recently uploaded (20)

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 

This is redis - feature and usecase

  • 1. This is REDIS - Feature and USECASE
  • 2. About Me  Kris jeong(정경석)  Author a Book of REDIS  ‘This is REDIS’ in korean  Software development Over 14 years.  Web service dev.  Messaging server dev.  Recommendation dev.  Interested about NoSQL http://www.aladin.co.kr/shop/wproduct.aspx?ISBN=8968480591
  • 3. What is  REDIS is In-Memory Database  Variety data types  Support persistence  Key value based NoSQL
  • 4. IMDB(In-Memory DB) Disk based data store In-Memory data store Query Engine Query Engine Speed Storage Manager Memory(Cache) Disk Memory Durability Disk is optional Disk
  • 5. Redis is cache server? Not a cache server. But, It can be. Turn off Persistence.
  • 7. Install and test $ wget http://download.redis.io/redis-stable.tar.gz $ tar xvf redis-stable.tar.gz $ cd redis-stable $ make … … done. $ make test ※ CentOS 6.4 64bit
  • 9. Super fast (TPS) $ ./src/redis-benchmark --csv -d 1024 "PING_INLINE","34602.07" "PING_BULK","35971.22" "SET","35211.27" "GET","31347.96" … "LPUSH (needed to benchmark LRANGE)","32467.53" "LRANGE_100 (first 100 elements)","4714.76" "LRANGE_300 (first 300 elements)","1605.91" "LRANGE_500 (first 450 elements)","1030.93" "LRANGE_600 (first 600 elements)","735.13" "MSET (10 keys)","22471.91" ※ CentOS 6.4 64bit, Core i5 3337U@1.8Gz
  • 10. Feature - expire  Duration cache  expire user:212:cart 259200 seconds It will be expired 3 days later.  Specified time cache  expireat user:212:item:sward 1388534400 It will be expired 2014/01/01 Unix timestamp
  • 11. Support data types  String key value { "product": { "id": "2951", "name": "testing 01", "options": { "color": "red" }, "quantity": 4 } user:1:cart_info } ※ Up to 512MB
  • 12. Support data types (cont.)  Hash Key field value name min damage 13 max damage 20 durability 32/50 price item:1:info bastard sword 3500 add a new value durability 31/50
  • 13. Support data types (cont.)  Hash Key field value name min damage item:1:info bastard sword 13 max damage 20 durability 31/50 32/50 price 3500
  • 14. Support data types (cont.)  List Key user:1:messag e elements hi~ how r you. bye. add a new value
  • 15. Support data types (cont.)  List Key user:1:messag e elements hi~ how r you. bye.
  • 16. Support data types (cont.)  Set kris mike frank user:1:friend martin tom add a new value chris
  • 17. Support data types (cont.)  Set kris mike user:1:friend frank martin tom chris
  • 18. Support data types (cont.)  Sorted Set score Key value 1 91 mike 200 frank 250 martin 251 user:ranking kris tom add a new value 220 chris
  • 19. Support data types (cont.)  Sorted Set Key score value 1 91 user:ranking kris mike 200 frank 220 250 chris martin 250 251 martin tom 251 tom
  • 20. Feature – RDB(Snapshot) Redis instance Redis data Data dump to disk Dump file (Redis.rdb) When snapshot event raised Check point of Redis snapshot  Redis data size vs Physical memory size ratio  vm.overcommit_memory setting  Disk I/O rate for swap
  • 21. Feature – AOF(Append Only File) Redis instance Command logging Redis data Data change command Redis client Check point of Redis aof  Disk space  Restart time is slower than RDB appendonly.aof
  • 22. Replication – Single slave Redis cluster Master Node Slave Node Replication key1 test value set key1 ‘test value’ key1 set key1 ‘test value’ Redis client test value
  • 23. Replication – Multiple slave Redis cluster Slave Node 1 Replication Master Node Slave Node 2 Slave Node 3 Read Write Redis client
  • 24. Replication – Multiple slave (cont.) Redis cluster 1st Replication Master Node Slave Node 1 2nd Replication Slave Node 2 Slave Node 3 Write Redis client Slave Node 4 Read Redis client
  • 25. Sharding – range ● Data range based data split User Key 1 ~ 100 User Key 1~50 User Key 51~100 Shard 1 Shard 2 Master Node Master Node Slave Node Slave Node Slave Node Slave Node
  • 26. Sharding - vertical ● Schema based data split User info Content Shard 1 Shard 2 Master Node Master Node Slave Node Slave Node Slave Node Slave Node
  • 27. Sharding - consistent hashing ● Key based data split User Key 1 ~ 100 Key % Number of Shard(Key % 2) Shard 1 Shard 2 Master Node Master Node Slave Node Slave Node Slave Node Slave Node
  • 28. Sharding – Redis client Shard 1 Shard N … Sharding Calc Read/Write Read/Write Redis client Check point of Redis Sharding  Redis does not support server-side sharding  Most Redis client support hash based sharding  Re sharding issue
  • 29. Useage PV/UV Calculation 1Billion user  Daily logged in user count  Weekly logged in user count  List of Logged-in account at least once of week Most popular News list - Real time  Top 10 of news by click count  News list by popular by comment count Real time gamers ranking  Score based Top 10 ranker.  Recent user list
  • 30. Demo