SlideShare uma empresa Scribd logo
1 de 39
Aerospike : High Performance NoSQL
Store with Flash Optimization
Gagan Agrawal, Sr. Principal Engineer,
Snapdeal
Agenda
•
What is Aerospike
•
Aerospike Architecture
•
Data Model
•
Demo
•
UDF & Aggregation framework
•
Aerospike @ Snapdeal
What is Aerospike ?
Aerospike
•
Distributed and Scalable Key Value Store
•
Designed for Flash Optimized Storage
•
99% < 1 millisecond
•
1 M TPS / 100 TB
•
100% Uptime with strong consistency (ACID)
•
Available in Community and Enterprise editions
Comparison
Aerospike Architecture
Architecture Objectives
•
To create flexible and scalable platform
•
To provide robustness and reliability (ACID)
•
To provide Operational Efficiency
Architecture
3 Layers
•
Cluster aware Client Layer
– Track Nodes
– Know where data resides in Cluster
– Implements its own TCP/IP connection pool
•
Self Managing Clustering and Data Distribution
Layer
– Automatic fail over
– Replication
– Intelligent Re-balancing and data migration
•
Flash Optimized Data Storage Layer
– Stores data in RAM and Flash
Cluster Layer
●
Cluster Management Module
– Tracks Nodes in the Cluster
– Paxos like consensus voting process
●
Data Migration Module
– Balances distribution of data
– Ensures data duplication as per replication factor
●
Transaction Processing Module
– Sync / Async Replication
– Proxy
– Duplicate Resolution
Cluster Formation
Data Storage Layer
Data Storage Layer
•
Designed for speed
•
Can operate all in-memory or with flash storage
•
100 Million keys take up only 6.4 GB
•
Log Structured
•
Writes to disk are performed in large blocks
•
Bypasses standard file system
•
Built in Smart Defragmenter and Intelligent
Evictor
Scales on Commodity Server
•
Each server scales to manage upto 16TB data
•
Parallel access to up to 20 SSDs
•
Scales out linearly with each identical server
•
Battle tested with 100TB+ across the cluster
XDR Architecture
Data Model
Data Hierarchy
•
Namespace (Database)
•
Set (Table)
•
Record (Row)
•
Bins (Columns)
How Data is Organized
Namespace
•
Storage definition- DRAM or Flash
– Storage block size (128k – 2MB)
– Controls size of Ram and Storage
•
Policy Container
– Replicator Factor
– Default Expiry
•
Data Container
– Namespace contains Set
– Set contains Records
Set
•
Similar To Table
•
But has no Schema
•
Inherits policy from NS
•
Prefix to Primary Key
•
Name <= 63 chars
•
1023 per Namespace
•
Cannot be deleted or renamed
Record
•
A record is row of key-value
•
Value : one or more bins
•
Bin has a name and type
– Types : String,Integer,Blob,List,Map, Large Data Types
(LDT)
•
Bins can be added at any time
•
Generation Counter
– Optimistic Concurrency
•
Time-to-live
– Auto Expiration
Bins
•
Bins have a:
– Name : 14 character or less
– Type : one of following
●
String, Integer, Blob, List, Map
●
Large Data Types
– Large Ordered List
– Large Map
•
Bins are stored in the record
•
A Bin can have different type in another record
Bins
Id lname fname address favorites
1 Able John 123 First Cats, dogs,
mice
2 Baker Kris 234
Second
3 Charlie
4 Delta Moe 456 Fourth Stake, ice
cream
apples
Type Mapping
●
Types are mapped to equivalent language type
Demo and Code Samples
Data Modeling
●
Focus on how you will query the data
– All Tweets from a given user
– Give me the last 10 Tweets for a given user
– Last 10 Tweets for all users
– How many users Tweeted in last X minutes
Data Modeling - RDBMS
Data Modeling - Aerospike
●
Users
– Namespace : test, Set : users,
– Key : <username>
– Bins
●
username
●
password
●
gender
●
lasttweeted (timestamp)
●
tweetcount (total count)
Data Modeling - Aerospike
●
Tweets
– Namespace : test, Set : users,
– Key : <username:<counter>>
– Bins
●
tweet
●
ts
●
username
Secondary Index
●
Value based lookup
●
Query is sent to all nodes in the cluster in parallel
●
Best for low selectivity indexes
– Result set of 1k to 1million
Secondary Index
UDF & Aggregation Framework
UDF
●
Move compute close to data
●
UDFs are common in many databases
– MySQL
– SQL Server
– Oracle
– DB2
UDF
●
Written in Lua
●
Record oriented
– acts on a single record (row)
●
Stream oriented
– Acts on a stream of records resulting from a Query
●
Using UDFs you can move processing to the same
node as the data
Example UDF
Aggregations
●
Programmatic framework similar to Map Reduce
●
Processes a collection of rows
●
Primarily used for counts, aggregate and sums
●
Runs in parallel on all cluster nodes
●
Lua for function language
●
Reduce in the client
Aggregations
Aerospike @ Snapdeal
Aerospike : High Performance NoSQL Store with Flash Optimization

Mais conteúdo relacionado

Último

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Último (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Aerospike : High Performance NoSQL Store with Flash Optimization

  • 1. Aerospike : High Performance NoSQL Store with Flash Optimization Gagan Agrawal, Sr. Principal Engineer, Snapdeal
  • 2. Agenda • What is Aerospike • Aerospike Architecture • Data Model • Demo • UDF & Aggregation framework • Aerospike @ Snapdeal
  • 4. Aerospike • Distributed and Scalable Key Value Store • Designed for Flash Optimized Storage • 99% < 1 millisecond • 1 M TPS / 100 TB • 100% Uptime with strong consistency (ACID) • Available in Community and Enterprise editions
  • 7. Architecture Objectives • To create flexible and scalable platform • To provide robustness and reliability (ACID) • To provide Operational Efficiency
  • 9. 3 Layers • Cluster aware Client Layer – Track Nodes – Know where data resides in Cluster – Implements its own TCP/IP connection pool • Self Managing Clustering and Data Distribution Layer – Automatic fail over – Replication – Intelligent Re-balancing and data migration • Flash Optimized Data Storage Layer – Stores data in RAM and Flash
  • 10. Cluster Layer ● Cluster Management Module – Tracks Nodes in the Cluster – Paxos like consensus voting process ● Data Migration Module – Balances distribution of data – Ensures data duplication as per replication factor ● Transaction Processing Module – Sync / Async Replication – Proxy – Duplicate Resolution
  • 13. Data Storage Layer • Designed for speed • Can operate all in-memory or with flash storage • 100 Million keys take up only 6.4 GB • Log Structured • Writes to disk are performed in large blocks • Bypasses standard file system • Built in Smart Defragmenter and Intelligent Evictor
  • 14. Scales on Commodity Server • Each server scales to manage upto 16TB data • Parallel access to up to 20 SSDs • Scales out linearly with each identical server • Battle tested with 100TB+ across the cluster
  • 17. Data Hierarchy • Namespace (Database) • Set (Table) • Record (Row) • Bins (Columns)
  • 18. How Data is Organized
  • 19. Namespace • Storage definition- DRAM or Flash – Storage block size (128k – 2MB) – Controls size of Ram and Storage • Policy Container – Replicator Factor – Default Expiry • Data Container – Namespace contains Set – Set contains Records
  • 20. Set • Similar To Table • But has no Schema • Inherits policy from NS • Prefix to Primary Key • Name <= 63 chars • 1023 per Namespace • Cannot be deleted or renamed
  • 21. Record • A record is row of key-value • Value : one or more bins • Bin has a name and type – Types : String,Integer,Blob,List,Map, Large Data Types (LDT) • Bins can be added at any time • Generation Counter – Optimistic Concurrency • Time-to-live – Auto Expiration
  • 22. Bins • Bins have a: – Name : 14 character or less – Type : one of following ● String, Integer, Blob, List, Map ● Large Data Types – Large Ordered List – Large Map • Bins are stored in the record • A Bin can have different type in another record
  • 23. Bins Id lname fname address favorites 1 Able John 123 First Cats, dogs, mice 2 Baker Kris 234 Second 3 Charlie 4 Delta Moe 456 Fourth Stake, ice cream apples
  • 24. Type Mapping ● Types are mapped to equivalent language type
  • 25. Demo and Code Samples
  • 26. Data Modeling ● Focus on how you will query the data – All Tweets from a given user – Give me the last 10 Tweets for a given user – Last 10 Tweets for all users – How many users Tweeted in last X minutes
  • 28. Data Modeling - Aerospike ● Users – Namespace : test, Set : users, – Key : <username> – Bins ● username ● password ● gender ● lasttweeted (timestamp) ● tweetcount (total count)
  • 29. Data Modeling - Aerospike ● Tweets – Namespace : test, Set : users, – Key : <username:<counter>> – Bins ● tweet ● ts ● username
  • 30. Secondary Index ● Value based lookup ● Query is sent to all nodes in the cluster in parallel ● Best for low selectivity indexes – Result set of 1k to 1million
  • 32. UDF & Aggregation Framework
  • 33. UDF ● Move compute close to data ● UDFs are common in many databases – MySQL – SQL Server – Oracle – DB2
  • 34. UDF ● Written in Lua ● Record oriented – acts on a single record (row) ● Stream oriented – Acts on a stream of records resulting from a Query ● Using UDFs you can move processing to the same node as the data
  • 36. Aggregations ● Programmatic framework similar to Map Reduce ● Processes a collection of rows ● Primarily used for counts, aggregate and sums ● Runs in parallel on all cluster nodes ● Lua for function language ● Reduce in the client