SlideShare a Scribd company logo
1 of 34
Multi-Master Geo Distributed Redis
With Redis Enterprise (Redise)
Elad Ash
Challenge and requirements
The solution in a nutshell
Redis data types examples
Status and availability
What we’ll cover
challenge and requirements
Use Cases - multi-master multi-region REDIS
• 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 session management and
Metering Apps
- HA for session management
- Tracking Usage/Consumption
- A/B testing
Hashes/Sets/Lists/Expiry Tracking Consumption Events
• Fraud Detection
- 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
The 3 base requirements
1.Scale the same data set globally
2.Redis speed
3.No change to application
App
Scaling multi region redis challenge - Consensus?
Redis is fast: > 1,000,000 ops/sec, < 1 mSec
latency
Network east-west RTT is even slower > 70 mSec
Consensus requires clusters coordination which is
too slow for Redis
LWW by itself, can't solve Redis complex data-
type conflicts
The solution in a nutshell
Redislabs CRDB
Geo-Replicated
(Strong) Eventually Consistent
CRDTs based Redis
Conflict free Resolved DataBase | Cross Region DataBase | Cluster Replicated DataBase
Redis Replication
Been there forever...
Master -> Slave(s) model
Slave may be a master for other slaves
Constructed for High Availability (switch roles)
Redise replica-of for geo replication
DB1:
Read/Write replica
DB5:
Read replica
DB3:
Read replica
DB4:
Read replica
DB2:
Read replica
Redis Modules
● Since 4.0
● Dynamic libraries loaded to Redis
● With a C API
● Can extend Redis with:
New Capabilities
New Commands
New Data Types
10
CRDTs
Conflict Free Replicated Data Types (CRDTs)
• Years of academic research
• Based on consensus free protocol
• Strong eventual consistency
• Built to resolve conflicts with complex data
types
• Mostly transparent to users
Commutative
DAG
CmRDT
Reaching (Strong) Eventual Consistency with CRDT
1. Local ops: Reads & Writes locally
2. Async replication: Writes ops asynchronously replicated to all replicas
3. Consistency: CRDT model guarantees that the data-set would converge
to the same values, regardless of the order
Partial inconsistency - In any given time, the reads may yield different values,
but eventually (dependent on network latency) the values would converge
Simplify conflicts identifications - Maintain partial global ordering (identify
concurrent ops) = vector clocks
Vector Clocks for partial global ordering
A
B
C
{A=1,B=0,C=0}
{A=1,B=1,C=0}
{A=0}
{B=0}
{C=0}
{A=0,B=0,C=1} {A=0,B=0,C=2}
{A=1,B=2,C=0}
{A=0,B=0,C=3}
{A=1,B=3,C=3}
{A=2,B=3,C=3}
CRDB building blocks
Building block #1 - Redis Replication
Building block #2 - Redise Replica-Of for geo cluster replication
Building block #4 - Internal CRDT engine - strong eventual consistency
Building block #3 - Redis Modules
All together - CRDB: CRDT over Redise
Conflict free Resolved DataBase | Cross Region DataBase | Cluster Replicated DataBase
App
App App
CRDT
Module
CRDT
Module
CRDT
Module
1. Local read/writes
where clients use
regular redis commands
3. Bi-directional secured and
compressed async replica-of
a.k.a peer-replication
2. CRDTs implemented using
Redis Module
Demo
1. 1 geo distributed DB, replicated over 3 clusters
(replicas) on 3 regions: us-east, us-west, eu-west
2. Each Redise cluster generate load with
memtier_benchmark and a custom-built web-app.
3. To achieve Strong (without consensus protocol)
eventual consistency
● Operations are replicated between all replicas
(bi-directional and compressed)
● Use conflict free data types
<add image of the
items view>
The benefits
Support different network topology
Support different cluster topologies as
well as scaling local DB as needed
RingFully-Connected
Performance is as fast as regular local redis
and enhanced globaly by replicas count
Data types examples
Example setup
App
AppReplica A Replica B
Two replicas, working over single data sets
Each step is done concurrently and then a synchronization takes
place
Then we present the reconciled value on both replica
COUNTERS
COUNTER: Creation
App
AppReplica A Replica B
> INCRBY mykey 10
(integer) 10
> GET mykey
(nil)
Syncing
Synced
> GET mykey
“10”
> GET mykey
“10”
> GET mykey
“10”
COUNTER: Multi-Value
App
AppReplica A Replica B
> INCRBY mykey 5
(integer) 15
> INCRBY mykey 8
(integer) 18
Syncing
Synced
> GET mykey
“23”
> GET mykey
“23”
COUNTER: Add wins / Observed remove
App
AppReplica A Replica B
> DEL mykey
(integer) 1
> DECRBY mykey 3
(integer) 20
Syncing
Synced
> GET mykey
(nil)
> GET mykey
“-3”
> GET mykey
“-3”
SETs
SET: Add wins / Observed remove
App
AppReplica A Replica B
> SADD myset X
(integer) 1
Syncing
Synced
> SMEMBERS myset
1) “X”
> SMEMBERS myset
1) “X”
> SMEMBERS myset
1) “X”
> SADD myset X
(integer) 1
> SREM myset X
(integer) 1
> SMEMBERS myset
(empty list or set)
SET: Add wins / Observed remove - another example
App
AppReplica A Replica B
Syncing
Synced
> SMEMBERS myset
1) “Y”
2) “X”
> SMEMBERS myset
1) “Y”
> SMEMBERS myset
1) “Y”
> DEL myset
(integer) 0
> SMEMBERS myset
(empty list or set)
> SADD myset Y
(integer) 1
REGISTERS (STRINGS)
STRINGS: Last Write Wins
App
AppReplica A Replica B
> SET mykey “A”
OK
Syncing
Synced
> GET mykey
“A”
> GET mykey
1) “B”
> GET mykey
1) “B”
> GET mykey
“B”
> SET mykey “B”
OK
Replica B write time is later the replica A
STRING: Add wins / Observed remove
App
AppReplica A Replica B
> DEL mykey
(integer)
> SET mykey “C”
OK
Syncing
Synced
> GET mykey
(nil)
> GET mykey
“C”
> GET mykey
“C”
> GET mykey
“C”
Status and Availability
Where will it be available
Status and
Availability
Preview state
1.Strings (Registers)
2.Counters
3.Sets
4.Pub-Sub
5.Expiry
6.Hashes
Preview in the next few month
Contact pm.group@redislabs.com
To enroll
GA with next version of RePack and
Re Cloud Private and
(2017)
Questions
Thank You
Elad Ash
VP R&D
Redislabs
Mail, Twitter, Linkedin

More Related Content

What's hot

Automated CloudStack Deployment
Automated CloudStack DeploymentAutomated CloudStack Deployment
Automated CloudStack DeploymentShapeBlue
 
CNIT 123 Ch 10: Hacking Web Servers
CNIT 123 Ch 10: Hacking Web ServersCNIT 123 Ch 10: Hacking Web Servers
CNIT 123 Ch 10: Hacking Web ServersSam Bowne
 
4. Kubernetes - Application centric infrastructure kubernetes, contiv
4. Kubernetes - Application centric infrastructure  kubernetes, contiv4. Kubernetes - Application centric infrastructure  kubernetes, contiv
4. Kubernetes - Application centric infrastructure kubernetes, contivJuraj Hantak
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2InfraEngineer
 
Redis Overview
Redis OverviewRedis Overview
Redis OverviewHoang Long
 
DNS & DNSSEC
DNS & DNSSECDNS & DNSSEC
DNS & DNSSECAPNIC
 
Citrix netscaler administration guide
Citrix netscaler administration guideCitrix netscaler administration guide
Citrix netscaler administration guideKendhe Deligny
 
Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redisTanu Siwag
 
CentOS Linux Server Hardening
CentOS Linux Server HardeningCentOS Linux Server Hardening
CentOS Linux Server HardeningMyOwn Telco
 
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayAmazon Web Services Korea
 
Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...
Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...
Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...Amazon Web Services
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversBrent Salisbury
 
Get Hands-On with NGINX and QUIC+HTTP/3
Get Hands-On with NGINX and QUIC+HTTP/3Get Hands-On with NGINX and QUIC+HTTP/3
Get Hands-On with NGINX and QUIC+HTTP/3NGINX, Inc.
 
Fundamentals of AWS networking - SVC303 - Atlanta AWS Summit
Fundamentals of AWS networking - SVC303 - Atlanta AWS SummitFundamentals of AWS networking - SVC303 - Atlanta AWS Summit
Fundamentals of AWS networking - SVC303 - Atlanta AWS SummitAmazon Web Services
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentationAzhar Khuwaja
 
Design, Deployment and Management of Unified WLAN
Design, Deployment and Management of Unified WLANDesign, Deployment and Management of Unified WLAN
Design, Deployment and Management of Unified WLANCisco Canada
 
대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...
대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...
대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...Amazon Web Services Korea
 

What's hot (20)

Automated CloudStack Deployment
Automated CloudStack DeploymentAutomated CloudStack Deployment
Automated CloudStack Deployment
 
CNIT 123 Ch 10: Hacking Web Servers
CNIT 123 Ch 10: Hacking Web ServersCNIT 123 Ch 10: Hacking Web Servers
CNIT 123 Ch 10: Hacking Web Servers
 
4. Kubernetes - Application centric infrastructure kubernetes, contiv
4. Kubernetes - Application centric infrastructure  kubernetes, contiv4. Kubernetes - Application centric infrastructure  kubernetes, contiv
4. Kubernetes - Application centric infrastructure kubernetes, contiv
 
OSPF v3
OSPF v3OSPF v3
OSPF v3
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
 
Redis Overview
Redis OverviewRedis Overview
Redis Overview
 
DNS & DNSSEC
DNS & DNSSECDNS & DNSSEC
DNS & DNSSEC
 
Citrix netscaler administration guide
Citrix netscaler administration guideCitrix netscaler administration guide
Citrix netscaler administration guide
 
Switch security
Switch securitySwitch security
Switch security
 
Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
 
CentOS Linux Server Hardening
CentOS Linux Server HardeningCentOS Linux Server Hardening
CentOS Linux Server Hardening
 
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
 
Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...
Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...
Advanced VPC Design and New Capabilities for Amazon VPC (NET303) - AWS re:Inv...
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
Get Hands-On with NGINX and QUIC+HTTP/3
Get Hands-On with NGINX and QUIC+HTTP/3Get Hands-On with NGINX and QUIC+HTTP/3
Get Hands-On with NGINX and QUIC+HTTP/3
 
Fundamentals of AWS networking - SVC303 - Atlanta AWS Summit
Fundamentals of AWS networking - SVC303 - Atlanta AWS SummitFundamentals of AWS networking - SVC303 - Atlanta AWS Summit
Fundamentals of AWS networking - SVC303 - Atlanta AWS Summit
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentation
 
Design, Deployment and Management of Unified WLAN
Design, Deployment and Management of Unified WLANDesign, Deployment and Management of Unified WLAN
Design, Deployment and Management of Unified WLAN
 
대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...
대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...
대규모 인프라 환경 전환을 위한 AWS CloudEndure 실시간 클라우드 전환 기술 - 이창익:: AWS | AWS 클라우드 마이그레이...
 

Similar to CRDB - Multi-Master Geo Distributed Redis with Redis Enterprise

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRaghunath A
 
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDBAWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDBAmazon Web Services
 
Achieve big data analytic platform with lambda architecture on cloud
Achieve big data analytic platform with lambda architecture on cloudAchieve big data analytic platform with lambda architecture on cloud
Achieve big data analytic platform with lambda architecture on cloudScott Miao
 
Download It
Download ItDownload It
Download Itbutest
 
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...DataStax Academy
 
Distributed computing poli
Distributed computing poliDistributed computing poli
Distributed computing poliivascucristian
 
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
AWS Summit Seoul 2015 -  AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...AWS Summit Seoul 2015 -  AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...Amazon Web Services Korea
 
Plandas-CacheCloud
Plandas-CacheCloudPlandas-CacheCloud
Plandas-CacheCloudGyuman Cho
 
Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...Yahoo Developer Network
 
Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applicationsDing Li
 
Azure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAzure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAndre Essing
 
Design Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionDesign Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionVMware Tanzu
 
Stratosphere with big_data_analytics
Stratosphere with big_data_analyticsStratosphere with big_data_analytics
Stratosphere with big_data_analyticsAvinash Pandu
 
Rishikesh Sharma Portfolio
Rishikesh Sharma PortfolioRishikesh Sharma Portfolio
Rishikesh Sharma Portfoliosharmarishikesh
 
Embarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsEmbarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsDilum Bandara
 
How to Monitor Application Performance in a Container-Based World
How to Monitor Application Performance in a Container-Based WorldHow to Monitor Application Performance in a Container-Based World
How to Monitor Application Performance in a Container-Based WorldKen Owens
 
Monitoring as Software Validation
Monitoring as Software ValidationMonitoring as Software Validation
Monitoring as Software ValidationBioDec
 

Similar to CRDB - Multi-Master Geo Distributed Redis with Redis Enterprise (20)

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDBAWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
AWS Webcast - Build Mobile Apps with a Secure, Scalable Back End on DynamoDB
 
Achieve big data analytic platform with lambda architecture on cloud
Achieve big data analytic platform with lambda architecture on cloudAchieve big data analytic platform with lambda architecture on cloud
Achieve big data analytic platform with lambda architecture on cloud
 
Download It
Download ItDownload It
Download It
 
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
 
Bigdata meetup dwarak_realtime_score_app
Bigdata meetup dwarak_realtime_score_appBigdata meetup dwarak_realtime_score_app
Bigdata meetup dwarak_realtime_score_app
 
Distributed computing poli
Distributed computing poliDistributed computing poli
Distributed computing poli
 
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
AWS Summit Seoul 2015 -  AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...AWS Summit Seoul 2015 -  AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
 
Plandas-CacheCloud
Plandas-CacheCloudPlandas-CacheCloud
Plandas-CacheCloud
 
Presentation
PresentationPresentation
Presentation
 
NoSQL and ACID
NoSQL and ACIDNoSQL and ACID
NoSQL and ACID
 
Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...Apache Hadoop India Summit 2011 talk  "Making Hadoop Enterprise Ready with Am...
Apache Hadoop India Summit 2011 talk "Making Hadoop Enterprise Ready with Am...
 
Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applications
 
Azure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAzure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep Dive
 
Design Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN DistributionDesign Patterns Facilitated by Geode's WAN Distribution
Design Patterns Facilitated by Geode's WAN Distribution
 
Stratosphere with big_data_analytics
Stratosphere with big_data_analyticsStratosphere with big_data_analytics
Stratosphere with big_data_analytics
 
Rishikesh Sharma Portfolio
Rishikesh Sharma PortfolioRishikesh Sharma Portfolio
Rishikesh Sharma Portfolio
 
Embarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel ProblemsEmbarrassingly/Delightfully Parallel Problems
Embarrassingly/Delightfully Parallel Problems
 
How to Monitor Application Performance in a Container-Based World
How to Monitor Application Performance in a Container-Based WorldHow to Monitor Application Performance in a Container-Based World
How to Monitor Application Performance in a Container-Based World
 
Monitoring as Software Validation
Monitoring as Software ValidationMonitoring as Software Validation
Monitoring as Software Validation
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

CRDB - Multi-Master Geo Distributed Redis with Redis Enterprise

  • 1. Multi-Master Geo Distributed Redis With Redis Enterprise (Redise) Elad Ash
  • 2. Challenge and requirements The solution in a nutshell Redis data types examples Status and availability What we’ll cover
  • 4. Use Cases - multi-master multi-region REDIS • 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 session management and Metering Apps - HA for session management - Tracking Usage/Consumption - A/B testing Hashes/Sets/Lists/Expiry Tracking Consumption Events • Fraud Detection - 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
  • 5. The 3 base requirements 1.Scale the same data set globally 2.Redis speed 3.No change to application
  • 6. App Scaling multi region redis challenge - Consensus? Redis is fast: > 1,000,000 ops/sec, < 1 mSec latency Network east-west RTT is even slower > 70 mSec Consensus requires clusters coordination which is too slow for Redis LWW by itself, can't solve Redis complex data- type conflicts
  • 7. The solution in a nutshell Redislabs CRDB Geo-Replicated (Strong) Eventually Consistent CRDTs based Redis Conflict free Resolved DataBase | Cross Region DataBase | Cluster Replicated DataBase
  • 8. Redis Replication Been there forever... Master -> Slave(s) model Slave may be a master for other slaves Constructed for High Availability (switch roles)
  • 9. Redise replica-of for geo replication DB1: Read/Write replica DB5: Read replica DB3: Read replica DB4: Read replica DB2: Read replica
  • 10. Redis Modules ● Since 4.0 ● Dynamic libraries loaded to Redis ● With a C API ● Can extend Redis with: New Capabilities New Commands New Data Types 10
  • 11. CRDTs Conflict Free Replicated Data Types (CRDTs) • Years of academic research • Based on consensus free protocol • Strong eventual consistency • Built to resolve conflicts with complex data types • Mostly transparent to users Commutative DAG CmRDT
  • 12. Reaching (Strong) Eventual Consistency with CRDT 1. Local ops: Reads & Writes locally 2. Async replication: Writes ops asynchronously replicated to all replicas 3. Consistency: CRDT model guarantees that the data-set would converge to the same values, regardless of the order Partial inconsistency - In any given time, the reads may yield different values, but eventually (dependent on network latency) the values would converge Simplify conflicts identifications - Maintain partial global ordering (identify concurrent ops) = vector clocks
  • 13. Vector Clocks for partial global ordering A B C {A=1,B=0,C=0} {A=1,B=1,C=0} {A=0} {B=0} {C=0} {A=0,B=0,C=1} {A=0,B=0,C=2} {A=1,B=2,C=0} {A=0,B=0,C=3} {A=1,B=3,C=3} {A=2,B=3,C=3}
  • 14. CRDB building blocks Building block #1 - Redis Replication Building block #2 - Redise Replica-Of for geo cluster replication Building block #4 - Internal CRDT engine - strong eventual consistency Building block #3 - Redis Modules
  • 15. All together - CRDB: CRDT over Redise Conflict free Resolved DataBase | Cross Region DataBase | Cluster Replicated DataBase App App App CRDT Module CRDT Module CRDT Module 1. Local read/writes where clients use regular redis commands 3. Bi-directional secured and compressed async replica-of a.k.a peer-replication 2. CRDTs implemented using Redis Module
  • 16. Demo 1. 1 geo distributed DB, replicated over 3 clusters (replicas) on 3 regions: us-east, us-west, eu-west 2. Each Redise cluster generate load with memtier_benchmark and a custom-built web-app. 3. To achieve Strong (without consensus protocol) eventual consistency ● Operations are replicated between all replicas (bi-directional and compressed) ● Use conflict free data types <add image of the items view>
  • 17. The benefits Support different network topology Support different cluster topologies as well as scaling local DB as needed RingFully-Connected Performance is as fast as regular local redis and enhanced globaly by replicas count
  • 19. Example setup App AppReplica A Replica B Two replicas, working over single data sets Each step is done concurrently and then a synchronization takes place Then we present the reconciled value on both replica
  • 21. COUNTER: Creation App AppReplica A Replica B > INCRBY mykey 10 (integer) 10 > GET mykey (nil) Syncing Synced > GET mykey “10” > GET mykey “10” > GET mykey “10”
  • 22. COUNTER: Multi-Value App AppReplica A Replica B > INCRBY mykey 5 (integer) 15 > INCRBY mykey 8 (integer) 18 Syncing Synced > GET mykey “23” > GET mykey “23”
  • 23. COUNTER: Add wins / Observed remove App AppReplica A Replica B > DEL mykey (integer) 1 > DECRBY mykey 3 (integer) 20 Syncing Synced > GET mykey (nil) > GET mykey “-3” > GET mykey “-3”
  • 24. SETs
  • 25. SET: Add wins / Observed remove App AppReplica A Replica B > SADD myset X (integer) 1 Syncing Synced > SMEMBERS myset 1) “X” > SMEMBERS myset 1) “X” > SMEMBERS myset 1) “X” > SADD myset X (integer) 1 > SREM myset X (integer) 1 > SMEMBERS myset (empty list or set)
  • 26. SET: Add wins / Observed remove - another example App AppReplica A Replica B Syncing Synced > SMEMBERS myset 1) “Y” 2) “X” > SMEMBERS myset 1) “Y” > SMEMBERS myset 1) “Y” > DEL myset (integer) 0 > SMEMBERS myset (empty list or set) > SADD myset Y (integer) 1
  • 28. STRINGS: Last Write Wins App AppReplica A Replica B > SET mykey “A” OK Syncing Synced > GET mykey “A” > GET mykey 1) “B” > GET mykey 1) “B” > GET mykey “B” > SET mykey “B” OK Replica B write time is later the replica A
  • 29. STRING: Add wins / Observed remove App AppReplica A Replica B > DEL mykey (integer) > SET mykey “C” OK Syncing Synced > GET mykey (nil) > GET mykey “C” > GET mykey “C” > GET mykey “C”
  • 31. Where will it be available
  • 32. Status and Availability Preview state 1.Strings (Registers) 2.Counters 3.Sets 4.Pub-Sub 5.Expiry 6.Hashes Preview in the next few month Contact pm.group@redislabs.com To enroll GA with next version of RePack and Re Cloud Private and (2017)
  • 34. Thank You Elad Ash VP R&D Redislabs Mail, Twitter, Linkedin

Editor's Notes

  1. I’m Elad and I’m the VP of R&D for redislabs over the last couple of years. What I’ll attempt in the following 45 min is to give you an overview on the concept of multi-master geo distributed redis solution we have. Redis is fast, we all know that, but when you add traffic over network, we all know that we add the network latency. Our customers are not looking just to scale a DB over Geo Regons, they want it to be Redis Fast. In the session today, I’ll speak about the ability to scale redis over multiple geographical regions in multi-master manner: meaning enjoying local latency and performance while scaling data-set globaly.
  2. Anyof you need redis to scale across geo regions
  3. Not just scaling a DB over Geo Regions. Keep speed when scaling
  4. needs to scale globally. Avoid latency ⇒ distribute DB on multiple regions Converge data (conflict resolutions and consistency)
  5. It is important to emphasis that the work is done on the same keys. Though the types might change, it shouldn’t effect the client side
  6. Redis is fast, but we need to keep it as fast when scaling it geographically
  7. The basic of the solution is a bi-derctional compressed replication of
  8. I assume all are familiar with this. Replication is LOCAL. Elaborat that the HA is so that the master and slaves can switch roles between them on a situation of failover As for replication can be read write, if I mention it, we need to explain the problems with full sync where we’ll either loose consistency with master or loose what the master written
  9. This is already global Replica-Of feature. Encapsulated databases. Wan Optimization. Can support different cluster topologies
  10. This is used for running CRDTs, which also shows the strength of the modules as a solution. No change on the users application
  11. By show of hands, how many are familiar with CRDT concept? Semilattice idempotent (f(f(x)) = f(x) Commutative axb = bxa associative (ax(bxc) = (axb)xc), Explain what we mean by mostly, For example If you use list as a stack, you can’t promise that you concurrently in the same replica, the same element can’t pop more then once, to implement it we need a kind of cross region semaphores. Expiry (the concept of expiry win)
  12. Eventual Consistency => Local reads and writes, NO SYNC. Redis Replication is similar Different copies of dataset - CONVERGE EVENTUALLY.
  13. Track CAUSE and EFFECT Casual = meaning that there is some order, one operation was done after or before another. Effect with vector clocks, enables this causality, it means that all entries of of one replica is >= another replica, and at least one is different. If not, we can know that the operations are concurrent. When we identify concurrent operation we handle them differently to achieve consistency: Registers = LWW | Add wins | Expiry wins |
  14. Explain that the replication is based on proven replica-of mechanism which is used in Redis enterprise for a long time. Speak about the demo structure a bit. Add direct contact to the redis itself and send some commands to the DB and show them on the other one such as: Sets - Strings - Counters - PubSub -
  15. I won’t get into the details of how we acheive the actual implementation, I will keep it from a user’s point of view.
  16. Note that types changes are not supported at the moment, so a counter needs to be set only with incrby, in the future we’ll enable some modifications for that
  17. Took both of the incrementations into account Multi value as the counter is saved with entry per replica.
  18. The deletion will be done for the values it was aware of only.
  19. The add wins concept won and created that at the end the X value added on replica A will win
  20. The deletes worked only on what was viewed by on the time of delete, so X was removed, while Y wasn’t as it was not observed on the time of the removal
  21. Since the writes were done concurrently, the last write time wins and the value is “B”
  22. The key is set to C though the delete took place the change wasn’t oserved by the deleting replica and it wasn’t deleted.
  23. State that whoever would like to get a preview version, can contact our VP Product - Cihan