SlideShare a Scribd company logo
1 of 59
Apache Geode Summit 2019
Breaking Open Apache Geode - Dan Smith, Pivotal
Dan
Da
What is Geode?
What is Geode?
● Distributed key-value store Client
Put (key, value)
Server
Server
Server
● Distributed key-value store
● Highly available
What is Geode?
Client
Put (key, value)
Server
Server
Server
● Distributed key-value store
● Highly available
● Low Latency
What is Geode?
Client
Put (key, value)
Server
Server
< 1ms
Whoah!
● Distributed key-value store
● Highly available
● Low Latency
● Consistent and Partition Tolerant
What is Geode
Client
Put (key, value)
Server
Server
Oh, no! A network partition!
● Two types of regions
What is Geode
Client
Put (A)
Replicated
Server A
Server
Server
A
A
A
● Two types of regions
What is Geode
Client
Put (A)
Replicated
Server A
Server
Server
A
A
A
Partitioned
Server A
Server
Server
B
A
What is Geode
● Keys and Values are Objects (Java, C++, C#, JSON)
● Has
○ Secondary Indexes & Querying
○ Continuous Queries
○ Transactions
○ Persistence
○ WAN replication
○ Event delivery
○ Parallel functions
○ ...
Components
1
1
Membership
Distributed Locks Replicated Regions
Partitioned Regions
Function Execution
Serialization Messaging Persistence
Indexes
Querying
WAN ReplicationStatistics
Components
1
2
Membership
Distributed Locks Replicated Regions
Partitioned Regions
Function Execution
Serialization Messaging Persistence
Indexes
Querying
WAN ReplicationStatistics
Partitioned Regions
Components
1
3
Membership
Distributed Locks Replicated Regions
Partitioned Regions
Function Execution
Serialization Messaging Persistence
Indexes
Querying
WAN ReplicationStatisticsPartitioned Regions
- Partitioning & Routing
- High Availability
- Consistency
- Recovery and Rebalancing
● A partitioned regions is divided into buckets
Partitioned Regions
Put (“Marie
Tharp”, value)
Bucket 0
Bucket 1
Bucket 2
Bucket 3
Bucket N
hash = “Marie Tharp”.hashCode()
bucket = hash % num_buckets
Server 2
Server 1
Server 3
● Buckets are mapped to servers
Partitioned Regions
Put (“Marie
Tharp”, value)
Bucket 0
Bucket 3
Bucket N
Bucket 1
Bucket 2
hash = “Marie Tharp”.hashCode()
bucket = hash % num_buckets
The End
What about?
● How does data get to a bucket?
● How does geode handle failures?
● How does geode ensure data is consistent?
● How are lost bucket copies replaced?
● How do we improve data distribution?
Placing Buckets
● How does data get to a bucket?
● How does geode handle failures?
● How does geode ensure data is consistent?
● How are lost bucket copies replaced?
● How do we improve data distribution?
Be Lazy
Server 2
Server 1
Client
Partitioned Regions - Lazy Creation
Put
(key, value)
Hash
Function
Put in
Bucket 2
Routing
Table
(empty)
Server 3 Proxy
Server 2
Server 1
Client
Partitioned Regions - Lazy Creation
Put
(key, value)
Hash
Function
Routing
Table
(empty)
Server 3
Bucket 2
key=value
Proxy
Create Bucket!
Server 2
Server 1
Client
Partitioned Regions - Lazy Discovery
Routing
Table
(empty)
Server 3
Bucket 2
key=value
Proxy
Reply -
Bucket
Metadata
Changed!
Server 2
Server 1
Client
Partitioned Regions - Lazy Discovery
Routing
Table
Server 3
Bucket 2
key=value
Proxy
Get Bucket
Locations
Server 2
Server 1
Client
Partitioned Regions - Lazy Discovery
Put
(key, value)
Hash
Function
Put in
Bucket
Bucket 2
key=value
Routing
Table
Bucket 2
Server 3
High Availability
● How does data get to a bucket?
● How does geode handle failures?
● How does geode ensure data is consistent?
● How are lost bucket copies replaced?
● How do we improve data distribution?
Duplicate
Work
Server 2
Server 1
Client
Partitioned Regions - High Availability
Put
(key, value)
Hash
Function
Put in
Bucket
Routing
Table
Bucket 2
Server 3
Bucket 2
key=value
Server 2
Server 1
Client
Partitioned Regions - High Availability
Put
(key, value)
Hash
Function
Put in
Bucket
Routing
Table
Bucket 2
Server 3
Bucket 2
key=value
Bucket 2
key=value
Server 2
Server 1
Client
Partitioned Regions - Failover
Put
(key, value)
Hash
Function
Put in
Bucket
Bucket 2
key=value
Routing
Table
Bucket 2
Server 3
Bucket 2
key=value
Consistency
● How does data get to a bucket?
● How does geode handle failures?
● How does geode ensure data is consistent?
● How are lost bucket copies replaced?
● How do we add/remove servers?
Server 2
Server 1
Client 1
Consistency - Ships Passing in the Night
Put (key, value1)
Bucket 2
key=value1
Server 3
Client 2
Put (key, value2)
Bucket 2
key=value2
Server 2
Server 1
Client 1
Consistency - Ships Passing in the Night
Put (key, value1)
Bucket 2
key=value2
Server 3
Client 2
Put (key, value2)
Bucket 2
key=value1
Consistency
● How does data get to a bucket?
● How does geode handle failures?
● How does geode ensure data is consistent?
● How are lost bucket copies replaced?
● How do we improve data distribution?
Wait in Line
Server 2
Server 1
Client 1
Consistency - Ships Passing in the Night
Put (key, value1)
Bucket 2
key=value2
Server 3
Client 2
Put (key, value2)
Bucket 2
key=value1
Server 2
Server 1
Client 1
Consistency
Put (key, value1)
Bucket 2
key=value2
Server 3
Client 2
Put (key, value2)
Bucket 2
key=value2
Operations on key
Serialized on primary
Server 2
Server 1
Client
Consistency - Lingering Operations
Put
(key, value)
Hash
Function
Put in
Bucket
Bucket 2
key=value
Routing
Table
Bucket 2
Server 3
Bucket 2
key=value
Server 2
Client
Consistency - Lingering Operations
Server 3
Bucket 2
key=value
Old, lingering event
(key, value, Event ID)Put
(key, value1) Hash
Function
Routing
Table
Bucket 2
Event
Tracker
(key, value, Event ID)
Server 2
Server 1
Client 1
Consistency - Network Partitions
Put (key, value1)
Bucket 2
key=value2
Client 2
Bucket 2
key=value2
Server 2
Server 1
Client 1
Consistency - Network Partitions
Put (key, value1)
Bucket 2
key=value2
Client 2
Bucket 2
key=value2
Server 2
Server 1
Client 1
Consistency - Network Partitions
Put (key, value1)
Bucket 2
key=value1
Client 2
Put (key, value2)
Bucket 2
key=value2
Give Up
Server 2
Server 1
Client 1
Consistency - Network Partitions
Put (key, value1)
Bucket 2
key=value2
Client 2
Put (key, value2)
Bucket 2
key=value2
● How does data get to a bucket?
● How does geode handle failures?
● How does geode ensure data is consistent?
● How are lost bucket copies replaced?
● How do we improve data distribution?
Restoring Redundancy
Tell Others
What to Do
Partitioned Regions - Redundancy Recovery
Start
Server 4Server 2
Bucket 2
Redundancy
Provider
Redundancy
Provider
Server 3
Redundancy
Provider
Start
Start
Partitioned Regions - Redundancy Recovery
Server 4Server 2
Bucket 2
Redundancy
Provider
Redundancy
Provider
Server 3
Redundancy
Provider
Got a lock!
Partitioned Regions - Redundancy Recovery
Server 4Server 2
Bucket 2
Redundancy
Provider
Redundancy
Provider
Server 3
Redundancy
Provider
Bucket 2
Make a copy!
Copy Bucket
Partitioned Regions - Redundancy Recovery
Server 4Server 2
Bucket 2
Redundancy
Provider
Redundancy
Provider
Server 3
Redundancy
Provider
Nothing to Do
Bucket 2
Partitioned Regions - Redundancy Recovery
Nothing to Do
Server 4Server 2
Bucket 2
Redundancy
Provider
Redundancy
Provider
Server 3
Redundancy
Provider
Bucket 2
Rebalancing
● How does data get to a bucket?
● How does geode handle failures?
● How does geode ensure data is consistent?
● How are lost bucket copies replaced?
● How do improve data distribution?
Be Greedy
(Optimizer)
Rebalancing - What are we optimizing
● Cost based optimizer
● Minimizes the variance in
bytes stored on each member
● Greedy algorithm
○ Maximize the
improvement in variance
per byte moved
Bucket 1
Bucket 3
Bucket 2Server 1
Bucket 1
Bucket 3
Bucket 2
Variance: 1600 Server 2
Server 3
60
0
0
Server 3
Server 1
Server 2
Rebalancing - What are we optimizing
● Cost based optimizer
● Minimizes the variance in
bytes stored on each member
● Greedy algorithm
○ Maximize the
improvement in variance
per byte moved
Bucket 1
Bucket 3
Bucket 2
Variance: 1050
45
15
0
Server 3
Server 1
Server 2
Rebalancing - What are we optimizing
● Cost based optimizer
● Minimizes the variance in
bytes stored on each member
● Greedy algorithm
○ Maximize the
improvement in variance
per byte moved
Bucket 1
Bucket 3
Bucket 2
Variance: 150
30
15
15
Rebalancing - what does it do?
Three Phases
1. Restore Redundancy
2. Optimize bucket distribution
3. Optimize primary distribution
Membership changes start from phase 1 again.
Putting it Together
● Start with the simple idea: Hashing
● Using - Laziness, Duplication, Bossyness and Greed
● Get
○ High Availability
○ Low Latency
○ Consistency
Links
● Mailing List: dev-subscribe@geode.apache.org
● Internal Architecture: https://cwiki.apache.org/confluence/x/AolXAw
Q & A
59

More Related Content

What's hot

MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMark Swarbrick
 
Cassandra 2012
Cassandra 2012Cassandra 2012
Cassandra 2012beobal
 
Replication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDReplication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDMydbops
 
Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copyNETWAYS
 
OSMC 2014: Current state of Icinga | Icinga Team
OSMC 2014: Current state of Icinga | Icinga TeamOSMC 2014: Current state of Icinga | Icinga Team
OSMC 2014: Current state of Icinga | Icinga TeamNETWAYS
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache CassandraLuke Tillman
 
NANOG 74: That KSK Roll
NANOG 74: That KSK RollNANOG 74: That KSK Roll
NANOG 74: That KSK RollAPNIC
 
Logs @ OVHcloud
Logs @ OVHcloudLogs @ OVHcloud
Logs @ OVHcloudOVHcloud
 
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and OrchestratorAlmost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and OrchestratorJean-François Gagné
 
Dynomite at Erlang Factory
Dynomite at Erlang FactoryDynomite at Erlang Factory
Dynomite at Erlang Factorymoonpolysoft
 
Handle Large Messages In Apache Kafka
Handle Large Messages In Apache KafkaHandle Large Messages In Apache Kafka
Handle Large Messages In Apache KafkaJiangjie Qin
 
Consumer offset management in Kafka
Consumer offset management in KafkaConsumer offset management in Kafka
Consumer offset management in KafkaJoel Koshy
 
Voldemort : Prototype to Production
Voldemort : Prototype to ProductionVoldemort : Prototype to Production
Voldemort : Prototype to ProductionVinoth Chandar
 

What's hot (14)

MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
 
Cassandra 2012
Cassandra 2012Cassandra 2012
Cassandra 2012
 
Replication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDReplication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTID
 
Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copy
 
MySQL 5.6 GTID in a nutshell
MySQL 5.6 GTID in a nutshellMySQL 5.6 GTID in a nutshell
MySQL 5.6 GTID in a nutshell
 
OSMC 2014: Current state of Icinga | Icinga Team
OSMC 2014: Current state of Icinga | Icinga TeamOSMC 2014: Current state of Icinga | Icinga Team
OSMC 2014: Current state of Icinga | Icinga Team
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
 
NANOG 74: That KSK Roll
NANOG 74: That KSK RollNANOG 74: That KSK Roll
NANOG 74: That KSK Roll
 
Logs @ OVHcloud
Logs @ OVHcloudLogs @ OVHcloud
Logs @ OVHcloud
 
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and OrchestratorAlmost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
Almost Perfect Service Discovery and Failover with ProxySQL and Orchestrator
 
Dynomite at Erlang Factory
Dynomite at Erlang FactoryDynomite at Erlang Factory
Dynomite at Erlang Factory
 
Handle Large Messages In Apache Kafka
Handle Large Messages In Apache KafkaHandle Large Messages In Apache Kafka
Handle Large Messages In Apache Kafka
 
Consumer offset management in Kafka
Consumer offset management in KafkaConsumer offset management in Kafka
Consumer offset management in Kafka
 
Voldemort : Prototype to Production
Voldemort : Prototype to ProductionVoldemort : Prototype to Production
Voldemort : Prototype to Production
 

Similar to Breaking Open Apache Geode: How It Works and Why

Skew Mitigation For Facebook PetabyteScale Joins
Skew Mitigation For Facebook PetabyteScale JoinsSkew Mitigation For Facebook PetabyteScale Joins
Skew Mitigation For Facebook PetabyteScale JoinsDatabricks
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environmentHBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environmentHBaseCon
 
Scaling a Game Server: From 500 to 100,000 Users
Scaling a Game Server: From 500 to 100,000 UsersScaling a Game Server: From 500 to 100,000 Users
Scaling a Game Server: From 500 to 100,000 UsersGeekNightHyderabad
 
Cacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccCacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccsrisatish ambati
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDBPingCAP
 
Scala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache sparkScala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache sparkDemi Ben-Ari
 
Apache Tez – Present and Future
Apache Tez – Present and FutureApache Tez – Present and Future
Apache Tez – Present and FutureDataWorks Summit
 
Bringing code to the data: from MySQL to RocksDB for high volume searches
Bringing code to the data: from MySQL to RocksDB for high volume searchesBringing code to the data: from MySQL to RocksDB for high volume searches
Bringing code to the data: from MySQL to RocksDB for high volume searchesIvan Kruglov
 
An Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformAn Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformMongoDB
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Mayank Shrivastava
 
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...Martin Zapletal
 
Raft Engine Meetup 220702.pdf
Raft Engine Meetup 220702.pdfRaft Engine Meetup 220702.pdf
Raft Engine Meetup 220702.pdffengxun
 
InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...
InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...
InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...InfluxData
 
Scaling NServiceBus NSBCon NY by Jimmy Bogard
Scaling NServiceBus NSBCon NY by Jimmy BogardScaling NServiceBus NSBCon NY by Jimmy Bogard
Scaling NServiceBus NSBCon NY by Jimmy BogardParticular Software
 
Akka-demy (a.k.a. How to build stateful distributed systems) I/II
 Akka-demy (a.k.a. How to build stateful distributed systems) I/II Akka-demy (a.k.a. How to build stateful distributed systems) I/II
Akka-demy (a.k.a. How to build stateful distributed systems) I/IIPeter Csala
 
Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집
Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집
Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집AWSKRUG - AWS한국사용자모임
 
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBasehbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBaseMichael Stack
 

Similar to Breaking Open Apache Geode: How It Works and Why (20)

Skew Mitigation For Facebook PetabyteScale Joins
Skew Mitigation For Facebook PetabyteScale JoinsSkew Mitigation For Facebook PetabyteScale Joins
Skew Mitigation For Facebook PetabyteScale Joins
 
HBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environmentHBaseCon2017 Improving HBase availability in a multi tenant environment
HBaseCon2017 Improving HBase availability in a multi tenant environment
 
Scaling a Game Server: From 500 to 100,000 Users
Scaling a Game Server: From 500 to 100,000 UsersScaling a Game Server: From 500 to 100,000 Users
Scaling a Game Server: From 500 to 100,000 Users
 
Cacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccCacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svcc
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDB
 
Scala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache sparkScala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache spark
 
Apache Tez – Present and Future
Apache Tez – Present and FutureApache Tez – Present and Future
Apache Tez – Present and Future
 
Bringing code to the data: from MySQL to RocksDB for high volume searches
Bringing code to the data: from MySQL to RocksDB for high volume searchesBringing code to the data: from MySQL to RocksDB for high volume searches
Bringing code to the data: from MySQL to RocksDB for high volume searches
 
ENAR short course
ENAR short courseENAR short course
ENAR short course
 
An Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media PlatformAn Elastic Metadata Store for eBay’s Media Platform
An Elastic Metadata Store for eBay’s Media Platform
 
Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020Apache Pinot Meetup Sept02, 2020
Apache Pinot Meetup Sept02, 2020
 
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...
 
Raft Engine Meetup 220702.pdf
Raft Engine Meetup 220702.pdfRaft Engine Meetup 220702.pdf
Raft Engine Meetup 220702.pdf
 
Enar short course
Enar short courseEnar short course
Enar short course
 
InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...
InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...
InfluxDB IOx Tech Talks: Intro to the InfluxDB IOx Read Buffer - A Read-Optim...
 
Scaling NServiceBus NSBCon NY by Jimmy Bogard
Scaling NServiceBus NSBCon NY by Jimmy BogardScaling NServiceBus NSBCon NY by Jimmy Bogard
Scaling NServiceBus NSBCon NY by Jimmy Bogard
 
Akka-demy (a.k.a. How to build stateful distributed systems) I/II
 Akka-demy (a.k.a. How to build stateful distributed systems) I/II Akka-demy (a.k.a. How to build stateful distributed systems) I/II
Akka-demy (a.k.a. How to build stateful distributed systems) I/II
 
Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집
Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집
Aurora Serverless, 서버리스 RDB의 서막 - 트랙2, Community Day 2018 re:Invent 특집
 
DynamodbDB Deep Dive
DynamodbDB Deep DiveDynamodbDB Deep Dive
DynamodbDB Deep Dive
 
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBasehbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
 

More from VMware Tanzu

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItVMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleVMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductVMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready AppsVMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptxVMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchVMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishVMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - FrenchVMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootVMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerVMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeVMware Tanzu
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsVMware Tanzu
 

More from VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Recently uploaded

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 

Recently uploaded (20)

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 

Breaking Open Apache Geode: How It Works and Why

  • 1. Apache Geode Summit 2019 Breaking Open Apache Geode - Dan Smith, Pivotal Dan Da
  • 2.
  • 4. What is Geode? ● Distributed key-value store Client Put (key, value) Server Server Server
  • 5. ● Distributed key-value store ● Highly available What is Geode? Client Put (key, value) Server Server Server
  • 6. ● Distributed key-value store ● Highly available ● Low Latency What is Geode? Client Put (key, value) Server Server < 1ms Whoah!
  • 7. ● Distributed key-value store ● Highly available ● Low Latency ● Consistent and Partition Tolerant What is Geode Client Put (key, value) Server Server Oh, no! A network partition!
  • 8. ● Two types of regions What is Geode Client Put (A) Replicated Server A Server Server A A A
  • 9. ● Two types of regions What is Geode Client Put (A) Replicated Server A Server Server A A A Partitioned Server A Server Server B A
  • 10. What is Geode ● Keys and Values are Objects (Java, C++, C#, JSON) ● Has ○ Secondary Indexes & Querying ○ Continuous Queries ○ Transactions ○ Persistence ○ WAN replication ○ Event delivery ○ Parallel functions ○ ...
  • 11. Components 1 1 Membership Distributed Locks Replicated Regions Partitioned Regions Function Execution Serialization Messaging Persistence Indexes Querying WAN ReplicationStatistics
  • 12. Components 1 2 Membership Distributed Locks Replicated Regions Partitioned Regions Function Execution Serialization Messaging Persistence Indexes Querying WAN ReplicationStatistics Partitioned Regions
  • 13. Components 1 3 Membership Distributed Locks Replicated Regions Partitioned Regions Function Execution Serialization Messaging Persistence Indexes Querying WAN ReplicationStatisticsPartitioned Regions - Partitioning & Routing - High Availability - Consistency - Recovery and Rebalancing
  • 14. ● A partitioned regions is divided into buckets Partitioned Regions Put (“Marie Tharp”, value) Bucket 0 Bucket 1 Bucket 2 Bucket 3 Bucket N hash = “Marie Tharp”.hashCode() bucket = hash % num_buckets
  • 15. Server 2 Server 1 Server 3 ● Buckets are mapped to servers Partitioned Regions Put (“Marie Tharp”, value) Bucket 0 Bucket 3 Bucket N Bucket 1 Bucket 2 hash = “Marie Tharp”.hashCode() bucket = hash % num_buckets
  • 17. What about? ● How does data get to a bucket? ● How does geode handle failures? ● How does geode ensure data is consistent? ● How are lost bucket copies replaced? ● How do we improve data distribution?
  • 18. Placing Buckets ● How does data get to a bucket? ● How does geode handle failures? ● How does geode ensure data is consistent? ● How are lost bucket copies replaced? ● How do we improve data distribution?
  • 20. Server 2 Server 1 Client Partitioned Regions - Lazy Creation Put (key, value) Hash Function Put in Bucket 2 Routing Table (empty) Server 3 Proxy
  • 21. Server 2 Server 1 Client Partitioned Regions - Lazy Creation Put (key, value) Hash Function Routing Table (empty) Server 3 Bucket 2 key=value Proxy Create Bucket!
  • 22. Server 2 Server 1 Client Partitioned Regions - Lazy Discovery Routing Table (empty) Server 3 Bucket 2 key=value Proxy Reply - Bucket Metadata Changed!
  • 23. Server 2 Server 1 Client Partitioned Regions - Lazy Discovery Routing Table Server 3 Bucket 2 key=value Proxy Get Bucket Locations
  • 24. Server 2 Server 1 Client Partitioned Regions - Lazy Discovery Put (key, value) Hash Function Put in Bucket Bucket 2 key=value Routing Table Bucket 2 Server 3
  • 25. High Availability ● How does data get to a bucket? ● How does geode handle failures? ● How does geode ensure data is consistent? ● How are lost bucket copies replaced? ● How do we improve data distribution?
  • 27. Server 2 Server 1 Client Partitioned Regions - High Availability Put (key, value) Hash Function Put in Bucket Routing Table Bucket 2 Server 3 Bucket 2 key=value
  • 28. Server 2 Server 1 Client Partitioned Regions - High Availability Put (key, value) Hash Function Put in Bucket Routing Table Bucket 2 Server 3 Bucket 2 key=value Bucket 2 key=value
  • 29. Server 2 Server 1 Client Partitioned Regions - Failover Put (key, value) Hash Function Put in Bucket Bucket 2 key=value Routing Table Bucket 2 Server 3 Bucket 2 key=value
  • 30. Consistency ● How does data get to a bucket? ● How does geode handle failures? ● How does geode ensure data is consistent? ● How are lost bucket copies replaced? ● How do we add/remove servers?
  • 31. Server 2 Server 1 Client 1 Consistency - Ships Passing in the Night Put (key, value1) Bucket 2 key=value1 Server 3 Client 2 Put (key, value2) Bucket 2 key=value2
  • 32. Server 2 Server 1 Client 1 Consistency - Ships Passing in the Night Put (key, value1) Bucket 2 key=value2 Server 3 Client 2 Put (key, value2) Bucket 2 key=value1
  • 33. Consistency ● How does data get to a bucket? ● How does geode handle failures? ● How does geode ensure data is consistent? ● How are lost bucket copies replaced? ● How do we improve data distribution?
  • 35. Server 2 Server 1 Client 1 Consistency - Ships Passing in the Night Put (key, value1) Bucket 2 key=value2 Server 3 Client 2 Put (key, value2) Bucket 2 key=value1
  • 36. Server 2 Server 1 Client 1 Consistency Put (key, value1) Bucket 2 key=value2 Server 3 Client 2 Put (key, value2) Bucket 2 key=value2 Operations on key Serialized on primary
  • 37. Server 2 Server 1 Client Consistency - Lingering Operations Put (key, value) Hash Function Put in Bucket Bucket 2 key=value Routing Table Bucket 2 Server 3 Bucket 2 key=value
  • 38. Server 2 Client Consistency - Lingering Operations Server 3 Bucket 2 key=value Old, lingering event (key, value, Event ID)Put (key, value1) Hash Function Routing Table Bucket 2 Event Tracker (key, value, Event ID)
  • 39. Server 2 Server 1 Client 1 Consistency - Network Partitions Put (key, value1) Bucket 2 key=value2 Client 2 Bucket 2 key=value2
  • 40. Server 2 Server 1 Client 1 Consistency - Network Partitions Put (key, value1) Bucket 2 key=value2 Client 2 Bucket 2 key=value2
  • 41. Server 2 Server 1 Client 1 Consistency - Network Partitions Put (key, value1) Bucket 2 key=value1 Client 2 Put (key, value2) Bucket 2 key=value2
  • 43. Server 2 Server 1 Client 1 Consistency - Network Partitions Put (key, value1) Bucket 2 key=value2 Client 2 Put (key, value2) Bucket 2 key=value2
  • 44. ● How does data get to a bucket? ● How does geode handle failures? ● How does geode ensure data is consistent? ● How are lost bucket copies replaced? ● How do we improve data distribution? Restoring Redundancy
  • 46. Partitioned Regions - Redundancy Recovery Start Server 4Server 2 Bucket 2 Redundancy Provider Redundancy Provider Server 3 Redundancy Provider Start Start
  • 47. Partitioned Regions - Redundancy Recovery Server 4Server 2 Bucket 2 Redundancy Provider Redundancy Provider Server 3 Redundancy Provider Got a lock!
  • 48. Partitioned Regions - Redundancy Recovery Server 4Server 2 Bucket 2 Redundancy Provider Redundancy Provider Server 3 Redundancy Provider Bucket 2 Make a copy! Copy Bucket
  • 49. Partitioned Regions - Redundancy Recovery Server 4Server 2 Bucket 2 Redundancy Provider Redundancy Provider Server 3 Redundancy Provider Nothing to Do Bucket 2
  • 50. Partitioned Regions - Redundancy Recovery Nothing to Do Server 4Server 2 Bucket 2 Redundancy Provider Redundancy Provider Server 3 Redundancy Provider Bucket 2
  • 51. Rebalancing ● How does data get to a bucket? ● How does geode handle failures? ● How does geode ensure data is consistent? ● How are lost bucket copies replaced? ● How do improve data distribution?
  • 53. Rebalancing - What are we optimizing ● Cost based optimizer ● Minimizes the variance in bytes stored on each member ● Greedy algorithm ○ Maximize the improvement in variance per byte moved Bucket 1 Bucket 3 Bucket 2Server 1 Bucket 1 Bucket 3 Bucket 2 Variance: 1600 Server 2 Server 3 60 0 0
  • 54. Server 3 Server 1 Server 2 Rebalancing - What are we optimizing ● Cost based optimizer ● Minimizes the variance in bytes stored on each member ● Greedy algorithm ○ Maximize the improvement in variance per byte moved Bucket 1 Bucket 3 Bucket 2 Variance: 1050 45 15 0
  • 55. Server 3 Server 1 Server 2 Rebalancing - What are we optimizing ● Cost based optimizer ● Minimizes the variance in bytes stored on each member ● Greedy algorithm ○ Maximize the improvement in variance per byte moved Bucket 1 Bucket 3 Bucket 2 Variance: 150 30 15 15
  • 56. Rebalancing - what does it do? Three Phases 1. Restore Redundancy 2. Optimize bucket distribution 3. Optimize primary distribution Membership changes start from phase 1 again.
  • 57. Putting it Together ● Start with the simple idea: Hashing ● Using - Laziness, Duplication, Bossyness and Greed ● Get ○ High Availability ○ Low Latency ○ Consistency
  • 58. Links ● Mailing List: dev-subscribe@geode.apache.org ● Internal Architecture: https://cwiki.apache.org/confluence/x/AolXAw