SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
A glimpse of
Cassandra 4.0
Vinay Chella
Cloud Database Engineering
Vinay Chella
Cloud Data Architect
Cloud Database Engineering @ Netflix
State of C* @ Netflix
Notable 4.0+ Changes
● Reliability
● Features
○ Audit Logging
● Correctness
○ Scheduled Repair
Overview
There are lot of exciting features coming in 4.0,
but this talk covers some of the features that we
at Netflix are particularly excited about and
looking forward to.
There are thousands of improvements shipping
soon in 4.0, and some in later 4.x. This is just a
sample of the goodness.
Disclaimer
● In process of migrating to Apache Cassandra 3.0
● Majority on Cassandra 2.1
● Cassandra is the source truth for 99%+ streaming
persistent data
State of C* @ Netflix
Cassandra
4.0 for Netflix
Reliability
Correctness
New
Features
Why 4.0?
Reliability
Your database should be available
(aka fast)
Internode Networking
CASSANDRA-8457!!
● No more thread per peer, fully async
server-server communication
● Streaming 20% faster (12229)
● Access to critical OS networking
features
● Gossip slows down (8457, 12966)
● Restarted nodes coordinate before they
have functional connections (13993,
14297)
● Non-restarted nodes will continue
sending on dead connections for a while
(14358)
● DynamicEndpointSnitch sends to latent
nodes after restart (14459)
Restarting Cassandra
Restarting Cassandra in 4.x
● Meet SLOs with Hybrid Speculation (14293)
○ MIN(99PERCENTILE,10MS) ~= “only speculate if I am slower than P99 SLO”
○ MAX(99PERCENTILE,100MS) ~= “stop speculating if the cluster is hosed”
● Reduce default number of vnodes (13701)
○ vnodes reduce availability, better to have fewer. (mailing list)
○ Context: https://github.com/jolynch/python_performance_toolkit/tree/master/notebooks/cassandra_availability
● Which queries are slow/huge? (13001, 14347)
● Circuit break queries of death (12106)
Some Other Improvements
Features
Your database should help
you build great apps
CDC improvements
Materialized views in other datastores
CREATE TABLE foo (a int, b text, PRIMARY KEY(a)) WITH cdc=true;
ALTER TABLE foo WITH cdc=true;
ALTER TABLE foo WITH cdc=false;
Pluggable Storage Engine
CASSANDRA-13474
● Unlocking great performance
improvements
○ Rocksandra (13476)
○ Persistent memory (13981)
Audit Logging - #12151
Where should it go in the first place?
● Why isn’t it the client’s job?
● Why not via dynamic tracing (e.g. cqltrace)?
Design.
Once we’re in the database
● Why not log to database itself?
● Why is it in files?
○ Should it be restricted to one type of implementation?
● Why not log everything?
Design. (continued)
● Audits everything
● Yaml based configuration
● Highly performant
● Pluggable
● Supports FQL
● BinLog
● Default implementations
○ BinAuditLogger
○ FileAuditLogger
● Droppable jars for custom loggers
Audit Logging.
● User
● Host
● Source ip address
● Source port
● Timestamp
● Type
○ SELECT, INSERT, etc.,
What does it log.
● Category:
○ DDL, DML, etc.,
● Keyspace
● Scope
○ Table name, Function name etc.,
● Operation
○ Select * from tbl1 limit 2;
How to configure.
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;
Sample logs.
$ ./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]
Ease of use with NodeTool
● Per table write metrics (14232)
○ Very important for multi-tenant clusters
● Virtual tables (7622)
○ Ask Cassandra for system state, config via CQL
● NetworkTopologyStrategy takes a default replication count (14303)
○ CREATE KEYSPACE test WITH replication = {'class':
'NetworkTopologyStrategy', default_datacenter_replication: 3 }
● Operate your database with HTTP (14395)
Some Other New Features
Correctness
Your database should give
you the correct responses
Incremental Repair Works!
CASSANDRA-9143 et al. !!
● Incremental repair running super quickly
on petabyte datasets
● Preview data inconsistency without
streaming (13257)
● Without repair Cassandra is hopefully
consistent. Probably not what you
expect from a database.
Repair Scheduling*
CASSANDRA-14346
● Decentralized
● Fault Tolerant
● “Just works”
● Rough design
consensus
○ Hopefully will be
merged in 4.x
● Ideal Consistency Level (13289)
○ Having metrics on inconsistency is useful
● Cassandra should be correct when nodes fail (5901)
○ Do you run repair after node failures?
● Continuous repair (13924)
○ Repair only inconsistent data, no wasted work.
Some Other Improvements
Easy Repair Operations
# Get repair configuration or status
curl localhost:7007/v1/repair/config
curl localhost:7007/v1/repair/status
# Mutate configuration live, or start or pause repair
curl -XPOST localhost:7007/v1/repair/config
curl -XPOST localhost:7007/v1/repair/start
curl -XPOST localhost:7007/v1/repair/stop
If 14346 can get finished and reviewed for 4.x we can:
● Make repair easy to schedule and run
● Allow non java interactions via HTTP
● Ship repair out of the box, not in addons.
Thank you.

Mais conteúdo relacionado

Mais procurados

Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Dvir Volk
 

Mais procurados (20)

Cassandra at Instagram 2016 (Dikang Gu, Facebook) | Cassandra Summit 2016
Cassandra at Instagram 2016 (Dikang Gu, Facebook) | Cassandra Summit 2016Cassandra at Instagram 2016 (Dikang Gu, Facebook) | Cassandra Summit 2016
Cassandra at Instagram 2016 (Dikang Gu, Facebook) | Cassandra Summit 2016
 
Apache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek BerlinApache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek Berlin
 
An Overview of Apache Cassandra
An Overview of Apache CassandraAn Overview of Apache Cassandra
An Overview of Apache Cassandra
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
 
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
 
Cassandra an overview
Cassandra an overviewCassandra an overview
Cassandra an overview
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
 
Performant Streaming in Production: Preventing Common Pitfalls when Productio...
Performant Streaming in Production: Preventing Common Pitfalls when Productio...Performant Streaming in Production: Preventing Common Pitfalls when Productio...
Performant Streaming in Production: Preventing Common Pitfalls when Productio...
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
 
Redis cluster
Redis clusterRedis cluster
Redis cluster
 
Vacuum徹底解説
Vacuum徹底解説Vacuum徹底解説
Vacuum徹底解説
 
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
 
トランザクションの設計と進化
トランザクションの設計と進化トランザクションの設計と進化
トランザクションの設計と進化
 
Disaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoFDisaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoF
 
Apache doris (incubating) introduction
Apache doris (incubating) introductionApache doris (incubating) introduction
Apache doris (incubating) introduction
 
RocksDB detail
RocksDB detailRocksDB detail
RocksDB detail
 

Semelhante a A glimpse of cassandra 4.0 features netflix

COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 
Epic Clarity Running on Exadata
Epic Clarity Running on ExadataEpic Clarity Running on Exadata
Epic Clarity Running on Exadata
Enkitec
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
Morgan Tocker
 
Srimanta_Maji_Oracle_DBA
Srimanta_Maji_Oracle_DBASrimanta_Maji_Oracle_DBA
Srimanta_Maji_Oracle_DBA
SRIMANTA MAJI
 

Semelhante a A glimpse of cassandra 4.0 features netflix (20)

Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2
 
Migrating to Apache Spark at Netflix
Migrating to Apache Spark at NetflixMigrating to Apache Spark at Netflix
Migrating to Apache Spark at Netflix
 
Automating using Ansible
Automating using AnsibleAutomating using Ansible
Automating using Ansible
 
IBM World of Watson 2016 - DB2 Analytics Accelerator on Cloud
IBM World of Watson 2016 - DB2 Analytics Accelerator on CloudIBM World of Watson 2016 - DB2 Analytics Accelerator on Cloud
IBM World of Watson 2016 - DB2 Analytics Accelerator on Cloud
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
Epic Clarity Running on Exadata
Epic Clarity Running on ExadataEpic Clarity Running on Exadata
Epic Clarity Running on Exadata
 
Productionalizing a spark application
Productionalizing a spark applicationProductionalizing a spark application
Productionalizing a spark application
 
Oracle-12c Online Training by Quontra Solutions
 Oracle-12c Online Training by Quontra Solutions Oracle-12c Online Training by Quontra Solutions
Oracle-12c Online Training by Quontra Solutions
 
Oracle 12c
Oracle 12cOracle 12c
Oracle 12c
 
Active Data Guard @CERN on UKOUG 2012
Active Data Guard @CERN on UKOUG 2012Active Data Guard @CERN on UKOUG 2012
Active Data Guard @CERN on UKOUG 2012
 
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdfDataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
 
IBM Analytics Accelerator Trends & Directions Namk Hrle
IBM Analytics Accelerator  Trends & Directions Namk Hrle IBM Analytics Accelerator  Trends & Directions Namk Hrle
IBM Analytics Accelerator Trends & Directions Namk Hrle
 
IBM DB2 Analytics Accelerator Trends & Directions by Namik Hrle
IBM DB2 Analytics Accelerator  Trends & Directions by Namik Hrle IBM DB2 Analytics Accelerator  Trends & Directions by Namik Hrle
IBM DB2 Analytics Accelerator Trends & Directions by Namik Hrle
 
Retour d'expérience d'un environnement base de données multitenant
Retour d'expérience d'un environnement base de données multitenantRetour d'expérience d'un environnement base de données multitenant
Retour d'expérience d'un environnement base de données multitenant
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
ScyllaDB @ Apache BigData, may 2016
ScyllaDB @ Apache BigData, may 2016ScyllaDB @ Apache BigData, may 2016
ScyllaDB @ Apache BigData, may 2016
 
Srimanta_Maji_Oracle_DBA
Srimanta_Maji_Oracle_DBASrimanta_Maji_Oracle_DBA
Srimanta_Maji_Oracle_DBA
 
Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)
 
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...
 

Mais 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 cloud
Vinay Kumar Chella
 

Mais de Vinay Kumar Chella (10)

Building and running cloud native cassandra
Building and running cloud native cassandraBuilding and running cloud native cassandra
Building and running cloud native cassandra
 
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
 
Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0
 
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
 
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

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
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
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

A glimpse of cassandra 4.0 features netflix

  • 1. A glimpse of Cassandra 4.0 Vinay Chella Cloud Database Engineering
  • 2. Vinay Chella Cloud Data Architect Cloud Database Engineering @ Netflix
  • 3. State of C* @ Netflix Notable 4.0+ Changes ● Reliability ● Features ○ Audit Logging ● Correctness ○ Scheduled Repair Overview
  • 4. There are lot of exciting features coming in 4.0, but this talk covers some of the features that we at Netflix are particularly excited about and looking forward to. There are thousands of improvements shipping soon in 4.0, and some in later 4.x. This is just a sample of the goodness. Disclaimer
  • 5. ● In process of migrating to Apache Cassandra 3.0 ● Majority on Cassandra 2.1 ● Cassandra is the source truth for 99%+ streaming persistent data State of C* @ Netflix
  • 7. Reliability Your database should be available (aka fast)
  • 8. Internode Networking CASSANDRA-8457!! ● No more thread per peer, fully async server-server communication ● Streaming 20% faster (12229) ● Access to critical OS networking features
  • 9. ● Gossip slows down (8457, 12966) ● Restarted nodes coordinate before they have functional connections (13993, 14297) ● Non-restarted nodes will continue sending on dead connections for a while (14358) ● DynamicEndpointSnitch sends to latent nodes after restart (14459) Restarting Cassandra
  • 11. ● Meet SLOs with Hybrid Speculation (14293) ○ MIN(99PERCENTILE,10MS) ~= “only speculate if I am slower than P99 SLO” ○ MAX(99PERCENTILE,100MS) ~= “stop speculating if the cluster is hosed” ● Reduce default number of vnodes (13701) ○ vnodes reduce availability, better to have fewer. (mailing list) ○ Context: https://github.com/jolynch/python_performance_toolkit/tree/master/notebooks/cassandra_availability ● Which queries are slow/huge? (13001, 14347) ● Circuit break queries of death (12106) Some Other Improvements
  • 12. Features Your database should help you build great apps
  • 13. CDC improvements Materialized views in other datastores CREATE TABLE foo (a int, b text, PRIMARY KEY(a)) WITH cdc=true; ALTER TABLE foo WITH cdc=true; ALTER TABLE foo WITH cdc=false;
  • 14. Pluggable Storage Engine CASSANDRA-13474 ● Unlocking great performance improvements ○ Rocksandra (13476) ○ Persistent memory (13981)
  • 15. Audit Logging - #12151
  • 16. Where should it go in the first place? ● Why isn’t it the client’s job? ● Why not via dynamic tracing (e.g. cqltrace)? Design.
  • 17. Once we’re in the database ● Why not log to database itself? ● Why is it in files? ○ Should it be restricted to one type of implementation? ● Why not log everything? Design. (continued)
  • 18. ● Audits everything ● Yaml based configuration ● Highly performant ● Pluggable ● Supports FQL ● BinLog ● Default implementations ○ BinAuditLogger ○ FileAuditLogger ● Droppable jars for custom loggers Audit Logging.
  • 19. ● User ● Host ● Source ip address ● Source port ● Timestamp ● Type ○ SELECT, INSERT, etc., What does it log. ● Category: ○ DDL, DML, etc., ● Keyspace ● Scope ○ Table name, Function name etc., ● Operation ○ Select * from tbl1 limit 2;
  • 21. 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; Sample logs.
  • 22. $ ./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] Ease of use with NodeTool
  • 23. ● Per table write metrics (14232) ○ Very important for multi-tenant clusters ● Virtual tables (7622) ○ Ask Cassandra for system state, config via CQL ● NetworkTopologyStrategy takes a default replication count (14303) ○ CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', default_datacenter_replication: 3 } ● Operate your database with HTTP (14395) Some Other New Features
  • 24. Correctness Your database should give you the correct responses
  • 25. Incremental Repair Works! CASSANDRA-9143 et al. !! ● Incremental repair running super quickly on petabyte datasets ● Preview data inconsistency without streaming (13257) ● Without repair Cassandra is hopefully consistent. Probably not what you expect from a database.
  • 26. Repair Scheduling* CASSANDRA-14346 ● Decentralized ● Fault Tolerant ● “Just works” ● Rough design consensus ○ Hopefully will be merged in 4.x
  • 27. ● Ideal Consistency Level (13289) ○ Having metrics on inconsistency is useful ● Cassandra should be correct when nodes fail (5901) ○ Do you run repair after node failures? ● Continuous repair (13924) ○ Repair only inconsistent data, no wasted work. Some Other Improvements
  • 28. Easy Repair Operations # Get repair configuration or status curl localhost:7007/v1/repair/config curl localhost:7007/v1/repair/status # Mutate configuration live, or start or pause repair curl -XPOST localhost:7007/v1/repair/config curl -XPOST localhost:7007/v1/repair/start curl -XPOST localhost:7007/v1/repair/stop If 14346 can get finished and reviewed for 4.x we can: ● Make repair easy to schedule and run ● Allow non java interactions via HTTP ● Ship repair out of the box, not in addons.