SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
Live traffic capture and replay
in Apache Cassandra 4.0
Vinay Chella
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Who has?
● Wondered what kinds of queries are hitting your
database?
● Wanted to duplicate queries to test clusters?
● Run tcpdump and run your machine out of disk
space?
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Who Am I?
Vinay Chella
Apache Cassandra Committer
Cloud Data Architect
Cloud Database Engineering @ Netflix
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Agenda
● History of Traffic capture
● Why Capture it
● Traffic capture in Cassandra - Today
● Traffic capture in Cassandra - Apache Cassandra 4.0
● Full Query Logging
○ Bin Log
● Demo
● BinLog applications in Cassandra
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Database
tracers
Database native traffic
capture tools
Flood of
n/w tools
Many other web
server traffic capture
and replay tools
Early
90s
Late
90s
Early
2000s
Late
2000s
ethereal
Packet analyzer tool -
Wireshark
etherfind
Network packet capture
tool - tcpdump
History of traffic capture
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Why capture traffic?
● Testing
● Debugging
● Shadowing
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Why capture the traffic? - Testing
“Systems behave differently depending on environment and
traffic patterns. Since the behavior of utilization can change
at any time, sampling real traffic is the only way to reliably
capture the request path.”
- Principles of Chaos Engineering
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Problem: Databases upgrades are hard
Reason: Databases does not have lot of test coverage
Problem: Trying to enumerate all the possible combinations of your
prod environment is quite challenging
Result: 100% test coverage on your test env is hard
Problem: Is my database ready for production traffic? How about load
testing it
Reality: Synthetic testing is hard and impossible to get it right
Why capture the traffic? - Testing
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Debugging tricky production bugs
● Figuring out performance issues
● Auditing which microservices are accessing the database
Why capture the traffic? - Debugging
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Shadowing, Mirroring, dark launch, cloning, roman riding
● Minimal production impact during upgrades
● Test with actual data
● Load test and verify without impacting production
Why capture the traffic? - Shadowing
How should the traffic
capture be done?
© DataStax, All Rights Reserved.Confidential
© DataStax, All Rights Reserved.Confidential
© DataStax, All Rights Reserved.Confidential
© DataStax, All Rights Reserved.Confidential
© DataStax, All Rights Reserved.Confidential
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Performance
Debugging Testing
Shadowing
04 03
0201
4 Major themes
It should make
testing much easier
It should allow me
shadow my traffic
It should help in
debugging
It should not slow
down the live traffic
What do we have in
Cassandra today?
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Existing tools
○ tcpdump
○ cqltrace
○ wireshark
○ Other packet capture mechanisms
Traffic capture in Cassandra
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Custom binary protocol
○ Analyzing custom protocol is cumbersome
○ Duplicating the traffic at network level is a hard problem
“Tracing should not impact system performance”
- Brendan Gregg
Performance is critical, you should run these tools without worrying about
performance
Traffic capture in Cassandra - Why is it hard?
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Full Query Logging capabilities
● Ability to
○ Log every incoming request
○ Reuse/ re-play every incoming request
○ Reuse the logged trace at any time
○ Easily start/stop tracing at any time
And importantly without impacting the performance
So, what do we need from Cassandra
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Who is really good at high performance with reliability?
Banks?
Traders?
Hospitals?
Insurance companies?
Of course, it is your Traders, High Frequency Traders…..
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Chronicle Queues
● Memory mapped file for IPC
● No GC - Off heap
● High speed and low cost logging
● Ring buffer with weighted queue
Everything is a ring buffer!!!!
● Would `ring buffer` be sufficient?
● Maybe?
○ Debugging, tracing, testing
● Maybe not?
○ Auditing and compliance
○ Guaranteed traffic cloning
BinLog
It all started with Ariel’s work on CASSANDRA-13983 - FQL (Full Query Logging)
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Query Logging
● Based on BinLog
● Logs every incoming CQL request
● Highly performant
● Binary format output
● fqltool to make it readable
● Droppable jars for custom loggers
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Protocol version
● Query time
● Query
● Query values
● Type
● single, batch etc.,
What does it log
How did it all come together?
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Performance
Debugging Testing
Shadowing
04 03
0201
4 Major themes
It should make
testing much easier
It should allow me
shadow my traffic
It should help in
debugging
It should not slow
down the live traffic
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #1: Debugging
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #1: Debugging
Client
Cassandra Node
fql_logs
Cassandra process
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #1: Debugging
$ ./nodetool enablefullquerylog --path /logs/cassandra/fql
--blocking: If the queue is full whether to block producers or drop samples. Default true.
--max-log-size: How many bytes of log data to store before dropping segments. Default 16 gigabytes.
--max-queue-weight: Maximum number of bytes of query data to queue to disk before blocking or dropping samples. Default 256
megabytes.
--path: Path to store the full query log at.
-pp, --print-port: Operate in 4.0 mode with hosts disambiguated by port number
--roll-cycle: How often to roll the log file (MINUTELY, HOURLY, DAILY). Default HOURLY.
$ ./nodetool disablefullquerylog
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
How to configure
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Sample logs
Type: single
Protocol version: 4
Query time: 1536871241290
Query: USE "dev1"
Values:
Type: single
Protocol version: 4
Query time: 1536871301568
Query: INSERT INTO emp(key , column1 , value ) VALUES ( 't1',1,'tvalue');
Values:
Type: single
Protocol version: 4
Query time: 1536871306065
Query: SELECT * from emp ;
Values:
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Performance
Debugging Testing
Shadowing
04 03
0201
4 Major themes
It should make
testing much
easier
It should allow me
to shadow traffic
It should help in
debugging
It should not slow
down the live traffic
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #2: Testing
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #2: Testing
cass_abc : Node1
Client fql_logs
Cassandra process
cass_xyz : Node6
fqltool replay
Cassandra process
fql_replay_logs
fqltool compare
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #2: Testing
$ ./tools/bin/fqltool replay --target <HOST>:<PORT>
/logs/cassandra/fql --store-queries /logs/cassandra/fql_replay/
$ ./tools/bin/fqltool compare --queries
/logs/cassandra/fql_replay/ /logs/cassandra/fql
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Performance
Debugging Testing
Shadowing
04 03
0201
4 Major themes
It should make
testing much easier
It should allow me
shadow my traffic
It should help in
debugging
It should not slow
down the live traffic
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #3: Shadowing
Client
cass_abc : Node1
fql_logs
Cassandra process
cass_xyz : Node6
fqltool replay
Cassandra process
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #3: Shadowing
$ ./nodetool enablefullquerylog --path /logs/cassandra/fql
$ ./tools/bin/fqltool replay --target <HOST>:<PORT>
/logs/cassandra/fql
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Performance
Debugging Testing
Shadowing
04 03
0201
4 Major themes
It should make
testing much easier
It should allow me
shadow my traffic
It should help in
debugging
It should not slow
down the live traffic
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #4: Performance
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #4: Performance
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Theme #4: Performance
Binlog applications in C*
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Audit Logging - How to configure.
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
$ ./nodetool enableauditlog
$ ./nodetool disableauditlog
StorageService.java:5420 - AuditLog is enabled with logger: [BinAuditLogger], included_keyspaces:
[movies, thumbs_ratings], excluded_keyspaces: [star_ratings], included_categories: [DDL, DML, DCL],
excluded_categories: [QUERY],included_users: [prod_user1, prod_user2], excluded_users: [admin_user,
ops_user]
Audit Logging - Ease of use with NodeTool
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
user:anonymous|host:localhost/X.X.X.X|source:/X.X.X.X|port:60878|timestamp:1521158923615|type:USE_KS
|category:DDL|ks:dev1|operation:USE "dev1"
user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1524127488487|type:USE_KEYSPACE|catego
ry:OTHER|ks:dev1|operation:use dev1 ;
user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1524127494445|type:SELECT|category:QUE
RY|ks:dev1|scope:emp|operation:SELECT * from emp limit 2;
user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1524127536425|type:CREATE_TABLE|catego
ry:DDL|ks:dev1|scope:emp2|operation:create TABLE emp2 (id int, c1 text, c2 text, PRIMARY KEY (id ));
user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1528147672512|type:DROP_TABLE|category
:DDL|ks:dev1|scope:emp2|operation:DROP TABLE emp2;
Audit Logging - Sample logs.
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
● Debugging
○ nodetool enablefullquerylog
● Testing
○ /cassandra/tools/bin/fqltool replay
○ /cassandra/tools/bin/fqltool compare
● Shadowing
○ nodetool enablefullquerylog
○ /cassandra/tools/bin/fqltool replay
● Compliance
○ nodetool enableauditlog (CASSANDRA-12151)
Wrapping it together
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
Take away
Cassandra 4.0 ships with
out of box traffic capture, replay, compare features
without compromising on performance
© DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved.
FAQ
● When will C* 4.0 be released?
○ Testing and benchmarking is in progress
○ Track the progress and plan @
https://cwiki.apache.org/confluence/display/CASSANDRA/4.0+Quality%3A+Components+and+Test+Plans
● How do I get my hands on these features?
○ Build trunk - https://github.com/apache/cassandra
○ Step by step @ https://blog.pythian.com/how-to-build-your-very-own-cassandra-4-0-release/
● What else is coming to Cassandra 4.0?
○ Come attend below talks tomorrow
■ Dinesh’s talk @ 10:45 AM - Two Years in the Making: What’s New with Apache Cassandra 4.0?
■ My talk @ 1:10 PM - Safer Restarts, Faster Streaming, and Better Repair, Just a Glimpse of Cassandra 4.0
THANK YOU

Más contenido relacionado

La actualidad más candente

Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupDatabricks
 
Bulk Loading into Cassandra
Bulk Loading into CassandraBulk Loading into Cassandra
Bulk Loading into CassandraBrian Hess
 
Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph Community
 
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdfDeep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdfAltinity Ltd
 
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...DataStax
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMakerKris Buytaert
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseAltinity Ltd
 
ClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovAltinity Ltd
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAltinity Ltd
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency CephShapeBlue
 
Oracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesOracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesMarkus Flechtner
 
Ozone- Object store for Apache Hadoop
Ozone- Object store for Apache HadoopOzone- Object store for Apache Hadoop
Ozone- Object store for Apache HadoopHortonworks
 
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...Yevgeniy Brikman
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudMarkus Michalewicz
 
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016DataStax
 
Ceph Block Devices: A Deep Dive
Ceph Block Devices:  A Deep DiveCeph Block Devices:  A Deep Dive
Ceph Block Devices: A Deep DiveRed_Hat_Storage
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 

La actualidad más candente (20)

Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark Meetup
 
Bulk Loading into Cassandra
Bulk Loading into CassandraBulk Loading into Cassandra
Bulk Loading into Cassandra
 
Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph RBD Update - June 2021
Ceph RBD Update - June 2021
 
Kafka for DBAs
Kafka for DBAsKafka for DBAs
Kafka for DBAs
 
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdfDeep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
 
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMaker
 
Ceph issue 해결 사례
Ceph issue 해결 사례Ceph issue 해결 사례
Ceph issue 해결 사례
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouse
 
ClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei Milovidov
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdf
 
Intro to Cassandra
Intro to CassandraIntro to Cassandra
Intro to Cassandra
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency Ceph
 
Oracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesOracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection Issues
 
Ozone- Object store for Apache Hadoop
Ozone- Object store for Apache HadoopOzone- Object store for Apache Hadoop
Ozone- Object store for Apache Hadoop
 
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
 
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
 
Ceph Block Devices: A Deep Dive
Ceph Block Devices:  A Deep DiveCeph Block Devices:  A Deep Dive
Ceph Block Devices: A Deep Dive
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 

Similar a Live traffic capture and replay in cassandra 4.0

Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Vinay Kumar Chella
 
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Matt Stubbs
 
implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...Joseph Arriola
 
Cassandra Tuning - above and beyond
Cassandra Tuning - above and beyondCassandra Tuning - above and beyond
Cassandra Tuning - above and beyondMatija Gobec
 
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...DataStax
 
Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009) Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009) PostgreSQL Experts, Inc.
 
Five Lessons in Distributed Databases
Five Lessons  in Distributed DatabasesFive Lessons  in Distributed Databases
Five Lessons in Distributed Databasesjbellis
 
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014Johnny Miller
 
Big Data Analytics with Spark
Big Data Analytics with SparkBig Data Analytics with Spark
Big Data Analytics with SparkDataStax Academy
 
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...DataStax
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraDataStax
 
Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...
Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...
Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...Josh Turner
 
Integrating best of breed open source tools to vitess orchestrator pleu21
Integrating best of breed open source tools to vitess  orchestrator   pleu21Integrating best of breed open source tools to vitess  orchestrator   pleu21
Integrating best of breed open source tools to vitess orchestrator pleu21Alkin Tezuysal
 
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...Daniel Cohen
 
Driving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ StorageDriving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ StorageCA Technologies
 
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...DataStax
 

Similar a Live traffic capture and replay in cassandra 4.0 (20)

Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
 
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
 
implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...
 
Apache cassandra v4.0
Apache cassandra v4.0Apache cassandra v4.0
Apache cassandra v4.0
 
Cassandra Tuning - above and beyond
Cassandra Tuning - above and beyondCassandra Tuning - above and beyond
Cassandra Tuning - above and beyond
 
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
Cassandra Tuning - Above and Beyond (Matija Gobec, SmartCat) | Cassandra Summ...
 
Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009) Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009)
 
Five Lessons in Distributed Databases
Five Lessons  in Distributed DatabasesFive Lessons  in Distributed Databases
Five Lessons in Distributed Databases
 
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
Apache Cassandra For Java Developers - Why, What and How. LJC @ UCL October 2014
 
DataStax 6 and Beyond
DataStax 6 and BeyondDataStax 6 and Beyond
DataStax 6 and Beyond
 
Big Data Analytics with Spark
Big Data Analytics with SparkBig Data Analytics with Spark
Big Data Analytics with Spark
 
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & Cassandra
 
Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...
Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...
Project Casquatch: An Open Source Java Abstraction Framework for Cassandra Da...
 
Integrating best of breed open source tools to vitess orchestrator pleu21
Integrating best of breed open source tools to vitess  orchestrator   pleu21Integrating best of breed open source tools to vitess  orchestrator   pleu21
Integrating best of breed open source tools to vitess orchestrator pleu21
 
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
 
Driving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ StorageDriving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ Storage
 
Performance Whackamole (short version)
Performance Whackamole (short version)Performance Whackamole (short version)
Performance Whackamole (short version)
 
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
 
Amazon Aurora: Database Week SF
Amazon Aurora: Database Week SFAmazon Aurora: Database Week SF
Amazon Aurora: Database Week SF
 

Más de Vinay Kumar Chella

How netflix manages petabyte scale apache cassandra in the cloud
How netflix manages petabyte scale apache cassandra in the cloudHow netflix manages petabyte scale apache cassandra in the cloud
How netflix manages petabyte scale apache cassandra in the cloudVinay Kumar Chella
 
Cassandra serving netflix @ scale
Cassandra serving netflix @ scaleCassandra serving netflix @ scale
Cassandra serving netflix @ scaleVinay Kumar Chella
 
Query and audit logging in cassandra
Query and audit logging in cassandraQuery and audit logging in cassandra
Query and audit logging in cassandraVinay Kumar Chella
 
Looking towards an official cassandra sidecar netflix
Looking towards an official cassandra sidecar   netflixLooking towards an official cassandra sidecar   netflix
Looking towards an official cassandra sidecar netflixVinay Kumar Chella
 
A glimpse of cassandra 4.0 features netflix
A glimpse of cassandra 4.0 features   netflixA glimpse of cassandra 4.0 features   netflix
A glimpse of cassandra 4.0 features netflixVinay Kumar Chella
 
Honest performance testing with NDBench
Honest performance testing with NDBenchHonest performance testing with NDBench
Honest performance testing with NDBenchVinay Kumar Chella
 
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIXCassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIXVinay Kumar Chella
 

Más de Vinay Kumar Chella (9)

How netflix manages petabyte scale apache cassandra in the cloud
How netflix manages petabyte scale apache cassandra in the cloudHow netflix manages petabyte scale apache cassandra in the cloud
How netflix manages petabyte scale apache cassandra in the cloud
 
Cassandra serving netflix @ scale
Cassandra serving netflix @ scaleCassandra serving netflix @ scale
Cassandra serving netflix @ scale
 
Query and audit logging in cassandra
Query and audit logging in cassandraQuery and audit logging in cassandra
Query and audit logging in cassandra
 
Looking towards an official cassandra sidecar netflix
Looking towards an official cassandra sidecar   netflixLooking towards an official cassandra sidecar   netflix
Looking towards an official cassandra sidecar netflix
 
A glimpse of cassandra 4.0 features netflix
A glimpse of cassandra 4.0 features   netflixA glimpse of cassandra 4.0 features   netflix
A glimpse of cassandra 4.0 features netflix
 
Data Stores @ Netflix
Data Stores @ NetflixData Stores @ Netflix
Data Stores @ Netflix
 
Honest performance testing with NDBench
Honest performance testing with NDBenchHonest performance testing with NDBench
Honest performance testing with NDBench
 
Real world repairs
Real world repairsReal world repairs
Real world repairs
 
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIXCassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
CassandraSummit2015_Cassandra upgrades at scale @ NETFLIX
 

Último

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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 WorkerThousandEyes
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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...Martijn de Jong
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
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?Igalia
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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?
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Live traffic capture and replay in cassandra 4.0

  • 1. Live traffic capture and replay in Apache Cassandra 4.0 Vinay Chella
  • 2. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Who has? ● Wondered what kinds of queries are hitting your database? ● Wanted to duplicate queries to test clusters? ● Run tcpdump and run your machine out of disk space?
  • 3. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Who Am I? Vinay Chella Apache Cassandra Committer Cloud Data Architect Cloud Database Engineering @ Netflix
  • 4. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Agenda ● History of Traffic capture ● Why Capture it ● Traffic capture in Cassandra - Today ● Traffic capture in Cassandra - Apache Cassandra 4.0 ● Full Query Logging ○ Bin Log ● Demo ● BinLog applications in Cassandra
  • 5. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Database tracers Database native traffic capture tools Flood of n/w tools Many other web server traffic capture and replay tools Early 90s Late 90s Early 2000s Late 2000s ethereal Packet analyzer tool - Wireshark etherfind Network packet capture tool - tcpdump History of traffic capture
  • 6. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Why capture traffic? ● Testing ● Debugging ● Shadowing
  • 7. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Why capture the traffic? - Testing “Systems behave differently depending on environment and traffic patterns. Since the behavior of utilization can change at any time, sampling real traffic is the only way to reliably capture the request path.” - Principles of Chaos Engineering
  • 8. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Problem: Databases upgrades are hard Reason: Databases does not have lot of test coverage Problem: Trying to enumerate all the possible combinations of your prod environment is quite challenging Result: 100% test coverage on your test env is hard Problem: Is my database ready for production traffic? How about load testing it Reality: Synthetic testing is hard and impossible to get it right Why capture the traffic? - Testing
  • 9. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Debugging tricky production bugs ● Figuring out performance issues ● Auditing which microservices are accessing the database Why capture the traffic? - Debugging
  • 10. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Shadowing, Mirroring, dark launch, cloning, roman riding ● Minimal production impact during upgrades ● Test with actual data ● Load test and verify without impacting production Why capture the traffic? - Shadowing
  • 11. How should the traffic capture be done?
  • 12. © DataStax, All Rights Reserved.Confidential
  • 13. © DataStax, All Rights Reserved.Confidential
  • 14. © DataStax, All Rights Reserved.Confidential
  • 15. © DataStax, All Rights Reserved.Confidential
  • 16. © DataStax, All Rights Reserved.Confidential
  • 17. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Performance Debugging Testing Shadowing 04 03 0201 4 Major themes It should make testing much easier It should allow me shadow my traffic It should help in debugging It should not slow down the live traffic
  • 18. What do we have in Cassandra today?
  • 19. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Existing tools ○ tcpdump ○ cqltrace ○ wireshark ○ Other packet capture mechanisms Traffic capture in Cassandra
  • 20. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Custom binary protocol ○ Analyzing custom protocol is cumbersome ○ Duplicating the traffic at network level is a hard problem “Tracing should not impact system performance” - Brendan Gregg Performance is critical, you should run these tools without worrying about performance Traffic capture in Cassandra - Why is it hard?
  • 21. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Full Query Logging capabilities ● Ability to ○ Log every incoming request ○ Reuse/ re-play every incoming request ○ Reuse the logged trace at any time ○ Easily start/stop tracing at any time And importantly without impacting the performance So, what do we need from Cassandra
  • 22. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Who is really good at high performance with reliability? Banks? Traders? Hospitals? Insurance companies? Of course, it is your Traders, High Frequency Traders…..
  • 23. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Chronicle Queues ● Memory mapped file for IPC ● No GC - Off heap ● High speed and low cost logging ● Ring buffer with weighted queue Everything is a ring buffer!!!! ● Would `ring buffer` be sufficient? ● Maybe? ○ Debugging, tracing, testing ● Maybe not? ○ Auditing and compliance ○ Guaranteed traffic cloning BinLog It all started with Ariel’s work on CASSANDRA-13983 - FQL (Full Query Logging)
  • 24. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Query Logging ● Based on BinLog ● Logs every incoming CQL request ● Highly performant ● Binary format output ● fqltool to make it readable ● Droppable jars for custom loggers
  • 25. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Protocol version ● Query time ● Query ● Query values ● Type ● single, batch etc., What does it log
  • 26. How did it all come together?
  • 27. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Performance Debugging Testing Shadowing 04 03 0201 4 Major themes It should make testing much easier It should allow me shadow my traffic It should help in debugging It should not slow down the live traffic
  • 28. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #1: Debugging
  • 29. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #1: Debugging Client Cassandra Node fql_logs Cassandra process
  • 30. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #1: Debugging $ ./nodetool enablefullquerylog --path /logs/cassandra/fql --blocking: If the queue is full whether to block producers or drop samples. Default true. --max-log-size: How many bytes of log data to store before dropping segments. Default 16 gigabytes. --max-queue-weight: Maximum number of bytes of query data to queue to disk before blocking or dropping samples. Default 256 megabytes. --path: Path to store the full query log at. -pp, --print-port: Operate in 4.0 mode with hosts disambiguated by port number --roll-cycle: How often to roll the log file (MINUTELY, HOURLY, DAILY). Default HOURLY. $ ./nodetool disablefullquerylog
  • 31. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. How to configure
  • 32. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Sample logs Type: single Protocol version: 4 Query time: 1536871241290 Query: USE "dev1" Values: Type: single Protocol version: 4 Query time: 1536871301568 Query: INSERT INTO emp(key , column1 , value ) VALUES ( 't1',1,'tvalue'); Values: Type: single Protocol version: 4 Query time: 1536871306065 Query: SELECT * from emp ; Values:
  • 33. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Performance Debugging Testing Shadowing 04 03 0201 4 Major themes It should make testing much easier It should allow me to shadow traffic It should help in debugging It should not slow down the live traffic
  • 34. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #2: Testing
  • 35. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #2: Testing cass_abc : Node1 Client fql_logs Cassandra process cass_xyz : Node6 fqltool replay Cassandra process fql_replay_logs fqltool compare
  • 36. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #2: Testing $ ./tools/bin/fqltool replay --target <HOST>:<PORT> /logs/cassandra/fql --store-queries /logs/cassandra/fql_replay/ $ ./tools/bin/fqltool compare --queries /logs/cassandra/fql_replay/ /logs/cassandra/fql
  • 37. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Performance Debugging Testing Shadowing 04 03 0201 4 Major themes It should make testing much easier It should allow me shadow my traffic It should help in debugging It should not slow down the live traffic
  • 38. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #3: Shadowing Client cass_abc : Node1 fql_logs Cassandra process cass_xyz : Node6 fqltool replay Cassandra process
  • 39. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #3: Shadowing $ ./nodetool enablefullquerylog --path /logs/cassandra/fql $ ./tools/bin/fqltool replay --target <HOST>:<PORT> /logs/cassandra/fql
  • 40. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Performance Debugging Testing Shadowing 04 03 0201 4 Major themes It should make testing much easier It should allow me shadow my traffic It should help in debugging It should not slow down the live traffic
  • 41. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #4: Performance
  • 42. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #4: Performance
  • 43. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Theme #4: Performance
  • 45. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Audit Logging - How to configure.
  • 46. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. $ ./nodetool enableauditlog $ ./nodetool disableauditlog StorageService.java:5420 - AuditLog is enabled with logger: [BinAuditLogger], included_keyspaces: [movies, thumbs_ratings], excluded_keyspaces: [star_ratings], included_categories: [DDL, DML, DCL], excluded_categories: [QUERY],included_users: [prod_user1, prod_user2], excluded_users: [admin_user, ops_user] Audit Logging - Ease of use with NodeTool
  • 47. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. user:anonymous|host:localhost/X.X.X.X|source:/X.X.X.X|port:60878|timestamp:1521158923615|type:USE_KS |category:DDL|ks:dev1|operation:USE "dev1" user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1524127488487|type:USE_KEYSPACE|catego ry:OTHER|ks:dev1|operation:use dev1 ; user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1524127494445|type:SELECT|category:QUE RY|ks:dev1|scope:emp|operation:SELECT * from emp limit 2; user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1524127536425|type:CREATE_TABLE|catego ry:DDL|ks:dev1|scope:emp2|operation:create TABLE emp2 (id int, c1 text, c2 text, PRIMARY KEY (id )); user:anonymous|host:null|source:/X.X.X.X|port:57229|timestamp:1528147672512|type:DROP_TABLE|category :DDL|ks:dev1|scope:emp2|operation:DROP TABLE emp2; Audit Logging - Sample logs.
  • 48. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. ● Debugging ○ nodetool enablefullquerylog ● Testing ○ /cassandra/tools/bin/fqltool replay ○ /cassandra/tools/bin/fqltool compare ● Shadowing ○ nodetool enablefullquerylog ○ /cassandra/tools/bin/fqltool replay ● Compliance ○ nodetool enableauditlog (CASSANDRA-12151) Wrapping it together
  • 49. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. Take away Cassandra 4.0 ships with out of box traffic capture, replay, compare features without compromising on performance
  • 50. © DataStax, All Rights Reserved.ConfidentialConfidential© DataStax, All Rights Reserved. FAQ ● When will C* 4.0 be released? ○ Testing and benchmarking is in progress ○ Track the progress and plan @ https://cwiki.apache.org/confluence/display/CASSANDRA/4.0+Quality%3A+Components+and+Test+Plans ● How do I get my hands on these features? ○ Build trunk - https://github.com/apache/cassandra ○ Step by step @ https://blog.pythian.com/how-to-build-your-very-own-cassandra-4-0-release/ ● What else is coming to Cassandra 4.0? ○ Come attend below talks tomorrow ■ Dinesh’s talk @ 10:45 AM - Two Years in the Making: What’s New with Apache Cassandra 4.0? ■ My talk @ 1:10 PM - Safer Restarts, Faster Streaming, and Better Repair, Just a Glimpse of Cassandra 4.0