SlideShare une entreprise Scribd logo
1  sur  23
Presented By: Shubhrank Rastogi
Monitoring Cassandra
with an EYE
Agenda
01
● A little about Cassandra
● Cassandra Internal Concepts
○ Read Path
○ Write Path
○ Compactions
○ JVM GC
● Quick Q’s on Metrics, Monitoring
● Monitoring Cassandra
● Categories wise - Metrics with Visuals
Quick Overview - About Cassandra
● Apache Cassandra is a free and open-source, distributed, wide column store,
NoSQL database management system designed to handle large amounts of
data across many commodity servers, providing high availability with no single
point of failure.
● A Cassandra cluster has no special nodes i.e. the cluster has no masters, no slaves
or elected leaders.
● It provides various features:
○ Fault-tolerant
○ Scalable
○ Distributed
○ Tunable consistency
Let’s Take a PATH - WRITE PATH
● A write request for Cassandra follows the following path at node level:
WRITE PATH - Cont.
● A write request for Cassandra follows the following path at cluster level:
Let’s Take a PATH - READ PATH
● The read request follows the following path at SSTable level:
Compactions is necessary!
○ Why?
■to save disk space.
■to clean redundant data.
■to make response faster.
○ How cassandra stores data?
■adds data by timstamping.
■generates mulitple SSTables.
○ Why is it bad?
■Data utilization is high.
■response time is high.
○ Solution:
■remove redundant data with the help of
Tombstones
■generates ONE sstable throughout cluster.
JVM GC to the rescue!
● Cassandra process is run on JVM, using off-heap and in-heap
memory for its components.
● One situation that you definitely want to minimize
○ garbage collection pause aka stop-the-world event
● A pause occurs when a region of memory is full and its effects:
○ operations are suspended.
○ node can appear as down to other nodes.
○ the JVM needs to make space to continue.
○ Read/Write operations will wait, increases Read/Write
Latency.
Why do we need Metrics of
anything?
To measure something or
Probably to Monitor
something.
And why do we need to
Monitor something?
●To make that something successful for long
run
●To detect anomalies and see future
●To optimize that something
●To improve that something
●To save some $$$$
“ Necessity is the mother of
Invention and to make that
Invention successful, we need
to Monitor it. ”
Now Let’s MONITOR Cassandra
● What we can monitor in cassandra?
○ Performance
■Write Path
■Read Path
○ Capacity (Resources)
■Server/Node
■JVM
○ Operations
■Compactions
■Eventual Consistency
Performance based - Metrics
● Read and Write Latency in READ and WRITE PATH
○ The recent read latency and write latency counters are important in making sure operations are happening
in a consistent manner.
○ Effected by -
■Replication factor
■Compactions (Improves READ only)
■MemTable Flush
Cont:
● LiveSStable count - No. of SStables for a table in all keyspaces, or you can be more generic like to a specific
keyspace and table.
○ (Read Latency, Disk Usage) is directly proportional to Live SSTable count.
○ Compaction follows a strategy and uses a large amount of CPU
Cont:
● ThreadPool
○ Each of the thread pools provides statistics on the number of tasks that are active, pending, and
completed.
○ Metrics:
■PendingTasks
■CompletedTasks
○ Trends on these pools for increases in the pending task column indicate when to add additional capacity.
● MemTable flush count
○ Configuring memtable thresholds can improve write performance by creating SSTables.
○ it executes when the commit log space threshold or the memtable cleanup threshold has been exceeded.
○ How you tune memtable thresholds depends on your data and write load. Increase memtable thresholds
under either of these conditions:
■The write load includes a high volume of updates on a smaller set of data.
■A steady stream of continuous writes occurs.
Cont:
Operations based: Metrics
● Compactions
○ Metrics
■PendingTasks
■CompletedTasks
○ Monitoring compaction performance is an important aspect of knowing when to add capacity to your
cluster.
○ Compactions affects both paths READ and WRITE, indirectly or directly.
● Eventual Consistency
tells us how consistent is our data replication across nodes.
○ HintedHandoff Metrics
keeps track of data which has been replicated to nodes yet.
■Hints_created: number of hinted key space created.)
○ Every data that is stored in cassandra would be replicated across the cluster based on its replication
factor.
○ When coordinator node couldn’t write to replicas node, it would store the data on it self, then re-attempt to
write to replica node if the replica node available.
Cont:
Resources based - Metrics
● JVM based resources
○ Metrics:
■JVM_gc_collection_seconds_count
■JVM_heap_memory_bytes_used
■JVM_memory_pool_bytes_used
REFERENCES:
● https://docs.datastax.com/en/ddac/doc/datastax_enterprise/ddacAdminGettingStarted.html
● https://thelastpickle.com/blog/2018/04/11/gc-tuning.html
● https://thelastpickle.com/blog/2017/03/16/compaction-nuance.html
● https://thelastpickle.com/blog/2011/04/28/Forces-of-Write-and-Read.html
● https://www.datadoghq.com/blog/how-to-monitor-cassandra-performance-metrics/
● https://medium.com/prismapp/how-do-we-monitor-cassandra-cluster-3cb4c9a2c162
● https://www.datastax.com/dev/blog/modern-hinted-handoff
● https://www.metricly.com/how-to-monitor-cassandra/
Thank You :)
ANY Questions?

Contenu connexe

Tendances

Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
ScyllaDB
 

Tendances (20)

Build real time stream processing applications using Apache Kafka
Build real time stream processing applications using Apache KafkaBuild real time stream processing applications using Apache Kafka
Build real time stream processing applications using Apache Kafka
 
Maintaining spatial data infrastructures (SDIs) using distributed task queues
Maintaining spatial data infrastructures (SDIs) using distributed task queuesMaintaining spatial data infrastructures (SDIs) using distributed task queues
Maintaining spatial data infrastructures (SDIs) using distributed task queues
 
Big data @ Hootsuite analtyics
Big data @ Hootsuite analtyicsBig data @ Hootsuite analtyics
Big data @ Hootsuite analtyics
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDB
 
Why Spark for large scale data analysis
Why Spark for large scale data analysisWhy Spark for large scale data analysis
Why Spark for large scale data analysis
 
Pre fosdem2020 uber
Pre fosdem2020 uberPre fosdem2020 uber
Pre fosdem2020 uber
 
How Incremental Compaction Reduces Your Storage Footprint
How Incremental Compaction Reduces Your Storage FootprintHow Incremental Compaction Reduces Your Storage Footprint
How Incremental Compaction Reduces Your Storage Footprint
 
Building a transactional key-value store that scales to 100+ nodes (percona l...
Building a transactional key-value store that scales to 100+ nodes (percona l...Building a transactional key-value store that scales to 100+ nodes (percona l...
Building a transactional key-value store that scales to 100+ nodes (percona l...
 
A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)
 
TiDB as an HTAP Database
TiDB as an HTAP DatabaseTiDB as an HTAP Database
TiDB as an HTAP Database
 
TiDB for Big Data
TiDB for Big DataTiDB for Big Data
TiDB for Big Data
 
Accordion - VLDB 2014
Accordion - VLDB 2014Accordion - VLDB 2014
Accordion - VLDB 2014
 
Scale Relational Database with NewSQL
Scale Relational Database with NewSQLScale Relational Database with NewSQL
Scale Relational Database with NewSQL
 
Nats
NatsNats
Nats
 
Scaling Islandora
Scaling IslandoraScaling Islandora
Scaling Islandora
 
Build intelligent, real-time applications using Machine Learning
Build intelligent, real-time applications using Machine LearningBuild intelligent, real-time applications using Machine Learning
Build intelligent, real-time applications using Machine Learning
 
P99CONF — What We Need to Unlearn About Persistent Storage
P99CONF — What We Need to Unlearn About Persistent StorageP99CONF — What We Need to Unlearn About Persistent Storage
P99CONF — What We Need to Unlearn About Persistent Storage
 
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
 
How to build an event driven architecture with kafka and kafka connect
How to build an event driven architecture with kafka and kafka connectHow to build an event driven architecture with kafka and kafka connect
How to build an event driven architecture with kafka and kafka connect
 
Temporal Performance Modelling of Serverless Computing Platforms - WoSC6
Temporal Performance Modelling of Serverless Computing Platforms - WoSC6Temporal Performance Modelling of Serverless Computing Platforms - WoSC6
Temporal Performance Modelling of Serverless Computing Platforms - WoSC6
 

Similaire à Monitoring Cassandra With An EYE

Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
confluent
 

Similaire à Monitoring Cassandra With An EYE (20)

NewSQL - The Future of Databases?
NewSQL - The Future of Databases?NewSQL - The Future of Databases?
NewSQL - The Future of Databases?
 
Scalability broad strokes
Scalability   broad strokesScalability   broad strokes
Scalability broad strokes
 
Building zero data loss pipelines with apache kafka
Building zero data loss pipelines with apache kafkaBuilding zero data loss pipelines with apache kafka
Building zero data loss pipelines with apache kafka
 
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB AtlasMongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
 
Scalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERScalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBER
 
An Introduction to Apache Cassandra
An Introduction to Apache CassandraAn Introduction to Apache Cassandra
An Introduction to Apache Cassandra
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @Lendingkart
 
M|18 Why Abstract Away the Underlying Database Infrastructure
M|18 Why Abstract Away the Underlying Database InfrastructureM|18 Why Abstract Away the Underlying Database Infrastructure
M|18 Why Abstract Away the Underlying Database Infrastructure
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Discoblocks.pptx.pdf
Discoblocks.pptx.pdfDiscoblocks.pptx.pdf
Discoblocks.pptx.pdf
 
Modeling Data and Queries for Wide Column NoSQL
Modeling Data and Queries for Wide Column NoSQLModeling Data and Queries for Wide Column NoSQL
Modeling Data and Queries for Wide Column NoSQL
 
Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3
 
Elasticsearch as a time series database
Elasticsearch as a time series databaseElasticsearch as a time series database
Elasticsearch as a time series database
 
Event driven architectures with Kinesis
Event driven architectures with KinesisEvent driven architectures with Kinesis
Event driven architectures with Kinesis
 
Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut:  Orchestrating  Percona XtraDB Cluster with KubernetesClusternaut:  Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
 
MariaDB MaxScale: an Intelligent Database Proxy
MariaDB MaxScale: an Intelligent Database ProxyMariaDB MaxScale: an Intelligent Database Proxy
MariaDB MaxScale: an Intelligent Database Proxy
 
Interactive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark StreamingInteractive Data Analysis in Spark Streaming
Interactive Data Analysis in Spark Streaming
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
 
The Dark Side Of Go -- Go runtime related problems in TiDB in production
The Dark Side Of Go -- Go runtime related problems in TiDB  in productionThe Dark Side Of Go -- Go runtime related problems in TiDB  in production
The Dark Side Of Go -- Go runtime related problems in TiDB in production
 

Plus de Knoldus Inc.

Plus de Knoldus Inc. (20)

Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptx
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable Testing
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose Kubernetes
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptx
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 

Dernier

%+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
 
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
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Dernier (20)

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
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...
 
%+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...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
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 - 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...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
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...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
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...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 

Monitoring Cassandra With An EYE

  • 1. Presented By: Shubhrank Rastogi Monitoring Cassandra with an EYE
  • 2. Agenda 01 ● A little about Cassandra ● Cassandra Internal Concepts ○ Read Path ○ Write Path ○ Compactions ○ JVM GC ● Quick Q’s on Metrics, Monitoring ● Monitoring Cassandra ● Categories wise - Metrics with Visuals
  • 3. Quick Overview - About Cassandra ● Apache Cassandra is a free and open-source, distributed, wide column store, NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. ● A Cassandra cluster has no special nodes i.e. the cluster has no masters, no slaves or elected leaders. ● It provides various features: ○ Fault-tolerant ○ Scalable ○ Distributed ○ Tunable consistency
  • 4. Let’s Take a PATH - WRITE PATH ● A write request for Cassandra follows the following path at node level:
  • 5. WRITE PATH - Cont. ● A write request for Cassandra follows the following path at cluster level:
  • 6. Let’s Take a PATH - READ PATH ● The read request follows the following path at SSTable level:
  • 7. Compactions is necessary! ○ Why? ■to save disk space. ■to clean redundant data. ■to make response faster. ○ How cassandra stores data? ■adds data by timstamping. ■generates mulitple SSTables. ○ Why is it bad? ■Data utilization is high. ■response time is high. ○ Solution: ■remove redundant data with the help of Tombstones ■generates ONE sstable throughout cluster.
  • 8. JVM GC to the rescue! ● Cassandra process is run on JVM, using off-heap and in-heap memory for its components. ● One situation that you definitely want to minimize ○ garbage collection pause aka stop-the-world event ● A pause occurs when a region of memory is full and its effects: ○ operations are suspended. ○ node can appear as down to other nodes. ○ the JVM needs to make space to continue. ○ Read/Write operations will wait, increases Read/Write Latency.
  • 9. Why do we need Metrics of anything?
  • 10. To measure something or Probably to Monitor something.
  • 11. And why do we need to Monitor something?
  • 12. ●To make that something successful for long run ●To detect anomalies and see future ●To optimize that something ●To improve that something ●To save some $$$$
  • 13. “ Necessity is the mother of Invention and to make that Invention successful, we need to Monitor it. ”
  • 14. Now Let’s MONITOR Cassandra ● What we can monitor in cassandra? ○ Performance ■Write Path ■Read Path ○ Capacity (Resources) ■Server/Node ■JVM ○ Operations ■Compactions ■Eventual Consistency
  • 15. Performance based - Metrics ● Read and Write Latency in READ and WRITE PATH ○ The recent read latency and write latency counters are important in making sure operations are happening in a consistent manner. ○ Effected by - ■Replication factor ■Compactions (Improves READ only) ■MemTable Flush
  • 16. Cont: ● LiveSStable count - No. of SStables for a table in all keyspaces, or you can be more generic like to a specific keyspace and table. ○ (Read Latency, Disk Usage) is directly proportional to Live SSTable count. ○ Compaction follows a strategy and uses a large amount of CPU
  • 17. Cont: ● ThreadPool ○ Each of the thread pools provides statistics on the number of tasks that are active, pending, and completed. ○ Metrics: ■PendingTasks ■CompletedTasks ○ Trends on these pools for increases in the pending task column indicate when to add additional capacity.
  • 18. ● MemTable flush count ○ Configuring memtable thresholds can improve write performance by creating SSTables. ○ it executes when the commit log space threshold or the memtable cleanup threshold has been exceeded. ○ How you tune memtable thresholds depends on your data and write load. Increase memtable thresholds under either of these conditions: ■The write load includes a high volume of updates on a smaller set of data. ■A steady stream of continuous writes occurs. Cont:
  • 19. Operations based: Metrics ● Compactions ○ Metrics ■PendingTasks ■CompletedTasks ○ Monitoring compaction performance is an important aspect of knowing when to add capacity to your cluster. ○ Compactions affects both paths READ and WRITE, indirectly or directly.
  • 20. ● Eventual Consistency tells us how consistent is our data replication across nodes. ○ HintedHandoff Metrics keeps track of data which has been replicated to nodes yet. ■Hints_created: number of hinted key space created.) ○ Every data that is stored in cassandra would be replicated across the cluster based on its replication factor. ○ When coordinator node couldn’t write to replicas node, it would store the data on it self, then re-attempt to write to replica node if the replica node available. Cont:
  • 21. Resources based - Metrics ● JVM based resources ○ Metrics: ■JVM_gc_collection_seconds_count ■JVM_heap_memory_bytes_used ■JVM_memory_pool_bytes_used
  • 22. REFERENCES: ● https://docs.datastax.com/en/ddac/doc/datastax_enterprise/ddacAdminGettingStarted.html ● https://thelastpickle.com/blog/2018/04/11/gc-tuning.html ● https://thelastpickle.com/blog/2017/03/16/compaction-nuance.html ● https://thelastpickle.com/blog/2011/04/28/Forces-of-Write-and-Read.html ● https://www.datadoghq.com/blog/how-to-monitor-cassandra-performance-metrics/ ● https://medium.com/prismapp/how-do-we-monitor-cassandra-cluster-3cb4c9a2c162 ● https://www.datastax.com/dev/blog/modern-hinted-handoff ● https://www.metricly.com/how-to-monitor-cassandra/
  • 23. Thank You :) ANY Questions?