SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
©2014 DataStax
@tjake
T Jake Luciani

Apache Cassandra Committer & PMC
Proof-of-Concept to Production
1
©2014 DataStax
The way we build software
1. Proof of Concept
2. ??
3. Production
4. Profit! 
2
Do Nothing!
Preparation!
Development
Testing
Performance
Operations
Monitoring
©2013 DataStax Confidential. Do not distribute without consent.
Cassandra Preparation
• Going to production with C* you must validate your assumptions and
have a plan for when you:
• loose nodes, disks, networks
• have spikes of traffic 
• need to add more nodes
• upgrade cassandra, java, hardware
• …
3
Plan for all the nightmare
scenarios. This gives you
confidence in your system
©2013 DataStax Confidential. Do not distribute without consent.
Before we begin
• Be comfortable on the command line! 
• When something is going wrong you need to be able to get to the
problem quickly and ask the write questions. Provide diagnostic
information.
• cassandra: nodetool, cqlsh 
• disk: iostat
• cpu: top/htop
• network: iftop
• java: jstatd, jstack, jmx, visualvm (ok not command line)
!
• cssh (csshx on osx)
4
©2013 DataStax Confidential. Do not distribute without consent.
Phase 1: DataModeling
• You’ve modeled your application in Cassandra
• You’ve de-normalized based on queries
!
• Stop. Stress test time…
• C* 2.1 native CQL stress tool (works with 2.0)
• CASSANDRA-6164
• https://github.com/tjake/cassandra/archive/6164.zip
5
©2013 DataStax Confidential. Do not distribute without consent.
CQL Stress tool
• Why? Because you can push your cluster to the limit, see how *your*
queries run on *your* hardware
!
• cassandra-stress write -schema yaml=my.yaml
!
• cassandra-stress read -schema yaml=my.yaml query=simple1
6
©2013 DataStax Confidential. Do not distribute without consent.
CQL Stress
7
YAML File + Demo
©2013 DataStax Confidential. Do not distribute without consent. 8
Drain Dump
©2013 DataStax Confidential. Do not distribute without consent.
Hardware
• Currently C* isn’t well suited for > 1TB per node
• Except DSE Hadoop nodes which can be much larger
!
• Ideally 1U or smaller (blades)
• separate network, power, disk
!
• If you have larger machines
• VMs with disk per vm
• Containers?
!
• EC2 use I2 instances
9
©2013 DataStax Confidential. Do not distribute without consent.
Unix level stuff
• turn off swap
• turn off cpuspeed
• switch to deadline kernel scheduler
• socket buffers resize
• install numactl
• raise limits.conf esp (nofile and 
• stress your disks using something like bonnie++ to get a idea of the
raw limits
10
©2013 DataStax Confidential. Do not distribute without consent.
Deployment
• Chef/Puppet/Ansible/etc
!
• Simpler rollout and rollback
!
• You should release your artifacts to a central location
!
• Do this for Cassandra too
• Makes upgrades easier
11
©2013 DataStax Confidential. Do not distribute without consent.
Monitoring
• Stress your system and learn where it breaks down
• Use that to create your alerts
!
• Know your SLAs
• Define them at each layer of your architecture
!
• OpsCenter for all things C*
!
• You can also easily integrate C* metrics into other metrics systems
• http://www.datastax.com/dev/blog/pluggable-metrics-reporting-in-cassandra-2-0-2
12
©2013 DataStax Confidential. Do not distribute without consent.
C* Monitoring
• Specific to C* things to monitor
• pending compactions
• exception count
• disk space
13
©2013 DataStax Confidential. Do not distribute without consent.
Cassandra Ops
• Understand operational basics like:
• bootstrapping
• repair
• rebuild
• scrub
14
©2013 DataStax Confidential. Do not distribute without consent.
Choose your own consistency
• When things go wrong you are in control
• Build consistency controls into your application
• In a pinch you can lower consistency and stay available
15
©2013 DataStax Confidential. Do not distribute without consent.
Backups
• Backups in C* are primarily to avoid human error
• C* provides lightweight local snapshots
• Traditional full backup of data in C* is hard todo
• Your data needs to be de-duped since each nodes files contain data
from many replicas
• If you need full traditional backup you are best to do full machine
backups 
• At a minimum backup system tables (incase you loose the entire box)
16
©2013 DataStax Confidential. Do not distribute without consent.
Cassandra upgrades
• Read the release notes! NEWS.txt
• Read the change log! CHANGES.txt
• Understand the changes and how they impact your system
!
!
• Do this even if you don’t plan on upgrading. 
• Someone else may have fixed a potential issue for you.
!
• Always snapshot your data before upgrading
17
©2013 DataStax Confidential. Do not distribute without consent.
Canary node
• When rolling out a new version of C* or your application, roll it out only
to a single node and watch it
• Quickly see if something is terribly wrong
• Gives you ability to verify new functionality before full rollout
18
©2013 DataStax Confidential. Do not distribute without consent.
Pre-Prod Environments
• Hard to do in large scale systems
• Requires work like replaying traffic to second cluster
• Doesn’t need to be 1:1 but offer a subset of real data to test with
19
©2013 DataStax Confidential. Do not distribute without consent.
C* level stuff
• cassandra.yaml
• Use stress to size your write and read pools
• internode_compression: dc
• lower request timeouts (improves tail latency)
• set concurrent compactors to 1/4 your cores
• in 2.1 we have off heap memtable
• Turn on Authentication
• Keeps you/apps from accidentally connecting to prod
20
©2013 DataStax Confidential. Do not distribute without consent.
Thanks!
21
Questions?
!
@tjake

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (17)

OpenNebulaConf2018 - UCLouvain Case Study: VDI for 37,000 students with OpenN...
OpenNebulaConf2018 - UCLouvain Case Study: VDI for 37,000 students with OpenN...OpenNebulaConf2018 - UCLouvain Case Study: VDI for 37,000 students with OpenN...
OpenNebulaConf2018 - UCLouvain Case Study: VDI for 37,000 students with OpenN...
 
OpenNebula in a Multiuser Environment
OpenNebula in a Multiuser EnvironmentOpenNebula in a Multiuser Environment
OpenNebula in a Multiuser Environment
 
Giles Sirett - welcome and CloudStack news
Giles Sirett - welcome and CloudStack news Giles Sirett - welcome and CloudStack news
Giles Sirett - welcome and CloudStack news
 
How to deliver High Performance OpenStack Cloud: Christoph Dwertmann, Vault S...
How to deliver High Performance OpenStack Cloud: Christoph Dwertmann, Vault S...How to deliver High Performance OpenStack Cloud: Christoph Dwertmann, Vault S...
How to deliver High Performance OpenStack Cloud: Christoph Dwertmann, Vault S...
 
Looking at RAC, GI/Clusterware Diagnostic Tools
Looking at RAC,   GI/Clusterware Diagnostic Tools Looking at RAC,   GI/Clusterware Diagnostic Tools
Looking at RAC, GI/Clusterware Diagnostic Tools
 
Cloudweaver commercial keynote
Cloudweaver commercial keynoteCloudweaver commercial keynote
Cloudweaver commercial keynote
 
Simple flexible deployments with openstack ansible
Simple flexible deployments with openstack ansibleSimple flexible deployments with openstack ansible
Simple flexible deployments with openstack ansible
 
Jurijs Velikanovs - RAC Attack 101 - How to install 12c RAC on your laptop
Jurijs Velikanovs -  RAC Attack 101 - How to install 12c RAC on your laptop  Jurijs Velikanovs -  RAC Attack 101 - How to install 12c RAC on your laptop
Jurijs Velikanovs - RAC Attack 101 - How to install 12c RAC on your laptop
 
Adventures in Research
Adventures in ResearchAdventures in Research
Adventures in Research
 
Hostvn ceph in production v1.1 dungtq
Hostvn   ceph in production v1.1 dungtqHostvn   ceph in production v1.1 dungtq
Hostvn ceph in production v1.1 dungtq
 
OVHcloud Hosted Private Cloud Platform Network use cases with VMware NSX
OVHcloud Hosted Private Cloud Platform Network use cases with VMware NSXOVHcloud Hosted Private Cloud Platform Network use cases with VMware NSX
OVHcloud Hosted Private Cloud Platform Network use cases with VMware NSX
 
OpenStack Summit Vancouver: Lessons learned on upgrades
OpenStack Summit Vancouver:  Lessons learned on upgradesOpenStack Summit Vancouver:  Lessons learned on upgrades
OpenStack Summit Vancouver: Lessons learned on upgrades
 
Ceph Day Melbourne - Scale and performance: Servicing the Fabric and the Work...
Ceph Day Melbourne - Scale and performance: Servicing the Fabric and the Work...Ceph Day Melbourne - Scale and performance: Servicing the Fabric and the Work...
Ceph Day Melbourne - Scale and performance: Servicing the Fabric and the Work...
 
TryStack: A Sandbox for OpenStack Users and Admins
TryStack: A Sandbox for OpenStack Users and AdminsTryStack: A Sandbox for OpenStack Users and Admins
TryStack: A Sandbox for OpenStack Users and Admins
 
Openstack trystack
Openstack   trystack Openstack   trystack
Openstack trystack
 
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
OpenNebulaConf2018 - 5 Things We Wish We Knew Before Deploying OpenNebula in ...
 
A Tour of Internal Accumulo Testing
A Tour of Internal Accumulo TestingA Tour of Internal Accumulo Testing
A Tour of Internal Accumulo Testing
 

Ähnlich wie Cassandra Day NY 2014: From Proof of Concept to Production

NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5
UniFabric
 
Windows optimization and customization
Windows optimization and customizationWindows optimization and customization
Windows optimization and customization
Hiren Mayani
 

Ähnlich wie Cassandra Day NY 2014: From Proof of Concept to Production (20)

NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5NGENSTOR_ODA_P2V_V5
NGENSTOR_ODA_P2V_V5
 
Provisioning Servers Made Easy
Provisioning Servers Made EasyProvisioning Servers Made Easy
Provisioning Servers Made Easy
 
The Highs and Lows of Stateful Containers
The Highs and Lows of Stateful ContainersThe Highs and Lows of Stateful Containers
The Highs and Lows of Stateful Containers
 
Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...
Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...
Lessons Learned From Running 1800 Clusters (Brooke Jensen, Instaclustr) | Cas...
 
Hadoop Operations: Keeping the Elephant Running Smoothly
Hadoop Operations: Keeping the Elephant Running SmoothlyHadoop Operations: Keeping the Elephant Running Smoothly
Hadoop Operations: Keeping the Elephant Running Smoothly
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
Life After Sharding: Monitoring and Management of a Complex Data Cloud
Life After Sharding: Monitoring and Management of a Complex Data CloudLife After Sharding: Monitoring and Management of a Complex Data Cloud
Life After Sharding: Monitoring and Management of a Complex Data Cloud
 
Operating OpenStack on a Budget
Operating OpenStack on a BudgetOperating OpenStack on a Budget
Operating OpenStack on a Budget
 
Operating OpenStack on a Budget
Operating OpenStack on a BudgetOperating OpenStack on a Budget
Operating OpenStack on a Budget
 
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
 
Introduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolIntroduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning Tool
 
Open west 2015 talk ben coverston
Open west 2015 talk ben coverstonOpen west 2015 talk ben coverston
Open west 2015 talk ben coverston
 
Joel Jacobson (Datastax) - Diagnosing Cassandra Problems in Production
Joel Jacobson (Datastax) - Diagnosing Cassandra Problems in ProductionJoel Jacobson (Datastax) - Diagnosing Cassandra Problems in Production
Joel Jacobson (Datastax) - Diagnosing Cassandra Problems in Production
 
Windows optimization and customization
Windows optimization and customizationWindows optimization and customization
Windows optimization and customization
 
Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?
 
Advanced Operations
Advanced OperationsAdvanced Operations
Advanced Operations
 
Diagnosing Problems in Production (Nov 2015)
Diagnosing Problems in Production (Nov 2015)Diagnosing Problems in Production (Nov 2015)
Diagnosing Problems in Production (Nov 2015)
 
How to Build a Compute Cluster
How to Build a Compute ClusterHow to Build a Compute Cluster
How to Build a Compute Cluster
 
Developing a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure EnvironmentsDeveloping a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure Environments
 

Mehr von DataStax Academy

Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
DataStax Academy
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
DataStax Academy
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 

Mehr von DataStax Academy (20)

Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftForrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraIntroduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
 
Cassandra 3.0 Data Modeling
Cassandra 3.0 Data ModelingCassandra 3.0 Data Modeling
Cassandra 3.0 Data Modeling
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
 
Data Modeling for Apache Cassandra
Data Modeling for Apache CassandraData Modeling for Apache Cassandra
Data Modeling for Apache Cassandra
 
Coursera Cassandra Driver
Coursera Cassandra DriverCoursera Cassandra Driver
Coursera Cassandra Driver
 
Production Ready Cassandra
Production Ready CassandraProduction Ready Cassandra
Production Ready Cassandra
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
 
Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core Concepts
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
 
Bad Habits Die Hard
Bad Habits Die Hard Bad Habits Die Hard
Bad Habits Die Hard
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
 
Advanced Cassandra
Advanced CassandraAdvanced Cassandra
Advanced Cassandra
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Cassandra Day NY 2014: From Proof of Concept to Production

  • 1. ©2014 DataStax @tjake T Jake Luciani
 Apache Cassandra Committer & PMC Proof-of-Concept to Production 1
  • 2. ©2014 DataStax The way we build software 1. Proof of Concept 2. ?? 3. Production 4. Profit! 2 Do Nothing! Preparation! Development Testing Performance Operations Monitoring
  • 3. ©2013 DataStax Confidential. Do not distribute without consent. Cassandra Preparation • Going to production with C* you must validate your assumptions and have a plan for when you: • loose nodes, disks, networks • have spikes of traffic • need to add more nodes • upgrade cassandra, java, hardware • … 3 Plan for all the nightmare scenarios. This gives you confidence in your system
  • 4. ©2013 DataStax Confidential. Do not distribute without consent. Before we begin • Be comfortable on the command line! • When something is going wrong you need to be able to get to the problem quickly and ask the write questions. Provide diagnostic information. • cassandra: nodetool, cqlsh • disk: iostat • cpu: top/htop • network: iftop • java: jstatd, jstack, jmx, visualvm (ok not command line) ! • cssh (csshx on osx) 4
  • 5. ©2013 DataStax Confidential. Do not distribute without consent. Phase 1: DataModeling • You’ve modeled your application in Cassandra • You’ve de-normalized based on queries ! • Stop. Stress test time… • C* 2.1 native CQL stress tool (works with 2.0) • CASSANDRA-6164 • https://github.com/tjake/cassandra/archive/6164.zip 5
  • 6. ©2013 DataStax Confidential. Do not distribute without consent. CQL Stress tool • Why? Because you can push your cluster to the limit, see how *your* queries run on *your* hardware ! • cassandra-stress write -schema yaml=my.yaml ! • cassandra-stress read -schema yaml=my.yaml query=simple1 6
  • 7. ©2013 DataStax Confidential. Do not distribute without consent. CQL Stress 7 YAML File + Demo
  • 8. ©2013 DataStax Confidential. Do not distribute without consent. 8 Drain Dump
  • 9. ©2013 DataStax Confidential. Do not distribute without consent. Hardware • Currently C* isn’t well suited for > 1TB per node • Except DSE Hadoop nodes which can be much larger ! • Ideally 1U or smaller (blades) • separate network, power, disk ! • If you have larger machines • VMs with disk per vm • Containers? ! • EC2 use I2 instances 9
  • 10. ©2013 DataStax Confidential. Do not distribute without consent. Unix level stuff • turn off swap • turn off cpuspeed • switch to deadline kernel scheduler • socket buffers resize • install numactl • raise limits.conf esp (nofile and • stress your disks using something like bonnie++ to get a idea of the raw limits 10
  • 11. ©2013 DataStax Confidential. Do not distribute without consent. Deployment • Chef/Puppet/Ansible/etc ! • Simpler rollout and rollback ! • You should release your artifacts to a central location ! • Do this for Cassandra too • Makes upgrades easier 11
  • 12. ©2013 DataStax Confidential. Do not distribute without consent. Monitoring • Stress your system and learn where it breaks down • Use that to create your alerts ! • Know your SLAs • Define them at each layer of your architecture ! • OpsCenter for all things C* ! • You can also easily integrate C* metrics into other metrics systems • http://www.datastax.com/dev/blog/pluggable-metrics-reporting-in-cassandra-2-0-2 12
  • 13. ©2013 DataStax Confidential. Do not distribute without consent. C* Monitoring • Specific to C* things to monitor • pending compactions • exception count • disk space 13
  • 14. ©2013 DataStax Confidential. Do not distribute without consent. Cassandra Ops • Understand operational basics like: • bootstrapping • repair • rebuild • scrub 14
  • 15. ©2013 DataStax Confidential. Do not distribute without consent. Choose your own consistency • When things go wrong you are in control • Build consistency controls into your application • In a pinch you can lower consistency and stay available 15
  • 16. ©2013 DataStax Confidential. Do not distribute without consent. Backups • Backups in C* are primarily to avoid human error • C* provides lightweight local snapshots • Traditional full backup of data in C* is hard todo • Your data needs to be de-duped since each nodes files contain data from many replicas • If you need full traditional backup you are best to do full machine backups • At a minimum backup system tables (incase you loose the entire box) 16
  • 17. ©2013 DataStax Confidential. Do not distribute without consent. Cassandra upgrades • Read the release notes! NEWS.txt • Read the change log! CHANGES.txt • Understand the changes and how they impact your system ! ! • Do this even if you don’t plan on upgrading. • Someone else may have fixed a potential issue for you. ! • Always snapshot your data before upgrading 17
  • 18. ©2013 DataStax Confidential. Do not distribute without consent. Canary node • When rolling out a new version of C* or your application, roll it out only to a single node and watch it • Quickly see if something is terribly wrong • Gives you ability to verify new functionality before full rollout 18
  • 19. ©2013 DataStax Confidential. Do not distribute without consent. Pre-Prod Environments • Hard to do in large scale systems • Requires work like replaying traffic to second cluster • Doesn’t need to be 1:1 but offer a subset of real data to test with 19
  • 20. ©2013 DataStax Confidential. Do not distribute without consent. C* level stuff • cassandra.yaml • Use stress to size your write and read pools • internode_compression: dc • lower request timeouts (improves tail latency) • set concurrent compactors to 1/4 your cores • in 2.1 we have off heap memtable • Turn on Authentication • Keeps you/apps from accidentally connecting to prod 20
  • 21. ©2013 DataStax Confidential. Do not distribute without consent. Thanks! 21 Questions? ! @tjake