SlideShare une entreprise Scribd logo
1  sur  55
Télécharger pour lire hors ligne
Getting started with
Riak in the Cloud
I work with          I work with
                      Code!                Data!




Michael Brodhead                 Ines Sombra
    @mojinations                  @RandomMood
Agenda

Application
  layer



 Database
   layer
A tale of 2 apps

• One brand
 new (no code
 written)
• One in production
 running MySQL
Multiple
Regions
Multiple
Clouds
11
The Libraries
riak-client
• simple Ruby
  access to Riak's
  HTTP &
  protocol buffer
  APIs
The Libraries
Ripple
• Higher level,
  ORM interface
• ActiveModel
  based buffer APIs
Simplicity
The Libraries
dm-riak
• Already using
  DataMapper
• Hoping for trivial
  switchover
The Libraries
Riak Shim
• database.yml
• Bucket naming
• Hides JSON
• 2i
Challenges

 • Unit tests
 • Data migration
 • Deployment
Testing
Testing
Deployment
Use your app logic
How do we
 get here?
“We need a
Riak cluster”
   (@mojinations circa 3 months ago)




   ... but we have no
        hardware
Let’s do it!
Why Riak Product?
• Linearly Scalable
• Fault-tolerant
• Ops friendly
• Product lacks
 HA options
Riak @ Engine Yard
       • We’ll use it first
       • No custom Chef
       • Provisioning,
        configuration,
        monitoring, &
        backups
Your Choices

• Number of nodes
• Instance type
                     You are trying
                    to create a Riak
                     cluster. Do you
                     need any help?

• Data location
• Backend type
AWS Ops
The Riak on
 AWS slide
Instances & I/O
• Riak’s I/O patterns
• Small blobs from many
  places on disk
• EBS best at bulk reads &
writes
Instance types
• m1.large & m1.xlarge
• EBS-optimized    NEW!




• Consider PIOPS   NEW!



• High I/O Quadruple XL
 (hi1.4xlarge) - SSDs!    NEW!
Prepare
                     Yourself



More instances to compensate
for the performance variability
of virtualized resources
Cluster Sizes
• 5 nodes or more
 Best performance
 & growth
• Scales linearly
• Don’t be stingy
Ring Size
• Change default value!
• Cannot be reset
• Ring size: 256
 8/64 vnodes per node
• Don’t go above 512
Provisioning
                         Riak Cluster




 App                  MyRiakCluster: node-0

haproxy
            HTTP
             or       MyRiakCluster: node-1
          Protobuff
 App

haproxy
                      MyRiakCluster: node-2


 App
                      MyRiakCluster: node-3
haproxy



                      MyRiakCluster: node-4
Disable Swap
• Riak process pages should
 not hit swap
• Swap usage
 can result in
 unresponsive server
• Let the kernel kill it
Mount & Scheduler
• mount with noatime flag
• Use deadline scheduler
 on EBS
 cat /sys/block/xvdj1/queue/scheduler
 noop [deadline] cfq

 echo deadline > /sys/block/xvdj1/
 queue/scheduler
Linux Filesystems
• xfs, ext3
• ext4
 • barrier = 0
 • data = writeback
• ZFS not recommended
Backend choices
• Bitcask*
 • help mitigate EBS
• LevelDB           Can be
                   changed
• Memory             and
                  optimized!
Kernel Optimizations
•       /etc/sysctl.conf
 vm.swappiness = 0
 net.core.somaxconn= 4000
 net.ipv4.tcp_timestamps = 0
 net.ipv4.tcp_window_scaling = 1
 net.ipv4.tcp_max_syn_backlog = 40000
 net.ipv4.tcp_sack = 1
 net.ipv4.tcp_fin_timeout = 15
 net.ipv4.tcp_keepalive_intvl = 30
 net.ipv4.tcp_tw_reuse = 1
       http://wiki.basho.com/Linux-Performance-Tuning.html
Monitoring

• stats or riak-admin status
• Collectd & Nagios
• Riaknostic
• Riak Control (maybe soon)
Backups
• Backup both the ring and
 data directories
• Integrate with EY tools
• scp or rsync data directory
• EBS snapshots
Scaling Riak
• Vertical
riak-admin cluster replace <old> <new>



• Horizontal
 • reduces node load
 • batch is better
Benchmarks
Tests
• 5-node cluster / 5 hours
• 50 concurrent connections
• gets 10 /puts 5 /deletes 1
• Bitcask backend
• Protobuffs protocol
Medium - PIOPS 500
Medium - PIOPS 1K
Medium - Ephemeral




FAIL!
XL - EBS
XL -PIOPS 500
4XL - EBS
4XL - PIOPS 1k
What’s next?
Getting started with Riak in the Cloud

Contenu connexe

Tendances

ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
Paul Brebner
 
Deployment topologies for high availability (ha)
Deployment topologies for high availability (ha)Deployment topologies for high availability (ha)
Deployment topologies for high availability (ha)
Deepak Mane
 

Tendances (20)

Should you read Kafka as a stream or in batch? Should you even care? | Ido Na...
Should you read Kafka as a stream or in batch? Should you even care? | Ido Na...Should you read Kafka as a stream or in batch? Should you even care? | Ido Na...
Should you read Kafka as a stream or in batch? Should you even care? | Ido Na...
 
Running Spark on Cloud
Running Spark on CloudRunning Spark on Cloud
Running Spark on Cloud
 
Capture the Streams of Database Changes
Capture the Streams of Database ChangesCapture the Streams of Database Changes
Capture the Streams of Database Changes
 
Change Data Capture using Kafka
Change Data Capture using KafkaChange Data Capture using Kafka
Change Data Capture using Kafka
 
Apache Storm In Retail Context
Apache Storm In Retail ContextApache Storm In Retail Context
Apache Storm In Retail Context
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
 
Architecture of a Kafka camus infrastructure
Architecture of a Kafka camus infrastructureArchitecture of a Kafka camus infrastructure
Architecture of a Kafka camus infrastructure
 
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
 
Deployment topologies for high availability (ha)
Deployment topologies for high availability (ha)Deployment topologies for high availability (ha)
Deployment topologies for high availability (ha)
 
Building Distributed Systems With Riak and Riak Core
Building Distributed Systems With Riak and Riak CoreBuilding Distributed Systems With Riak and Riak Core
Building Distributed Systems With Riak and Riak Core
 
ストリーミングデータのアドホック分析エンジンの比較
ストリーミングデータのアドホック分析エンジンの比較ストリーミングデータのアドホック分析エンジンの比較
ストリーミングデータのアドホック分析エンジンの比較
 
How to deploy Apache Spark 
to Mesos/DCOS
How to deploy Apache Spark 
to Mesos/DCOSHow to deploy Apache Spark 
to Mesos/DCOS
How to deploy Apache Spark 
to Mesos/DCOS
 
Apache Kafka at LinkedIn
Apache Kafka at LinkedInApache Kafka at LinkedIn
Apache Kafka at LinkedIn
 
Building big data pipelines with Kafka and Kubernetes
Building big data pipelines with Kafka and KubernetesBuilding big data pipelines with Kafka and Kubernetes
Building big data pipelines with Kafka and Kubernetes
 
Queryable State for Kafka Streamsを使ってみた
Queryable State for Kafka Streamsを使ってみたQueryable State for Kafka Streamsを使ってみた
Queryable State for Kafka Streamsを使ってみた
 
The Many Faces of Apache Kafka: Leveraging real-time data at scale
The Many Faces of Apache Kafka: Leveraging real-time data at scaleThe Many Faces of Apache Kafka: Leveraging real-time data at scale
The Many Faces of Apache Kafka: Leveraging real-time data at scale
 
Stream your Operational Data with Apache Spark & Kafka into Hadoop using Couc...
Stream your Operational Data with Apache Spark & Kafka into Hadoop using Couc...Stream your Operational Data with Apache Spark & Kafka into Hadoop using Couc...
Stream your Operational Data with Apache Spark & Kafka into Hadoop using Couc...
 
Apache Kafka 0.11 の Exactly Once Semantics
Apache Kafka 0.11 の Exactly Once SemanticsApache Kafka 0.11 の Exactly Once Semantics
Apache Kafka 0.11 の Exactly Once Semantics
 
Storm worker redesign
Storm worker redesignStorm worker redesign
Storm worker redesign
 
Honest performance testing with NDBench
Honest performance testing with NDBenchHonest performance testing with NDBench
Honest performance testing with NDBench
 

En vedette

Presentation hubert delafon_140328
Presentation hubert delafon_140328Presentation hubert delafon_140328
Presentation hubert delafon_140328
ACPcef
 

En vedette (7)

From 0 to Capacity Planning
From 0 to Capacity PlanningFrom 0 to Capacity Planning
From 0 to Capacity Planning
 
We hear you like papers
We hear you like papersWe hear you like papers
We hear you like papers
 
Testing & Integration (The Remix)
 Testing & Integration (The Remix) Testing & Integration (The Remix)
Testing & Integration (The Remix)
 
Hello data
Hello dataHello data
Hello data
 
Presentation hubert delafon_140328
Presentation hubert delafon_140328Presentation hubert delafon_140328
Presentation hubert delafon_140328
 
PgPyDay
PgPyDayPgPyDay
PgPyDay
 
Architectural Patterns of Resilient Distributed Systems
 Architectural Patterns of Resilient Distributed Systems Architectural Patterns of Resilient Distributed Systems
Architectural Patterns of Resilient Distributed Systems
 

Similaire à Getting started with Riak in the Cloud

Scaling MySQL Using Fabric
Scaling MySQL Using FabricScaling MySQL Using Fabric
Scaling MySQL Using Fabric
Remote MySQL DBA
 
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
VMware Tanzu
 
In-memory Caching in HDFS: Lower Latency, Same Great Taste
In-memory Caching in HDFS: Lower Latency, Same Great TasteIn-memory Caching in HDFS: Lower Latency, Same Great Taste
In-memory Caching in HDFS: Lower Latency, Same Great Taste
DataWorks Summit
 

Similaire à Getting started with Riak in the Cloud (20)

How does Riak compare to Cassandra? [Cassandra London User Group July 2011]
How does Riak compare to Cassandra? [Cassandra London User Group July 2011]How does Riak compare to Cassandra? [Cassandra London User Group July 2011]
How does Riak compare to Cassandra? [Cassandra London User Group July 2011]
 
Open stack ha design & deployment kilo
Open stack ha design & deployment   kiloOpen stack ha design & deployment   kilo
Open stack ha design & deployment kilo
 
How does Apache Pegasus (incubating) community develop at SensorsData
How does Apache Pegasus (incubating) community develop at SensorsDataHow does Apache Pegasus (incubating) community develop at SensorsData
How does Apache Pegasus (incubating) community develop at SensorsData
 
A closer look to locaweb IaaS
A closer look to locaweb IaaSA closer look to locaweb IaaS
A closer look to locaweb IaaS
 
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
 
Scaling Social Games
Scaling Social GamesScaling Social Games
Scaling Social Games
 
Webinar - DreamObjects/Ceph Case Study
Webinar - DreamObjects/Ceph Case StudyWebinar - DreamObjects/Ceph Case Study
Webinar - DreamObjects/Ceph Case Study
 
Scalable Persistent Storage for Erlang: Theory and Practice
Scalable Persistent Storage for Erlang: Theory and PracticeScalable Persistent Storage for Erlang: Theory and Practice
Scalable Persistent Storage for Erlang: Theory and Practice
 
Scaling Spark Workloads on YARN - Boulder/Denver July 2015
Scaling Spark Workloads on YARN - Boulder/Denver July 2015Scaling Spark Workloads on YARN - Boulder/Denver July 2015
Scaling Spark Workloads on YARN - Boulder/Denver July 2015
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new features
 
Scaling MySQL Using Fabric
Scaling MySQL Using FabricScaling MySQL Using Fabric
Scaling MySQL Using Fabric
 
Scaling MySQL using Fabric
Scaling MySQL using FabricScaling MySQL using Fabric
Scaling MySQL using Fabric
 
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
 
Ceph Day Santa Clara: Ceph at DreamHost
Ceph Day Santa Clara: Ceph at DreamHost Ceph Day Santa Clara: Ceph at DreamHost
Ceph Day Santa Clara: Ceph at DreamHost
 
Real time fraud detection at 1+M scale on hadoop stack
Real time fraud detection at 1+M scale on hadoop stackReal time fraud detection at 1+M scale on hadoop stack
Real time fraud detection at 1+M scale on hadoop stack
 
Performance out
Performance outPerformance out
Performance out
 
Laying OpenStack Cinder Block Services
Laying OpenStack Cinder Block ServicesLaying OpenStack Cinder Block Services
Laying OpenStack Cinder Block Services
 
Better, faster, cheaper infrastructure with apache cloud stack and riak cs redux
Better, faster, cheaper infrastructure with apache cloud stack and riak cs reduxBetter, faster, cheaper infrastructure with apache cloud stack and riak cs redux
Better, faster, cheaper infrastructure with apache cloud stack and riak cs redux
 
MySQL in the Cloud
MySQL in the CloudMySQL in the Cloud
MySQL in the Cloud
 
In-memory Caching in HDFS: Lower Latency, Same Great Taste
In-memory Caching in HDFS: Lower Latency, Same Great TasteIn-memory Caching in HDFS: Lower Latency, Same Great Taste
In-memory Caching in HDFS: Lower Latency, Same Great Taste
 

Plus de Ines Sombra

Plus de Ines Sombra (11)

Agile, Rugged, and Lean - The Paper Edition
Agile, Rugged, and Lean - The Paper EditionAgile, Rugged, and Lean - The Paper Edition
Agile, Rugged, and Lean - The Paper Edition
 
Data antipatterns NYC Devops - 2014
Data antipatterns NYC Devops - 2014Data antipatterns NYC Devops - 2014
Data antipatterns NYC Devops - 2014
 
Computational Patterns of the Cloud - QCon NYC 2014
Computational Patterns of the Cloud - QCon NYC 2014Computational Patterns of the Cloud - QCon NYC 2014
Computational Patterns of the Cloud - QCon NYC 2014
 
How the Cloud is changing the world
How the Cloud is changing the worldHow the Cloud is changing the world
How the Cloud is changing the world
 
NoSQL Databases in the Cloud - Great Wide Open 2014
NoSQL Databases in the Cloud - Great Wide Open 2014NoSQL Databases in the Cloud - Great Wide Open 2014
NoSQL Databases in the Cloud - Great Wide Open 2014
 
Relational Databases in the Cloud - Great Wide Open 2014
Relational Databases in the Cloud - Great Wide Open 2014Relational Databases in the Cloud - Great Wide Open 2014
Relational Databases in the Cloud - Great Wide Open 2014
 
Data Antipatterns
Data AntipatternsData Antipatterns
Data Antipatterns
 
Ricon east
Ricon eastRicon east
Ricon east
 
Riak at Engine Yard Cloud
Riak at Engine Yard CloudRiak at Engine Yard Cloud
Riak at Engine Yard Cloud
 
Postgres Open
Postgres OpenPostgres Open
Postgres Open
 
North Bay Ruby Meetup 101911
North Bay Ruby Meetup 101911North Bay Ruby Meetup 101911
North Bay Ruby Meetup 101911
 

Dernier

Dernier (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Getting started with Riak in the Cloud