SlideShare una empresa de Scribd logo
1 de 34
DISTRIBUTING DATA
THE AEROSPIKE WAY
Young Paik
Director, Sales Engineering
Aerospike
young@aerospike.com
July 24, 2013
…OR Why Is This Line Taking So Long?
© 2013 Aerospike. All rights reserved. Pg. 2
A Database Is Like A Conference
Registration Line
➤ The goal is to get as many people through the
line as quickly as possible.
➤ Registrants must get their own registration
package, not just anyone’s.
© 2013 Aerospike. All rights reserved. Pg. 3
Scaling Throughput
All databases (and registration systems) have
limits to performance. The real question is how
do you go beyond your current limits.
There are two basic strategies:
➤ Vertical scaling – upgrade single server
➤ Horizontal scaling – distribute to multiple
servers
© 2013 Aerospike. All rights reserved. Pg. 4
Vertical Scaling
Vertical scaling means that if a small server can
handle some traffic … a big one can handle more.
This is true … to a point.
© 2013 Aerospike. All rights reserved. Pg. 5
What’s Wrong With Vertical Scaling?
➤ Expensive
➤ Still need to deal with failover.
 What happens if your DB goes down?
 What happens if you need to upgrade?
➤ May still not meet the storage/speed
requirements
➤ Still a single point of failure
© 2013 Aerospike. All rights reserved. Pg. 6
Horizontal Scaling
Horizontal Scaling means that in some way the
load will be distributed among many servers.
© 2013 Aerospike. All rights reserved. Pg. 7
What Do You Want From Horizontal Scaling?
➤ Hide the complexity of distribution.
➤ Linear scalability.
➤ Better service availability.
➤ Deal with meteor strike on your data center.
© 2013 Aerospike. All rights reserved. Pg. 8
Different Distribution Models
Distributed databases will place different data on
different nodes.
Some common methods:
➤ Simple sharding
➤ Hashed sharding
➤ Master-slave
➤ Smart partitioning
© 2013 Aerospike. All rights reserved. Pg. 9
Simple Sharding
© 2013 Aerospike. All rights reserved. Pg. 10
Simple Sharding
Clients know which node has the data.
© 2013 Aerospike. All rights reserved. Pg. 11
Simple Sharding
What happens if a node fails?
© 2013 Aerospike. All rights reserved. Pg. 12
Simple Sharding
Pros Cons
+ Easy to set up. Clients are written
with a knowledge of how the data is
distributed.
+ Servers aren’t coordinated, so no
intra-cluster communication is
necessary.
- May lead to imbalance and hot nodes
- If a node fails, the data on that node is
unavailable.
- Adding new nodes requires
reconfiguration on the clients and re-
shuffling of data on the server,
resulting in service down time.
- Replication must be handled
separately.
© 2013 Aerospike. All rights reserved. Pg. 13
Hashed Sharding
© 2013 Aerospike. All rights reserved. Pg. 14
Hashing Sharding
➤ The key can be hashed
using a hashing algorithm
to create a seemingly
random string
➤ The first several characters
of the hash can be used to
determine the node for
that data.
Paik
C820G3KH15HH3KASD43S
© 2013 Aerospike. All rights reserved. Pg. 15
Instead of using the actual key value, use a hash
to randomize how the data is distributed.
Hashed Sharding
Hashed sharding will balance data and load.
© 2013 Aerospike. All rights reserved. Pg. 16
Hashed Sharding
But has the same problem on a node failure.
© 2013 Aerospike. All rights reserved. Pg. 17
Hashed Sharding
Pros Cons
+ Easy to set up. Clients are written
with a knowledge of how the data is
distributed.
+ Servers aren’t coordinated, so no
intra-cluster communication is
necessary.
+ Data/traffic is now balanced.
- If a node fails, the data on that node is
unavailable.
- Adding new nodes requires
reconfiguration on the clients and re-
shuffling of data on the server,
resulting in service down time.
- Replication must be handled
separately.
© 2013 Aerospike. All rights reserved. Pg. 18
Master-Slave
© 2013 Aerospike. All rights reserved. Pg. 19
Master-Slave
Master coordinates connection with slave nodes.
© 2013 Aerospike. All rights reserved. Pg. 20
Master-Slave Sharding
Pros Cons
+ Relatively simple setup with master
controlling distribution.
+ Replication can be set up to go to
backup node. Master is responsible
for coordinating.
- Adding new nodes requires
reconfiguration on the master and
often manual re-shuffling of data on
the server, resulting in service down
time.
- Requires multiple network connections.
- Single point of failure: the master.
Some databases like Mongo require 3
masters (called configuration servers)
where 2 will be backups for the main
one.
© 2013 Aerospike. All rights reserved. Pg. 21
Smart Partitioning
The Aerospike Way
© 2013 Aerospike. All rights reserved. Pg. 22
Smart Partitioning
Every registrant knows where to go.
© 2013 Aerospike. All rights reserved. Pg. 23
Map
Smart Partitioning
And, every registrant knows where to go if a node
fails.
© 2013 Aerospike. All rights reserved. Pg. 24
Map
Smart Partition Architecture
© 2013 Aerospike. All rights reserved. Pg. 25
Cluster creates a map of how data is
distributed, called a partition map.
Combine features from other architectures to create a map.
Smart Partitioning
➤ Every key is hashed using the
RIPEMD160 hash function
➤ The creates a fixed 160 bits (20
bytes) string.
➤ 12 bits of this hash are used to
identify the partition id
➤ There are 4096 partitions
➤ Are distributed among the nodes
Paik
182023kh15hh3kahdjsh
Partition
ID
Master
node
Replica
node
… 1 4
1820 2 3
1821 3 2
4096 4 1
© 2013 Aerospike. All rights reserved. Pg. 26
Aerospike uses a partition table
Smart Partitioning
For simplicity, let’s take a 3 node cluster with
only 9 partitions and a replication factor of 2.
© 2013 Aerospike. All rights reserved. Pg. 27
Smart Partitioning
Pros Cons
+ Relatively simple setup, with the
cluster determining data
distribution.
+ Balanced distribution.
+ No single point of failure.
+ Replication is automatic and
immediate.
+ Failover is automatic and
immediate.
+ Rebalancing is automatic and
immediate.
+ An arbitrary number of nodes can be
added to increase capacity.
+ True 24x7 uptime. Cluster can be
upgraded on a rolling basis.
- Application must be written using
smart API.
© 2013 Aerospike. All rights reserved. Pg. 28
What Do You Want From Horizontal Scaling?
➤ Hide the complexity of distribution.
 Balanced data distribution. No “hot nodes.”
 Automatic client reconfiguration. No need to manually
reconfigure/restart clients.
➤ Linear scalability.
 Easy to calculate needed capacity.
 Cluster can be an arbitrary number of nodes.
➤ Better service availability.
 24 x 7 uptime. No downtime, even for “routine” maintenance.
 No single point of failure.
 Automatic replication of data.
 Automatic failover.
 Automatic rebalancing when nodes fail.
 Automatic rebalancing when adding nodes.
➤ Deal with a catastrophe on your data center.
© 2013 Aerospike. All rights reserved. Pg. 29
So can you deal with a meteor hitting my data center?
© 2013 Aerospike. All rights reserved. Pg. 30
But what about a meteor strike?
Multi-Datacenter Architecture
© 2013 Aerospike. All rights reserved. Pg. 31
Data Center 1
Data Center 2 Data Center 3
Cross Data Center Replication (XDR)
➤ Asynchronous replication for long link delays
and outages
➤ Namespaces configured to replicate to a
destination cluster – master / slave, including
star and ring
➤ Replication process
 Transaction journal on partition master and
replica
 XDR process writes batches to destination
 Transmission state shared with source replica
 Retransmission in case of network fault
 When data arrives back at originating cluster,
transaction ID matching prevents subsequent
application and forwarding
➤ In master / master replication,
conflict resolution via multiple versions, or
timestamp
© 2013 Aerospike. All rights reserved. Confidential Pg. 32
Caveats for Evaluating Distributed
Databases
When testing new databases:
➤ Make sure to test to an appropriate scale.
➤ Beware of inconsistent performance in a cloud
environment.
➤ If a database has caching, make sure your use is
realistic.
© 2013 Aerospike. All rights reserved. Pg. 33
THANK YOU
© 2013 Aerospike. All rights reserved.

Más contenido relacionado

La actualidad más candente

Hadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native EraHadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native Era
DataWorks Summit
 
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Community
 
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red_Hat_Storage
 

La actualidad más candente (20)

Predictable Big Data Performance in Real-time
Predictable Big Data Performance in Real-timePredictable Big Data Performance in Real-time
Predictable Big Data Performance in Real-time
 
Hadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native EraHadoop Storage in the Cloud Native Era
Hadoop Storage in the Cloud Native Era
 
Backup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix BarbeiraBackup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
Backup management with Ceph Storage - Camilo Echevarne, Félix Barbeira
 
Flexible and Fast Storage for Deep Learning with Alluxio
Flexible and Fast Storage for Deep Learning with Alluxio Flexible and Fast Storage for Deep Learning with Alluxio
Flexible and Fast Storage for Deep Learning with Alluxio
 
Handling Increasing Load and Reducing Costs Using Aerospike NoSQL Database - ...
Handling Increasing Load and Reducing Costs Using Aerospike NoSQL Database - ...Handling Increasing Load and Reducing Costs Using Aerospike NoSQL Database - ...
Handling Increasing Load and Reducing Costs Using Aerospike NoSQL Database - ...
 
Disk health prediction for Ceph
Disk health prediction for CephDisk health prediction for Ceph
Disk health prediction for Ceph
 
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
Ceph Day San Jose - Enable Fast Big Data Analytics on Ceph with Alluxio
 
Ceph's journey at SUSE
Ceph's journey at SUSECeph's journey at SUSE
Ceph's journey at SUSE
 
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
Red Hat Storage Day Seattle: Stabilizing Petabyte Ceph Cluster in OpenStack C...
 
Red Hat Storage Day Boston - Supermicro Super Storage
Red Hat Storage Day Boston - Supermicro Super StorageRed Hat Storage Day Boston - Supermicro Super Storage
Red Hat Storage Day Boston - Supermicro Super Storage
 
Building Scalable, Real Time Applications for Financial Services with DataStax
Building Scalable, Real Time Applications for Financial Services with DataStaxBuilding Scalable, Real Time Applications for Financial Services with DataStax
Building Scalable, Real Time Applications for Financial Services with DataStax
 
Glue con denver may 2015 sql to nosql
Glue con denver may 2015 sql to nosqlGlue con denver may 2015 sql to nosql
Glue con denver may 2015 sql to nosql
 
Red Hat Storage Day New York - New Reference Architectures
Red Hat Storage Day New York - New Reference ArchitecturesRed Hat Storage Day New York - New Reference Architectures
Red Hat Storage Day New York - New Reference Architectures
 
Running Solr in the Cloud at Memory Speed with Alluxio
Running Solr in the Cloud at Memory Speed with AlluxioRunning Solr in the Cloud at Memory Speed with Alluxio
Running Solr in the Cloud at Memory Speed with Alluxio
 
Unlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu Yong
Unlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu YongUnlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu Yong
Unlock Bigdata Analytic Efficiency with Ceph Data Lake - Zhang Jian, Fu Yong
 
Alluxio 2.0 & Near Real-time Big Data Platform w/ Spark & Alluxio
Alluxio 2.0 & Near Real-time Big Data Platform w/ Spark & AlluxioAlluxio 2.0 & Near Real-time Big Data Platform w/ Spark & Alluxio
Alluxio 2.0 & Near Real-time Big Data Platform w/ Spark & Alluxio
 
Red Hat Storage Day Seattle: Supermicro Solutions for Red Hat Ceph and Red Ha...
Red Hat Storage Day Seattle: Supermicro Solutions for Red Hat Ceph and Red Ha...Red Hat Storage Day Seattle: Supermicro Solutions for Red Hat Ceph and Red Ha...
Red Hat Storage Day Seattle: Supermicro Solutions for Red Hat Ceph and Red Ha...
 
Ceph, the future of Storage - Sage Weil
Ceph, the future of Storage - Sage WeilCeph, the future of Storage - Sage Weil
Ceph, the future of Storage - Sage Weil
 
Presentazione HPE @ VMUGIT UserCon 2015
Presentazione HPE @ VMUGIT UserCon 2015Presentazione HPE @ VMUGIT UserCon 2015
Presentazione HPE @ VMUGIT UserCon 2015
 
Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology
 

Destacado

Design a scalable social network: Problems and solutions
Design a scalable social network: Problems and solutionsDesign a scalable social network: Problems and solutions
Design a scalable social network: Problems and solutions
Chau Thanh
 

Destacado (13)

Developing High Performance Application with Aerospike & Go
Developing High Performance Application with Aerospike & GoDeveloping High Performance Application with Aerospike & Go
Developing High Performance Application with Aerospike & Go
 
Live Analytics with Go & Aerospike
Live Analytics with Go & AerospikeLive Analytics with Go & Aerospike
Live Analytics with Go & Aerospike
 
Extending Cloud Foundry UAA for Authorizations and Multi-Data Center Deployme...
Extending Cloud Foundry UAA for Authorizations and Multi-Data Center Deployme...Extending Cloud Foundry UAA for Authorizations and Multi-Data Center Deployme...
Extending Cloud Foundry UAA for Authorizations and Multi-Data Center Deployme...
 
DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...
DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...
DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...
 
Building ZingMe News Feed System
Building ZingMe News Feed SystemBuilding ZingMe News Feed System
Building ZingMe News Feed System
 
Zing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat ArchitectZing Me Real Time Web Chat Architect
Zing Me Real Time Web Chat Architect
 
Design a scalable social network: Problems and solutions
Design a scalable social network: Problems and solutionsDesign a scalable social network: Problems and solutions
Design a scalable social network: Problems and solutions
 
Inside Zalo: Developing a mobile messenger for the audience of millions - VN ...
Inside Zalo: Developing a mobile messenger for the audience of millions - VN ...Inside Zalo: Developing a mobile messenger for the audience of millions - VN ...
Inside Zalo: Developing a mobile messenger for the audience of millions - VN ...
 
Multi Data Center Strategies
Multi Data Center StrategiesMulti Data Center Strategies
Multi Data Center Strategies
 
Paxos introduction
Paxos introductionPaxos introduction
Paxos introduction
 
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
 
Cassandra EU 2012 - Netflix's Cassandra Architecture and Open Source Efforts
Cassandra EU 2012 - Netflix's Cassandra Architecture and Open Source EffortsCassandra EU 2012 - Netflix's Cassandra Architecture and Open Source Efforts
Cassandra EU 2012 - Netflix's Cassandra Architecture and Open Source Efforts
 
Introduction to Aerospike
Introduction to AerospikeIntroduction to Aerospike
Introduction to Aerospike
 

Similar a Distributing Data The Aerospike Way

fdocuments.in_aerospike-key-value-data-access.ppt
fdocuments.in_aerospike-key-value-data-access.pptfdocuments.in_aerospike-key-value-data-access.ppt
fdocuments.in_aerospike-key-value-data-access.ppt
yashsharma863914
 
Netezza Deep Dives
Netezza Deep DivesNetezza Deep Dives
Netezza Deep Dives
Rush Shah
 
Exploiting Multi Core Architectures for Process Speed Up
Exploiting Multi Core Architectures for Process Speed UpExploiting Multi Core Architectures for Process Speed Up
Exploiting Multi Core Architectures for Process Speed Up
IJERD Editor
 

Similar a Distributing Data The Aerospike Way (20)

fdocuments.in_aerospike-key-value-data-access.ppt
fdocuments.in_aerospike-key-value-data-access.pptfdocuments.in_aerospike-key-value-data-access.ppt
fdocuments.in_aerospike-key-value-data-access.ppt
 
Aerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower ManhattanAerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower Manhattan
 
You Snooze You Lose or How to Win in Ad Tech?
You Snooze You Lose or How to Win in Ad Tech?You Snooze You Lose or How to Win in Ad Tech?
You Snooze You Lose or How to Win in Ad Tech?
 
Big Data Learnings from a Vendor's Perspective
Big Data Learnings from a Vendor's PerspectiveBig Data Learnings from a Vendor's Perspective
Big Data Learnings from a Vendor's Perspective
 
Data has a better idea the in-memory data grid
Data has a better idea   the in-memory data gridData has a better idea   the in-memory data grid
Data has a better idea the in-memory data grid
 
Optimize Data Connectivity in .NET Applications
Optimize Data Connectivity in .NET ApplicationsOptimize Data Connectivity in .NET Applications
Optimize Data Connectivity in .NET Applications
 
Building a Highly Available Data Infrastructure
Building a Highly Available Data InfrastructureBuilding a Highly Available Data Infrastructure
Building a Highly Available Data Infrastructure
 
Bigdata netezza-ppt-apr2013-bhawani nandan prasad
Bigdata netezza-ppt-apr2013-bhawani nandan prasadBigdata netezza-ppt-apr2013-bhawani nandan prasad
Bigdata netezza-ppt-apr2013-bhawani nandan prasad
 
System Design.pdf
System Design.pdfSystem Design.pdf
System Design.pdf
 
MongoDB Sharding
MongoDB ShardingMongoDB Sharding
MongoDB Sharding
 
Ch9: Memory Management
Ch9: Memory ManagementCh9: Memory Management
Ch9: Memory Management
 
From Raw Data to an Interactive Data App in an Hour: Powered by Snowpark Python
From Raw Data to an Interactive Data App in an Hour: Powered by Snowpark PythonFrom Raw Data to an Interactive Data App in an Hour: Powered by Snowpark Python
From Raw Data to an Interactive Data App in an Hour: Powered by Snowpark Python
 
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
 
Boston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptxBoston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptx
 
Netezza Deep Dives
Netezza Deep DivesNetezza Deep Dives
Netezza Deep Dives
 
Manjeet Singh.pptx
Manjeet Singh.pptxManjeet Singh.pptx
Manjeet Singh.pptx
 
Ch9
Ch9Ch9
Ch9
 
Aerospike meetup july 2019 | Big Data Demystified
Aerospike meetup july 2019 | Big Data DemystifiedAerospike meetup july 2019 | Big Data Demystified
Aerospike meetup july 2019 | Big Data Demystified
 
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
 
Exploiting Multi Core Architectures for Process Speed Up
Exploiting Multi Core Architectures for Process Speed UpExploiting Multi Core Architectures for Process Speed Up
Exploiting Multi Core Architectures for Process Speed Up
 

Más de Aerospike, Inc.

Get Started with Data Science by Analyzing Traffic Data from California Highways
Get Started with Data Science by Analyzing Traffic Data from California HighwaysGet Started with Data Science by Analyzing Traffic Data from California Highways
Get Started with Data Science by Analyzing Traffic Data from California Highways
Aerospike, Inc.
 
Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...
Aerospike, Inc.
 

Más de Aerospike, Inc. (15)

Aerospike Hybrid Memory Architecture
Aerospike Hybrid Memory ArchitectureAerospike Hybrid Memory Architecture
Aerospike Hybrid Memory Architecture
 
2017 DB Trends for Powering Real-Time Systems of Engagement
2017 DB Trends for Powering Real-Time Systems of Engagement2017 DB Trends for Powering Real-Time Systems of Engagement
2017 DB Trends for Powering Real-Time Systems of Engagement
 
WEBINAR: Architectures for Digital Transformation and Next-Generation Systems...
WEBINAR: Architectures for Digital Transformation and Next-Generation Systems...WEBINAR: Architectures for Digital Transformation and Next-Generation Systems...
WEBINAR: Architectures for Digital Transformation and Next-Generation Systems...
 
Leveraging Big Data with Hadoop, NoSQL and RDBMS
Leveraging Big Data with Hadoop, NoSQL and RDBMSLeveraging Big Data with Hadoop, NoSQL and RDBMS
Leveraging Big Data with Hadoop, NoSQL and RDBMS
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
01282016 Aerospike-Docker webinar
01282016 Aerospike-Docker webinar01282016 Aerospike-Docker webinar
01282016 Aerospike-Docker webinar
 
There are 250 Database products, are you running the right one?
There are 250 Database products, are you running the right one?There are 250 Database products, are you running the right one?
There are 250 Database products, are you running the right one?
 
The role of NoSQL in the Next Generation of Financial Informatics
The role of NoSQL in the Next Generation of Financial InformaticsThe role of NoSQL in the Next Generation of Financial Informatics
The role of NoSQL in the Next Generation of Financial Informatics
 
Tectonic Shift: A New Foundation for Data Driven Business
Tectonic Shift: A New Foundation for Data Driven BusinessTectonic Shift: A New Foundation for Data Driven Business
Tectonic Shift: A New Foundation for Data Driven Business
 
What the Spark!? Intro and Use Cases
What the Spark!? Intro and Use CasesWhat the Spark!? Intro and Use Cases
What the Spark!? Intro and Use Cases
 
Get Started with Data Science by Analyzing Traffic Data from California Highways
Get Started with Data Science by Analyzing Traffic Data from California HighwaysGet Started with Data Science by Analyzing Traffic Data from California Highways
Get Started with Data Science by Analyzing Traffic Data from California Highways
 
Running a High Performance NoSQL Database on Amazon EC2 for Just $1.68/Hour
Running a High Performance NoSQL Database on Amazon EC2 for Just $1.68/HourRunning a High Performance NoSQL Database on Amazon EC2 for Just $1.68/Hour
Running a High Performance NoSQL Database on Amazon EC2 for Just $1.68/Hour
 
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACIDACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
 
Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...Flash Economics and Lessons learned from operating low latency platforms at h...
Flash Economics and Lessons learned from operating low latency platforms at h...
 
Storm Persistence and Real-Time Analytics
Storm Persistence and Real-Time AnalyticsStorm Persistence and Real-Time Analytics
Storm Persistence and Real-Time Analytics
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Ú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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Distributing Data The Aerospike Way

  • 1. DISTRIBUTING DATA THE AEROSPIKE WAY Young Paik Director, Sales Engineering Aerospike young@aerospike.com July 24, 2013
  • 2. …OR Why Is This Line Taking So Long? © 2013 Aerospike. All rights reserved. Pg. 2
  • 3. A Database Is Like A Conference Registration Line ➤ The goal is to get as many people through the line as quickly as possible. ➤ Registrants must get their own registration package, not just anyone’s. © 2013 Aerospike. All rights reserved. Pg. 3
  • 4. Scaling Throughput All databases (and registration systems) have limits to performance. The real question is how do you go beyond your current limits. There are two basic strategies: ➤ Vertical scaling – upgrade single server ➤ Horizontal scaling – distribute to multiple servers © 2013 Aerospike. All rights reserved. Pg. 4
  • 5. Vertical Scaling Vertical scaling means that if a small server can handle some traffic … a big one can handle more. This is true … to a point. © 2013 Aerospike. All rights reserved. Pg. 5
  • 6. What’s Wrong With Vertical Scaling? ➤ Expensive ➤ Still need to deal with failover.  What happens if your DB goes down?  What happens if you need to upgrade? ➤ May still not meet the storage/speed requirements ➤ Still a single point of failure © 2013 Aerospike. All rights reserved. Pg. 6
  • 7. Horizontal Scaling Horizontal Scaling means that in some way the load will be distributed among many servers. © 2013 Aerospike. All rights reserved. Pg. 7
  • 8. What Do You Want From Horizontal Scaling? ➤ Hide the complexity of distribution. ➤ Linear scalability. ➤ Better service availability. ➤ Deal with meteor strike on your data center. © 2013 Aerospike. All rights reserved. Pg. 8
  • 9. Different Distribution Models Distributed databases will place different data on different nodes. Some common methods: ➤ Simple sharding ➤ Hashed sharding ➤ Master-slave ➤ Smart partitioning © 2013 Aerospike. All rights reserved. Pg. 9
  • 10. Simple Sharding © 2013 Aerospike. All rights reserved. Pg. 10
  • 11. Simple Sharding Clients know which node has the data. © 2013 Aerospike. All rights reserved. Pg. 11
  • 12. Simple Sharding What happens if a node fails? © 2013 Aerospike. All rights reserved. Pg. 12
  • 13. Simple Sharding Pros Cons + Easy to set up. Clients are written with a knowledge of how the data is distributed. + Servers aren’t coordinated, so no intra-cluster communication is necessary. - May lead to imbalance and hot nodes - If a node fails, the data on that node is unavailable. - Adding new nodes requires reconfiguration on the clients and re- shuffling of data on the server, resulting in service down time. - Replication must be handled separately. © 2013 Aerospike. All rights reserved. Pg. 13
  • 14. Hashed Sharding © 2013 Aerospike. All rights reserved. Pg. 14
  • 15. Hashing Sharding ➤ The key can be hashed using a hashing algorithm to create a seemingly random string ➤ The first several characters of the hash can be used to determine the node for that data. Paik C820G3KH15HH3KASD43S © 2013 Aerospike. All rights reserved. Pg. 15 Instead of using the actual key value, use a hash to randomize how the data is distributed.
  • 16. Hashed Sharding Hashed sharding will balance data and load. © 2013 Aerospike. All rights reserved. Pg. 16
  • 17. Hashed Sharding But has the same problem on a node failure. © 2013 Aerospike. All rights reserved. Pg. 17
  • 18. Hashed Sharding Pros Cons + Easy to set up. Clients are written with a knowledge of how the data is distributed. + Servers aren’t coordinated, so no intra-cluster communication is necessary. + Data/traffic is now balanced. - If a node fails, the data on that node is unavailable. - Adding new nodes requires reconfiguration on the clients and re- shuffling of data on the server, resulting in service down time. - Replication must be handled separately. © 2013 Aerospike. All rights reserved. Pg. 18
  • 19. Master-Slave © 2013 Aerospike. All rights reserved. Pg. 19
  • 20. Master-Slave Master coordinates connection with slave nodes. © 2013 Aerospike. All rights reserved. Pg. 20
  • 21. Master-Slave Sharding Pros Cons + Relatively simple setup with master controlling distribution. + Replication can be set up to go to backup node. Master is responsible for coordinating. - Adding new nodes requires reconfiguration on the master and often manual re-shuffling of data on the server, resulting in service down time. - Requires multiple network connections. - Single point of failure: the master. Some databases like Mongo require 3 masters (called configuration servers) where 2 will be backups for the main one. © 2013 Aerospike. All rights reserved. Pg. 21
  • 22. Smart Partitioning The Aerospike Way © 2013 Aerospike. All rights reserved. Pg. 22
  • 23. Smart Partitioning Every registrant knows where to go. © 2013 Aerospike. All rights reserved. Pg. 23 Map
  • 24. Smart Partitioning And, every registrant knows where to go if a node fails. © 2013 Aerospike. All rights reserved. Pg. 24 Map
  • 25. Smart Partition Architecture © 2013 Aerospike. All rights reserved. Pg. 25 Cluster creates a map of how data is distributed, called a partition map. Combine features from other architectures to create a map.
  • 26. Smart Partitioning ➤ Every key is hashed using the RIPEMD160 hash function ➤ The creates a fixed 160 bits (20 bytes) string. ➤ 12 bits of this hash are used to identify the partition id ➤ There are 4096 partitions ➤ Are distributed among the nodes Paik 182023kh15hh3kahdjsh Partition ID Master node Replica node … 1 4 1820 2 3 1821 3 2 4096 4 1 © 2013 Aerospike. All rights reserved. Pg. 26 Aerospike uses a partition table
  • 27. Smart Partitioning For simplicity, let’s take a 3 node cluster with only 9 partitions and a replication factor of 2. © 2013 Aerospike. All rights reserved. Pg. 27
  • 28. Smart Partitioning Pros Cons + Relatively simple setup, with the cluster determining data distribution. + Balanced distribution. + No single point of failure. + Replication is automatic and immediate. + Failover is automatic and immediate. + Rebalancing is automatic and immediate. + An arbitrary number of nodes can be added to increase capacity. + True 24x7 uptime. Cluster can be upgraded on a rolling basis. - Application must be written using smart API. © 2013 Aerospike. All rights reserved. Pg. 28
  • 29. What Do You Want From Horizontal Scaling? ➤ Hide the complexity of distribution.  Balanced data distribution. No “hot nodes.”  Automatic client reconfiguration. No need to manually reconfigure/restart clients. ➤ Linear scalability.  Easy to calculate needed capacity.  Cluster can be an arbitrary number of nodes. ➤ Better service availability.  24 x 7 uptime. No downtime, even for “routine” maintenance.  No single point of failure.  Automatic replication of data.  Automatic failover.  Automatic rebalancing when nodes fail.  Automatic rebalancing when adding nodes. ➤ Deal with a catastrophe on your data center. © 2013 Aerospike. All rights reserved. Pg. 29
  • 30. So can you deal with a meteor hitting my data center? © 2013 Aerospike. All rights reserved. Pg. 30 But what about a meteor strike?
  • 31. Multi-Datacenter Architecture © 2013 Aerospike. All rights reserved. Pg. 31 Data Center 1 Data Center 2 Data Center 3
  • 32. Cross Data Center Replication (XDR) ➤ Asynchronous replication for long link delays and outages ➤ Namespaces configured to replicate to a destination cluster – master / slave, including star and ring ➤ Replication process  Transaction journal on partition master and replica  XDR process writes batches to destination  Transmission state shared with source replica  Retransmission in case of network fault  When data arrives back at originating cluster, transaction ID matching prevents subsequent application and forwarding ➤ In master / master replication, conflict resolution via multiple versions, or timestamp © 2013 Aerospike. All rights reserved. Confidential Pg. 32
  • 33. Caveats for Evaluating Distributed Databases When testing new databases: ➤ Make sure to test to an appropriate scale. ➤ Beware of inconsistent performance in a cloud environment. ➤ If a database has caching, make sure your use is realistic. © 2013 Aerospike. All rights reserved. Pg. 33
  • 34. THANK YOU © 2013 Aerospike. All rights reserved.

Notas del editor

  1. Welcome to distributing data the Aerospike way. This is an introductory presentation on the basics of how data can be parceled out in a distributed database. There are many ways to do this and we will be covering the plusses and minuses are for each.This is a pretty dry concept, so to make it a LITTLE more entertaining, we have an alternative, less dry title to this. Which is…
  2. You may ask: “So why this alternate title?” As you take a look at the picture there may not seem to be much similarity between the two. But this is a situation most, if not all, of us have been through and there are some real similarities.
  3. So let’s think about how you might do this on a small scale. Assume there are only 20 registrants.You would have a single table and give each person their registration package. This includes information specific to him/her. They will have their own class schedule and of course name tag.So what happens as the conference attendance grows. If you reach the point were there are thousand of registrants? How do you scale up?
  4. We have all been in lines and seen the impact that the system uses. One way is to simply scale up the hardware on your single server. Another is to distribute the load. There are a number of ways to do this.Let’s start by taking a look at vertical scaling.
  5. Vertical scaling has the virtue of being relatively simple. By making full use of the best hardware, you can handle more transactions.Because you are still dealing with a single server, you don’t have any problems with questions like:How do you distribute and map the data to different registration desks?What happens if two registrants check in at different booths?However, these benefits only work to some level. After that the minuses of this strategy become an issue.
  6. Generally, upgrading a single server is simple. But the added costs in hardware can be considerable. A 64 core server is not cheap. Everyone does what they can to keep a monolithic database up. This includesRedundant power suppliesSometimes independent power sourcesRAID diskRedundant network connectionsBut even with this, servers may still go down. In some cases this is intentional, like for maintenance and upgrades. How many of up have tried to pay a bill online on Saturday night and found that the database is down?Even with all this, you may find that the business requirements still go beyond what you can do on a single server.So let’s look at what horizontal scaling offers.
  7. Horizontal scaling means that the load and data will be distributed among many servers.There are several different strategies for this, along with different spins on each. If you are thinking about using a distributed database, there are a series of things you should look for.
  8. Horizontal scaling can provide many benefits. Let’s take a look at some of the major features.This might seem odd, but first, you want features that prevent you from having to think about having a distributed database.
  9. Simple sharding is based on distributing data according to simple patterns, like grouping people by last name.Hashed sharding is similar, but uses a computer algorithm to hash the key.Master-slave means that there is a master that helps determine what data goes where. The master controls how the data is distributed and must be consulted when accessing the data again.
  10. The cluster
  11. Horizontal scaling can provide many benefits. Let’s take a look at some of the major features.This might seem odd, but first, you want features that prevent you from having to think about having a distributed database.
  12. How do have long running task (data re-balancing and back-up) and also doing short term transaction – do not starve – real time prioritization – while still keep short term with SLAs.Shared nothing:Allows upgrading of software in a rolling way (releases are backwardly compatible)Robust way of building cluster db systemsEach of our cluster notes is identicalBunch of nodes and bunch of clients.Even though node is identical – received/send data rebalancing, needs to second or third copy of data, as you add nodes will share proportional part of the dataMakes systems operations much simpler.Clusters are tightly coupled – nodes are close to each other - millisecondClusters are self configuring.Multicast (cloud we use mesh).Everything is synchronus within a cluster.Remote clusters are asynchronous.