SlideShare a Scribd company logo
FlurryDB
A Dynamically Scalable Relational
Database with Virtual Machine Cloning
Michael Mior and Eyal de Lara
University of Toronto
Cluster Databases
                                          DBMS

                      Load                VM
                    balancer

                                          DBMS

                                          VM



• We use read-one write all (ROWA) replication
  • Send reads to any server instance
  • Send writes to all server instances
• Two-phase commit is required for writes
Problem




• Loads may fluctuate drastically over time
• Pay-as-you-go IaaS clouds should be ideal

However
   We want to adapt the size of the cluster to match the load
Problem
• Databases have large state and are hard to scale
• A complete copy may be required for new instances
• Copying large databases may take hours


Queries

Replication
                   copy       boot        catch         add
                   data      replica       up         replica


• Overprovisioning is necessary to maintain service
Solution – Virtual Machine Fork

• Analogous to fork() for OS processes
• Clones start immediately
• State fetched on-demand
  • Page faults fetch the memory or disk page


      This can reduce instantiation time
      from minutes or hours to seconds
VM Fork




 Master VM   Clone VM
FlurryDB
   • Use VM fork to provision new instances and
     add elasticity to unmodified MySQL

   • Making distributed commit cloning-aware to
     handle in-flight transactions

Queries

Replication
              clone     add
                      replica
FlurryDB Challenges

1. Incorporate new worker into cluster

2. Preserve application semantics
Incorporate new worker

• Clone must connect to the load balancer

• Load balancer must begin sending
  transactions to the clone
Preserve application semantics
• Transactions may be in-progress at the
  time of cloning
• Clone gets new IP address
• Doing nothing drops connections and
  transaction status is unknown
                                New IP Address


     DBMS       T     DBMS
                                 ?T’

    Master VM        Clone VM
Solutions to consistency
1. Employ a write barrier
         DBMS             DBMS
        Master VM        Clone VM



2. Roll back all transactions in progress
         DBMS             DBMS
                    T’
        Master VM        Clone VM



3. Allow all transactions to complete
         DBMS             DBMS
                    T               T’
        Master VM        Clone VM
FlurryDB: Consistency beyond VM fork



Solution
Use a proxy which is aware of VM fork inside
the virtual machine to maintain the database
connection
Two-phase commit during
cloning
      Client    T



       Load
     Balancer   T   T’




      Proxy     T             Proxy     T’
                    fork

     Database   T            Database   T’
   Master VM               Clone VM
Replica addition delay
• Update 10,000 rows concurrently

• Clone and measure replica addition delay in
  two cases
   • Write barrier - wait for outstanding writes to
     complete before cloning
   • FlurryDB - use double-proxying to allow
     completion on the clone
Replica addition delay
Proxy overhead


• Measurement of large SELECT transfer
  times shows ~5% drop in bandwidth

• Reconnection to new servers ~10x
  faster with no authentication
RUBBoS
• Simulates a news website such as Slashdot
• Users read, post, and comment on stories

• We run server at full capacity (25 clients)
• After 5 minutes, we clone to two servers and
  double the number of clients
• Throughput in queries per second is
  measured at the load balancer
RUBBOS Results
           cloning at 300s
Summary
• FlurryDB adds elasticity to unmodified MySQL
  by interposing a cloning-aware proxy

• VM fork handles most of the issues with
  replica addition

• A proxy handles in-flight requests

• New replicas can be made available in
  seconds while maintaining consistency
Future Work

• Experiment with varying consistency protocols
  (e.g. master-slave, eventual consistency)

• Test scalability with larger numbers of clones

• Optimize virtual disk performance

• Provide support for transactional workloads
Questions?
Related Work
• “NoSQL” (perhaps more accurately, NoACID) systems
  using eventual consistency or key-value data models
  such as Cassandra or Dynamo
• Relational Cloud uses dynamic partitioning across a
  cluster of MySQL/PostgreS instances
• Urgaonkar et al. use rapid changes in resource allocate to
  provision a multi-tier Internet application
• Soundararajan et al. present dynamic replication policies
  for scaling database servers
• HyPer uses process fork and memory snapshots to
  enable a hybrid OLAP/OLTP workload

More Related Content

PDF
Zebus - Pitfalls of a P2P service bus
PDF
Five Workload-to-Cloud Migration Methods
PDF
Percona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
PDF
State of the CLI- Kat Marchan
PDF
Evaluating persistent, replicated message queues
PDF
Geographically Distributed Multi-Master MySQL Clusters
PDF
How Much Kafka?
PDF
Apache Kafka - Martin Podval
Zebus - Pitfalls of a P2P service bus
Five Workload-to-Cloud Migration Methods
Percona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
State of the CLI- Kat Marchan
Evaluating persistent, replicated message queues
Geographically Distributed Multi-Master MySQL Clusters
How Much Kafka?
Apache Kafka - Martin Podval

What's hot (20)

PPTX
MySQL Multi-Master Replication
PPT
Windows Package Manager Concept
PDF
Kafka as a message queue
PDF
Multi-language/multi-OS communication using RabbitMQ
PDF
Cloud Foundry on OpenStack - An Experience Report | anynines
PDF
Redo log
PDF
9th docker meetup 2016.07.13
PDF
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
PDF
ES & Kafka
PPTX
Kafka replication apachecon_2013
PPTX
Alibaba patches in MariaDB
PPTX
Demystifying flink memory allocation and tuning - Roshan Naik, Uber
PDF
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
PPTX
NServiceBus - introduction to a message based distributed architecture
PPTX
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...
PPTX
When it Absolutely, Positively, Has to be There: Reliability Guarantees in Ka...
PPTX
Database and Public Endpoints redundancy on Azure
PDF
Apache Kafka – (Pattern and) Anti-Pattern
PDF
Using SLOs for Continuous Performance Optimizations of Your k8s Workloads
PPTX
Kafka: Internals
MySQL Multi-Master Replication
Windows Package Manager Concept
Kafka as a message queue
Multi-language/multi-OS communication using RabbitMQ
Cloud Foundry on OpenStack - An Experience Report | anynines
Redo log
9th docker meetup 2016.07.13
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
ES & Kafka
Kafka replication apachecon_2013
Alibaba patches in MariaDB
Demystifying flink memory allocation and tuning - Roshan Naik, Uber
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
NServiceBus - introduction to a message based distributed architecture
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...
When it Absolutely, Positively, Has to be There: Reliability Guarantees in Ka...
Database and Public Endpoints redundancy on Azure
Apache Kafka – (Pattern and) Anti-Pattern
Using SLOs for Continuous Performance Optimizations of Your k8s Workloads
Kafka: Internals
Ad

Similar to FlurryDB: A Dynamically Scalable Relational Database with Virtual Machine Cloning (20)

PDF
Future Proofing MySQL by Robert Hodges, Continuent
PDF
Architecture by Accident
PPT
Dynamo Systems - QCon SF 2012 Presentation
PDF
What every developer should know about database scalability, PyCon 2010
PPTX
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
PDF
Thoughts on Transaction and Consistency Models
PDF
Built-in Replication in PostgreSQL
PPTX
No sql solutions - 공개용
PDF
Buytaert kris my_sql-pacemaker
PDF
Scaling Databases On The Cloud
PDF
Scaing databases on the cloud
PDF
SQL? NoSQL? NewSQL?!? What's a Java developer to do? - PhillyETE 2012
PDF
MySQL High Availability Solutions
PDF
Mysqlhacodebits20091203 1260184765-phpapp02
PDF
MySQL High Availability Solutions
PDF
The Cassandra Distributed Database
PDF
Cache and consistency in nosql
ODP
redis
PDF
High Availability with MySQL
PDF
Implementing the Future of PostgreSQL Clustering with Tungsten
Future Proofing MySQL by Robert Hodges, Continuent
Architecture by Accident
Dynamo Systems - QCon SF 2012 Presentation
What every developer should know about database scalability, PyCon 2010
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
Thoughts on Transaction and Consistency Models
Built-in Replication in PostgreSQL
No sql solutions - 공개용
Buytaert kris my_sql-pacemaker
Scaling Databases On The Cloud
Scaing databases on the cloud
SQL? NoSQL? NewSQL?!? What's a Java developer to do? - PhillyETE 2012
MySQL High Availability Solutions
Mysqlhacodebits20091203 1260184765-phpapp02
MySQL High Availability Solutions
The Cassandra Distributed Database
Cache and consistency in nosql
redis
High Availability with MySQL
Implementing the Future of PostgreSQL Clustering with Tungsten
Ad

More from Michael Mior (6)

PDF
A view from the ivory tower: Participating in Apache as a member of academia
PDF
Physical Design for Non-Relational Data Systems
PDF
Apache Calcite: One Frontend to Rule Them All
PDF
Locomotor: transparent migration of client-side database code
PDF
Automated Schema Design for NoSQL Databases
PDF
NoSE: Schema Design for NoSQL Applications
A view from the ivory tower: Participating in Apache as a member of academia
Physical Design for Non-Relational Data Systems
Apache Calcite: One Frontend to Rule Them All
Locomotor: transparent migration of client-side database code
Automated Schema Design for NoSQL Databases
NoSE: Schema Design for NoSQL Applications

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Cloud computing and distributed systems.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation
Unlocking AI with Model Context Protocol (MCP)
Reach Out and Touch Someone: Haptics and Empathic Computing
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Programs and apps: productivity, graphics, security and other tools
Cloud computing and distributed systems.
Digital-Transformation-Roadmap-for-Companies.pptx
Electronic commerce courselecture one. Pdf
Big Data Technologies - Introduction.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf

FlurryDB: A Dynamically Scalable Relational Database with Virtual Machine Cloning

  • 1. FlurryDB A Dynamically Scalable Relational Database with Virtual Machine Cloning Michael Mior and Eyal de Lara University of Toronto
  • 2. Cluster Databases DBMS Load VM balancer DBMS VM • We use read-one write all (ROWA) replication • Send reads to any server instance • Send writes to all server instances • Two-phase commit is required for writes
  • 3. Problem • Loads may fluctuate drastically over time • Pay-as-you-go IaaS clouds should be ideal However We want to adapt the size of the cluster to match the load
  • 4. Problem • Databases have large state and are hard to scale • A complete copy may be required for new instances • Copying large databases may take hours Queries Replication copy boot catch add data replica up replica • Overprovisioning is necessary to maintain service
  • 5. Solution – Virtual Machine Fork • Analogous to fork() for OS processes • Clones start immediately • State fetched on-demand • Page faults fetch the memory or disk page This can reduce instantiation time from minutes or hours to seconds
  • 6. VM Fork Master VM Clone VM
  • 7. FlurryDB • Use VM fork to provision new instances and add elasticity to unmodified MySQL • Making distributed commit cloning-aware to handle in-flight transactions Queries Replication clone add replica
  • 8. FlurryDB Challenges 1. Incorporate new worker into cluster 2. Preserve application semantics
  • 9. Incorporate new worker • Clone must connect to the load balancer • Load balancer must begin sending transactions to the clone
  • 10. Preserve application semantics • Transactions may be in-progress at the time of cloning • Clone gets new IP address • Doing nothing drops connections and transaction status is unknown New IP Address DBMS T DBMS ?T’ Master VM Clone VM
  • 11. Solutions to consistency 1. Employ a write barrier DBMS DBMS Master VM Clone VM 2. Roll back all transactions in progress DBMS DBMS T’ Master VM Clone VM 3. Allow all transactions to complete DBMS DBMS T T’ Master VM Clone VM
  • 12. FlurryDB: Consistency beyond VM fork Solution Use a proxy which is aware of VM fork inside the virtual machine to maintain the database connection
  • 13. Two-phase commit during cloning Client T Load Balancer T T’ Proxy T Proxy T’ fork Database T Database T’ Master VM Clone VM
  • 14. Replica addition delay • Update 10,000 rows concurrently • Clone and measure replica addition delay in two cases • Write barrier - wait for outstanding writes to complete before cloning • FlurryDB - use double-proxying to allow completion on the clone
  • 16. Proxy overhead • Measurement of large SELECT transfer times shows ~5% drop in bandwidth • Reconnection to new servers ~10x faster with no authentication
  • 17. RUBBoS • Simulates a news website such as Slashdot • Users read, post, and comment on stories • We run server at full capacity (25 clients) • After 5 minutes, we clone to two servers and double the number of clients • Throughput in queries per second is measured at the load balancer
  • 18. RUBBOS Results cloning at 300s
  • 19. Summary • FlurryDB adds elasticity to unmodified MySQL by interposing a cloning-aware proxy • VM fork handles most of the issues with replica addition • A proxy handles in-flight requests • New replicas can be made available in seconds while maintaining consistency
  • 20. Future Work • Experiment with varying consistency protocols (e.g. master-slave, eventual consistency) • Test scalability with larger numbers of clones • Optimize virtual disk performance • Provide support for transactional workloads
  • 22. Related Work • “NoSQL” (perhaps more accurately, NoACID) systems using eventual consistency or key-value data models such as Cassandra or Dynamo • Relational Cloud uses dynamic partitioning across a cluster of MySQL/PostgreS instances • Urgaonkar et al. use rapid changes in resource allocate to provision a multi-tier Internet application • Soundararajan et al. present dynamic replication policies for scaling database servers • HyPer uses process fork and memory snapshots to enable a hybrid OLAP/OLTP workload