Fast and General Geo-Distributed Transactions: Chablis System Overview

epl646 advanced topics in databases chablis fast n.w
1 / 51
Embed
Share

Learn about Chablis, a system designed for fast multi-regional transaction processing while aiming to maintain data consistency and performance. Unlike existing systems like Google's Spanner, Chablis eliminates the need for specialized hardware, making it a promising solution for efficient transactions in geo-distributed environments.

  • Transactions
  • Geo-Distributed
  • Data Consistency
  • Performance
  • Database

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. EPL646: Advanced Topics in Databases Chablis: Fast and General Transactions in Geo-Distributed Systems Tamer Eldeeb, Asaf Cidon, Philip A. Bernstein, Junfeng Yang. 2024. Chablis: Fast and General Transactions in Geo- Distributed Systems. (CIDR 24) By Stelios Christou: schris10@ucy.ac.cy 1 https://www2.cs.ucy.ac.cy/courses/EPL646

  2. What is Chablis A system that allows for fast multi-regional transaction processing Aims to provide both data consistency and good performance

  3. What is Chablis A system that allows for fast multi-regional transaction processing Aims to provide both data consistency and good performance

  4. Dont systems like this already exist?

  5. Yes But! They usually have consistency over performance tradeoffs They require specialized hardware (Google s Spanner)

  6. Yes But Chablis! They usually have consistency over performance tradeoffs They require specialized hardware (Google s Spanner) Chablis provides both consistency and performance Chablis doesn t need any specialized hardware!

  7. Ok So how does it work?

  8. Some Background First Single-region Datacenter: Single location datacenter with multiple servers Geo-distributed Datacenter: Multiple single-region datacenters in many Geo-distributed Datacenter:different locations worldwide Single-regional Transaction: Requires data from a single location Multi-regional Transaction: Requires data from multiple locations

  9. How Does Chablis Work? Chablis is built on a different system Chardonnay Chardonnay allows for fast transaction processing in single-region datacenters

  10. How Does Chardonnay Work? Two Phase Locking Two Phase Commit Chardonnay consists of three main components Transaction State Store Key Value Service (KV Service) Local Epoch Service

  11. Transaction State Store Storage where information about the transactions is stored Keeps the transactions flowing even when minor system issues occur Highly available and reliable The log file for the transactions

  12. Key Value Service (KV Service) Stores the data in <key, value> format Data is stored in non-overlapping clusters (ranges), along with a log file Ranges are replicated in multiple servers Server K Server 1 Server 2 Server 3 Server N range C range B range A range C range A Range C data, log file range C range D range B range E range D Range D data, log file range G range E range F Range F data, log file range D range F Single-region datacenter

  13. Key Value Service (KV Service) How are the replicated ranges synchronized? Stores the data in <key, value> format Data is stored in non-overlapping clusters (ranges), along with a log file Ranges are replicated in multiple servers Server K Server 1 Server 2 Server 3 Server N range C range B range A range C range A Range C data, log file range C range D range B range E range D Range D data, log file range G range E range F Range F data, log file range D range F Single-region datacenter

  14. Key Value Service (KV Service) One of the replicas is the leader and coordinates the other replicas All transactions go through the leader Leader takes care of Two Phase Locking and Two Phase Commit Server K Server 1 Server 2 Server 3 Server N range C range B range A range C range A Range C data, log file range C range D range B range E range D Range D data, log file range G range E range F Range F data, log file range D range F Single-region datacenter

  15. Key Value Service (KV Service) One of the replicas is the leader and coordinates the other replicas All transactions go through the leader Leader takes care of Two Phase Locking and Two Phase Commit Who gets to be the leader? Server K Server 1 Server 2 Server 3 Server N range C range B range A range C range A Range C data, log file range C range D range B range E range D Range D data, log file range G range E range F Range F data, log file range D range F Single-region datacenter

  16. Key Value Service (KV Service) Any replica can send a special request to become the leader If there is no leader, it becomes the leader for a specified time If there is a leader, nobody else can become it until its time is over

  17. Local Epoch Service Epoch is a counter that sets the execution order of the transactions Each range has its own unique epoch, shared with its replicas Epoch is stored in the log file of each range Epoch is incremented with every new transaction

  18. Local Epoch Service Leaders are responsible for updating the epoch and informing the replicas Before committing, the transaction gets the epoch from the leader A transaction will only commit once it has the smallest epoch

  19. Chardonnay Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Transaction Service 4. Prepared 6. Commit and Release Locks Local Epoch Service 3b. Read Epoch Chardonnay

  20. Chardonnay Transaction Flow Transaction Transaction State Store State Store Transaction wants to be executed KV Transaction Service Leader runs Two Phase Locking Local Epoch Service Chardonnay

  21. Chardonnay Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Transaction Service 4. Prepared 6. Commit and Release Locks Local Epoch Service 3b. Read Epoch Chardonnay

  22. Chardonnay Transaction Flow Transaction Transaction State Store State Store Transaction wants to be committed KV Transaction Service Leader runs Two Phase Commit Local Epoch Service Chardonnay

  23. Chardonnay Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Transaction Service 4. Prepared 6. Commit and Release Locks Local Epoch Service 3b. Read Epoch Chardonnay

  24. Chardonnay Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Transaction epoch obtained Service 4. Prepared 6. Commit and Release Locks Local Epoch Service 3b. Read Epoch Chardonnay

  25. Chardonnay Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Transaction wait for your turn Service 4. Prepared 6. Commit and Release Locks Local Epoch Service 3b. Read Epoch Chardonnay

  26. Chardonnay Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Transaction its your turn! Service 4. Prepared 6. Commit and Release Locks Local Epoch Service 3b. Read Epoch Chardonnay

  27. Chardonnay Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Transaction its your turn! Service 4. Prepared 6. Commit and Release Locks Local Epoch Service 3b. Read Epoch Chardonnay

  28. Chardonnay Transaction Flow Transaction Transaction State Store State Store Leader increments epoch by 1 KV Transaction Service Leader sends the new epoch to the other replicas Local Epoch Service Chardonnay

  29. Cant we just use Chardonnay for geo-distributed datacenters?

  30. No No we cant Can only synchronize servers within a region Regions might read different epoch values Can t synchronize the regions Network round trip latency

  31. No No we cant Can only synchronize servers within a region Regions might read different epoch values Can t synchronize the regions Network round trip latency

  32. No No we cant Can only synchronize servers within a region Regions might read different epoch values Can t synchronize the regions Network round trip latency Chablis aims to fix these two issues

  33. How is Chablis Different? Chablis adds two new components on Chardonnay Regional Chardonnay Global Epoch Service

  34. Regional Chardonnay Each region is a unique Chardonnay system Allows for synchronization within each region Region K Region 1 Region 2 Region N Server 1 Server 1 Server 1 Server 1 range B range A Server 2 Server 2 Server 2 range K range D Server 3 Server 3 Server 2 Server 4 Chardonnay Chardonnay Chardonnay Chardonnay Chablis

  35. Regional Chardonnay Each region is a unique Chardonnay system Allows for synchronization within each region Chablis synchronizes its regions like Chardonnay synchronizes its servers How? Region K Region 1 Region 2 Region N Server 1 Server 1 Server 1 Server 1 range B range A Server 2 Server 2 Server 2 range K range D Server 3 Server 3 Server 2 Server 4 Chardonnay Chardonnay Chardonnay Chardonnay Chablis

  36. Global Epoch Service Same as Local Epoch Service, but global One global epoch shared among the regions Epoch is stored locally on each region

  37. Global Epoch Service Regions update their global epoch value from a middleware epoch publisher The epoch publisher just holds the latest global epoch Each region has its own epoch publisher Region K Region 1 Region 2 Region N Server 1 Server 1 Server 1 Server 1 range B range A Server 2 Server 2 Server 2 range K range D Server 3 Server 3 epoch publisher epoch publisher epoch publisher epoch publisher Chardonnay Chardonnay Chardonnay Chardonnay Chablis

  38. Single-Regional Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Service 4. Prepared 6. Commit and Release Locks Transaction Local Epoch Service 3b. Read Local Epoch Global Epoch Publisher 3c. Read Global Epoch Chablis

  39. Single-Regional Transaction Flow Transaction Transaction State Store State Store KV Service Transaction wants to be executed Transaction Local Epoch Service Leader runs Two Phase Locking Global Epoch Publisher Chablis

  40. Single-Regional Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Service 4. Prepared 6. Commit and Release Locks Transaction Local Epoch Service 3b. Read Local Epoch Global Epoch Publisher 3c. Read Global Epoch Chablis

  41. Single-Regional Transaction Flow Transaction Transaction State Store State Store KV Service Transaction wants to be committed Transaction Local Epoch Service Leader runs Two Phase Commit Global Epoch Publisher Chablis

  42. Single-Regional Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Service 4. Prepared 6. Commit and Release Locks Transaction Local Epoch Service 3b. Read Local Epoch Global Epoch Publisher 3c. Read Global Epoch Chablis

  43. Single-Regional Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Service 4. Prepared 6. Commit and Release Locks Transaction local epoch obtained Local Epoch Service 3b. Read Local Epoch global epoch obtained Global Epoch Publisher 3c. Read Global Epoch Chablis

  44. Single-Regional Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Service 4. Prepared 6. Commit and Release Locks Transaction wait for your turn Local Epoch Service 3b. Read Local Epoch Global Epoch Publisher 3c. Read Global Epoch Chablis

  45. Single-Regional Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Service 4. Prepared 6. Commit and Release Locks Transaction its your turn! Local Epoch Service 3b. Read Local Epoch Global Epoch Publisher 3c. Read Global Epoch Chablis

  46. Single-Regional Transaction Flow 1. Start Transaction Transaction Transaction State Store State Store 5. Log Commit 2. Execute Transaction 3a. Prepare KV Service 4. Prepared 6. Commit and Release Locks Transaction its your turn! Local Epoch Service 3b. Read Local Epoch Global Epoch Publisher 3c. Read Global Epoch Chablis

  47. Multi-Regional Transaction Flow Region 1 Transaction State Store Region 2 All ranges participating in the transaction must first commit and then notify the main transaction to commit as well Region 3 Transaction Region 4 Region 5 Chablis

  48. Evaluation Chablis Spanner (Google s Cloud system) Smaller write latency Any Hardware Smaller read latency Specialized Hardware

  49. Conclusion Chablis is a fast multi-regional transaction processing system It provides both consistency and performance without using specialized hardware Built on the idea of Chardonnay Expands the concept of epochs so it can be used in geo-distributed databases

  50. References [Paper] Tamer Eldeeb, Asaf Cidon, Philip A. Bernstein, Junfeng Yang. 2024. Chablis: Fast and General Transactions in Geo- Distributed Systems. (CIDR 24)

Related


More Related Content