SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
The Consistency vs
Throughput Tradeoff in
Distributed Databases
Daniel Abadi, Darnell-Kanal Professor
Introduction
Distributed database systems:
■ CAP theorem: you must trade availability for consistency
■ PACELC theorem: you must trade latency for consistency
■ But do you have to trade throughput for consistency???
Background
Widget ID Price In_Stock
1 99 4
2 325 12
3 79 1
4 199 7
Customer
id
Store_
Credit
1 0
2 100
3 50
4 0
5 10
6 500
7 0
8 25
Customer 2 buys widget 3 with
store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Background
Widget ID Price In_Stock
1 99 4
2 325 12
3 79 0
4 199 7
Customer
id
Store_
Credit
1 0
2 100
3 50
4 0
5 10
6 500
7 0
8 25
Customer 2 buys widget 3 with
store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Background
Widget ID Price In_Stock
1 99 4
2 325 12
3 79 0
4 199 7
Customer
id
Store_
Credit
1 0
2 21
3 50
4 0
5 10
6 500
7 0
8 25
Customer 2 buys widget 3 with
store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Distributed databases are hard
Widget ID Price In_Stock
1 99 4
Customer id Store_ Credit
1 0
5 10
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
4 199 7
Customer id Store_ Credit
4 0
8 25
Distributed databases are hard
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
Customer 2 buys widget 3 with store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
W.price = 79
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Distributed databases are hard
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
3 50
7 0
prepare
r
e
a
d
y
c
o
m
m
i
t
d
o
n
e
No conflicting transactions can run!
W.price = 79
Customer 2 buys widget 3 with store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Replication exacerbates the problem
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
replicate
replicate
Replication exacerbates the problem
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
replicate
replicate
Replication exacerbates the problem
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
done
done
No conflicting transactions can run!
replicate
replicate
■ Commit protocol like 2PC
■ Needed for A, C, and D of ACID
■ BUT:
■ Latency of protocol
■ Throughput reduction
■ Synchronous replication
■ Needed for C of CAP
■ BUT:
■ Latency of replication
■ Throughput reduction
Summary of performance issues
■ If we have to trade throughout for consistency, it should
be PACETLC, not PACELC!
■ But is the throughput tradeoff fundamental?
PACETLC?
■ All throughput problems are caused by preventing conflicting
transactions from running. Therefore:
■ If we don’t guarantee strong isolation, the problem goes away
■ If there are no conflicting transactions, the problem never exists in
the first place
■ Deterministic systems eliminate the throughput tradeoff entirely
■ But that’s a whole other talk!
Throughput tradeoff is not fundamental!
Thank You
Stay in Touch
Daniel Abadi
abadi@umd.edu
@daniel_abadi
www.linkedin.com/in/databaseprof

Mais conteúdo relacionado

Semelhante a The Consistency vs Throughput Tradeoff in Distributed Databases

3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_PresentationJoseph Baca
 
Developing Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass GuaranteeDeveloping Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass GuaranteeSusanMorant
 
Microsoft MCSE 70-469 it braindumps
Microsoft MCSE 70-469 it braindumpsMicrosoft MCSE 70-469 it braindumps
Microsoft MCSE 70-469 it braindumpslilylucy
 
Warranty management system
Warranty management systemWarranty management system
Warranty management systemMoin Raza Khan
 
1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL Fundamentals1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL FundamentalsLydi00147
 
Higher isdd revision presentation
Higher isdd revision presentationHigher isdd revision presentation
Higher isdd revision presentationmorgantown
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestConnor McDonald
 
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...Mark Wong
 
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...Peter Pilgrim
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Reportnyin27
 
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...HostedbyConfluent
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistentconfluent
 
QSDA2022: Qlik Sense Data Architect | Q & A
QSDA2022: Qlik Sense Data Architect | Q & AQSDA2022: Qlik Sense Data Architect | Q & A
QSDA2022: Qlik Sense Data Architect | Q & APalakMazumdar1
 
CBI D-DA3CA1-ND1ZXBL-CS2000X-1
CBI D-DA3CA1-ND1ZXBL-CS2000X-1CBI D-DA3CA1-ND1ZXBL-CS2000X-1
CBI D-DA3CA1-ND1ZXBL-CS2000X-1savomir
 

Semelhante a The Consistency vs Throughput Tradeoff in Distributed Databases (20)

3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_Presentation
 
Developing Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass GuaranteeDeveloping Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
 
Medium Questions
Medium QuestionsMedium Questions
Medium Questions
 
Microsoft MCSE 70-469 it braindumps
Microsoft MCSE 70-469 it braindumpsMicrosoft MCSE 70-469 it braindumps
Microsoft MCSE 70-469 it braindumps
 
Sql Portfolio
Sql PortfolioSql Portfolio
Sql Portfolio
 
Warranty management system
Warranty management systemWarranty management system
Warranty management system
 
Assignment#06
Assignment#06Assignment#06
Assignment#06
 
1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL Fundamentals1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL Fundamentals
 
Higher isdd revision presentation
Higher isdd revision presentationHigher isdd revision presentation
Higher isdd revision presentation
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
 
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
 
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
 
Reporte produccion
Reporte produccionReporte produccion
Reporte produccion
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Report
 
Dbms assignment 2
Dbms assignment 2Dbms assignment 2
Dbms assignment 2
 
MySQL under the siege
MySQL under the siegeMySQL under the siege
MySQL under the siege
 
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
 
QSDA2022: Qlik Sense Data Architect | Q & A
QSDA2022: Qlik Sense Data Architect | Q & AQSDA2022: Qlik Sense Data Architect | Q & A
QSDA2022: Qlik Sense Data Architect | Q & A
 
CBI D-DA3CA1-ND1ZXBL-CS2000X-1
CBI D-DA3CA1-ND1ZXBL-CS2000X-1CBI D-DA3CA1-ND1ZXBL-CS2000X-1
CBI D-DA3CA1-ND1ZXBL-CS2000X-1
 

Mais de ScyllaDB

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQLWhat Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQLScyllaDB
 
Low Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & PitfallsLow Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & PitfallsScyllaDB
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasScyllaDB
 
Beyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDBBeyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDBScyllaDB
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasScyllaDB
 
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...ScyllaDB
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...ScyllaDB
 
Database Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr SarnaDatabase Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr SarnaScyllaDB
 
Replacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDBReplacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDBScyllaDB
 
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear ScalabilityPowering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear ScalabilityScyllaDB
 
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptxScyllaDB
 
Getting the most out of ScyllaDB
Getting the most out of ScyllaDBGetting the most out of ScyllaDB
Getting the most out of ScyllaDBScyllaDB
 
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a MigrationNoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a MigrationScyllaDB
 
NoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration LogisticsNoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration LogisticsScyllaDB
 
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and ChallengesNoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and ChallengesScyllaDB
 
ScyllaDB Virtual Workshop
ScyllaDB Virtual WorkshopScyllaDB Virtual Workshop
ScyllaDB Virtual WorkshopScyllaDB
 
DBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & TradeoffsDBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & TradeoffsScyllaDB
 
Build Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBBuild Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBScyllaDB
 
NoSQL Data Modeling 101
NoSQL Data Modeling 101NoSQL Data Modeling 101
NoSQL Data Modeling 101ScyllaDB
 

Mais de ScyllaDB (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQLWhat Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQL
 
Low Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & PitfallsLow Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & Pitfalls
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance Dilemmas
 
Beyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDBBeyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDB
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance Dilemmas
 
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
 
Database Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr SarnaDatabase Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
 
Replacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDBReplacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDB
 
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear ScalabilityPowering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
 
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
 
Getting the most out of ScyllaDB
Getting the most out of ScyllaDBGetting the most out of ScyllaDB
Getting the most out of ScyllaDB
 
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a MigrationNoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
 
NoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration LogisticsNoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration Logistics
 
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and ChallengesNoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
 
ScyllaDB Virtual Workshop
ScyllaDB Virtual WorkshopScyllaDB Virtual Workshop
ScyllaDB Virtual Workshop
 
DBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & TradeoffsDBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & Tradeoffs
 
Build Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBBuild Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDB
 
NoSQL Data Modeling 101
NoSQL Data Modeling 101NoSQL Data Modeling 101
NoSQL Data Modeling 101
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

The Consistency vs Throughput Tradeoff in Distributed Databases

  • 1. The Consistency vs Throughput Tradeoff in Distributed Databases Daniel Abadi, Darnell-Kanal Professor
  • 2. Introduction Distributed database systems: ■ CAP theorem: you must trade availability for consistency ■ PACELC theorem: you must trade latency for consistency ■ But do you have to trade throughput for consistency???
  • 3. Background Widget ID Price In_Stock 1 99 4 2 325 12 3 79 1 4 199 7 Customer id Store_ Credit 1 0 2 100 3 50 4 0 5 10 6 500 7 0 8 25 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 4. Background Widget ID Price In_Stock 1 99 4 2 325 12 3 79 0 4 199 7 Customer id Store_ Credit 1 0 2 100 3 50 4 0 5 10 6 500 7 0 8 25 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 5. Background Widget ID Price In_Stock 1 99 4 2 325 12 3 79 0 4 199 7 Customer id Store_ Credit 1 0 2 21 3 50 4 0 5 10 6 500 7 0 8 25 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 6. Distributed databases are hard Widget ID Price In_Stock 1 99 4 Customer id Store_ Credit 1 0 5 10 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 4 199 7 Customer id Store_ Credit 4 0 8 25
  • 7. Distributed databases are hard Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price W.price = 79
  • 8. Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Distributed databases are hard Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 3 50 7 0 prepare r e a d y c o m m i t d o n e No conflicting transactions can run! W.price = 79 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 9. Replication exacerbates the problem Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 replicate replicate
  • 10. Replication exacerbates the problem Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 replicate replicate
  • 11. Replication exacerbates the problem Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 done done No conflicting transactions can run! replicate replicate
  • 12. ■ Commit protocol like 2PC ■ Needed for A, C, and D of ACID ■ BUT: ■ Latency of protocol ■ Throughput reduction ■ Synchronous replication ■ Needed for C of CAP ■ BUT: ■ Latency of replication ■ Throughput reduction Summary of performance issues
  • 13. ■ If we have to trade throughout for consistency, it should be PACETLC, not PACELC! ■ But is the throughput tradeoff fundamental? PACETLC?
  • 14. ■ All throughput problems are caused by preventing conflicting transactions from running. Therefore: ■ If we don’t guarantee strong isolation, the problem goes away ■ If there are no conflicting transactions, the problem never exists in the first place ■ Deterministic systems eliminate the throughput tradeoff entirely ■ But that’s a whole other talk! Throughput tradeoff is not fundamental!
  • 15. Thank You Stay in Touch Daniel Abadi abadi@umd.edu @daniel_abadi www.linkedin.com/in/databaseprof