Are you a MySQL DBA or DevOps individual being asked to run Cassandra or Scylla? Feeling overwhelmed? In this talk, I will present Cassandra/Scylla operations in terms that directly relate to MySQL. I will show you comparisons between the Information Schema and the Cassandra/Scylla System keyspace(s). I will also talk about metrics available in MySQL versus Cassandra/Scylla and how to retrieve them. Finally, I will talk about how MySQL replication compares with Cassandra replication. Hopefully, when I am done you will be able to relate to Cassandra operations in a practical and useful way.
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Â
Scylla Summit 2017: How to Run Cassandra/Scylla from a MySQL DBA's Point of View
1. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
How to Run Cassandra/Scylla from
a MySQL DBA's Point of View
Principal Consultant, The Pythian Group
John Schulz
2. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
John Schulz
2
John has 40 of years experience working with data.
Data in files and in Databases from flat files through
ISAM to relational databases, and most recently
NoSQL. For the last 15 years, he's worked on a
variety of Open source technologies including
MySQL, PostgreSQL, Cassandra, Riak, Hadoop, and
Hbase. He has been working with Cassandra since
2010. For the last three years, he has been working
for The Pythian Group to help their customers
improve their existing databases and select new
ones for new applications.
4. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Agenda
âȘ Instrumentation
âȘ MySQL Schemas (databases)
âȘ Cassandra Schemas (databases)
âȘ Nodetool commands
âȘ Forget the CLI? Graphical Alternatives
4
5. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Instrumentation
âȘ In order to manage software it needs to be instrumented
âȘ What does that mean?
o Counters â how many of what
o Timers â how long things take
o Configuration â what are the current settings
o Commands â start, stop, status, change
âȘ MySQL makes heavy use of Schemas (databases) to expose
instrumentation
âȘ Cassandra/Scylla use Schemas (keyspaces) as well but not as much
âȘ Both use alternative commands to access instrumentation as well
5
6. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
The Command line
7. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
The MySQL Schemas (databases)
âȘ Mysql â Identity, authorization, slow log, and a few other things
âȘ Information_schema â Table and view structures, table stats, and
counters
âȘ Performance_schema â Detailed tracing of recent requests
âȘ Sys â Simplification of the performance_schema
7
8. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Cassandra/Scylla Keyspaces (Schemas)
âȘ System â Cluster management
âȘ System_schema â Table and view structures
âȘ System_auth â Identity and authorization
âȘ System_distributed â More Cluster management
âȘ System_traces â Tracing data similar to MySQL
Performance_schema
8
9. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
MySQL Show and Describe
âȘ Describe is used to describe table definitions and query plans
o Describe table;
o Describe query;
âȘ Show is used to provide access to much other instrumentation
o Show processlist; - list active queries currently running
o Show variables; - list configuration information
o Show global status; - List counter and other dynamic values
o Show table status; - Get information about Table sizes
o Lots more
9
10. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Cassandra/Scylla Describe and nodetool
âȘ Describe is used to show information about keyspaces and tables
o Describe keyspaces;
o Describe keyspace spacename;
o Describe tablename;
âȘ Nodetool command and control command line interface
o Status â show status of a cluster
o Tpstats â show threadpool counters
o Tablestats â show table sizes and access counts
o Tablehistograms â Show table access data in histogram form
o Proxyhistograms â Show node access data in histogram form
o Lots of other commands
10
11. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Cassandra/Scylla Describe
ccm node1 cqlsh
Connected to ver_3.11 at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.0-SNAPSHOT | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> desc keyspaces;
modal system_schema system_auth system system_distributed system_traces
cqlsh> desc modal;
CREATE KEYSPACE mmodal WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3', 'dc2': '3'} AND durable_writes =
true;
CREATE TABLE modal.phi_audit (
tennant text,
user text,
application text,
log_time timestamp,
doc_list frozen<list<text>>,
ip_address inet,
patient_id uuid,
PRIMARY KEY ((tennant, user), application, log_time);
) WITH CLUSTERING ORDER BY (application ASC, log_time ASC);
11
12. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Nodetool Status
[jschulz@Snoopy-3 ~]$ ccm node1 nodetool status
Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.1 315.37 KiB 256 100.0% daf8f3a5-122d-4c66-9018-94c71e7076d0 r1
UN 127.0.0.2 305.65 KiB 256 100.0% 880a9408-1ee7-4128-a555-2edf4098bfd9 r1
UN 127.0.0.3 323.42 KiB 256 100.0% c0e7e6dc-5c35-40de-8cb6-492925ca1e19 r1
Datacenter: dc2
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.4 323.8 KiB 256 100.0% cde47697-9c8c-4a4d-9f24-ae250eb07145 r1
UN 127.0.0.5 322.97 KiB 256 100.0% 59e8f859-d2b4-49f7-9f2a-4184744b33a0 r1
UN 127.0.0.6 323.89 KiB 256 100.0% 96ca12a3-cf26-4456-8b15-41dc7eb357ff r1
12
13. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Nodetool Proxyhistograms
[jschulz@Snoopy-3 ~]$ ccm node1 nodetool proxyhistograms;
proxy histograms
Percentile Read Latency Write Latency Range Latency CAS Read Latency CAS Write Latency View Write Latency
(micros) (micros) (micros) (micros) (micros) (micros)
50% 454.83 42.51 1629.72 0.00 0.00 0.00
75% 654.95 61.21 2816.16 0.00 0.00 0.00
95% 17436.92 182.79 2816.16 0.00 0.00 0.00
98% 17436.92 785.94 2816.16 0.00 0.00 0.00
99% 17436.92 1955.67 2816.16 0.00 0.00 0.00
Min 61.22 20.50 379.02 0.00 0.00 0.00
Max 17436.92 5839.59 2816.16 0.00 0.00 0.00
13
14. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Nodetool Tablehistograms
[jschulz@Snoopy-3 ~]$ ccm node1 nodetool tablehistograms keyspace1 standard1
keyspace1/standard1 histograms
Percentile SSTables Write Latency Read Latency Partition Size Cell Count
(micros) (micros) (bytes)
50% 3.00 9.89 73.46 258 5
75% 3.00 11.86 88.15 258 5
95% 3.00 14.24 263.21 258 5
98% 3.00 17.08 1131.75 258 5
99% 3.00 17.08 3379.39 258 5
Min 2.00 4.77 17.09 180 5
Max 3.00 17.08 186563.16 258 5
14
15. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Nodetool TPstats
[jschulz@Snoopy-3 ~]$ ccm node1 nodetool tpstats
Pool Name Active Pending Completed Blocked All time blocked
ReadStage 0 0 4008933 0 0
CompactionExecutor 0 0 383096 0 0
MutationStage 0 0 3219638 0 0
MemtableReclaimMemory 0 0 603 0 0
GossipStage 0 0 2457780 0 0
RequestResponseStage 0 0 3231941 0 0
Native-Transport-Requests 0 0 10891424 0 0
MigrationStage 0 0 8 0 0
MemtablePostFlush 0 0 653 0 0
PerDiskMemtableFlushWriter_0 0 0 603 0 0
MemtableFlushWriter 0 0 603 0 0
15
16. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Nodetool Tablestats
âȘ Keyspace : keyspace1
âȘ Read Count: 7766215
âȘ Read Latency: 0.19810779948791013 ms.
âȘ Write Count: 3219609
âȘ Write Latency: 0.040600896257899644 ms.
âȘ Pending Flushes: 0
âȘ Table: standard1
âȘ SSTable count: 5
âȘ Space used (live): 248645402
âȘ Space used (total): 248645402
âȘ Space used by snapshots (total): 0
âȘ Off heap memory used (total): 1404056
âȘ SSTable Compression Ratio: -1.0
âȘ Number of keys (estimate): 389445
âȘ Memtable cell count: 38904
âȘ Memtable data size: 10854216
âȘ Memtable off heap memory used: 0
âȘ Memtable switch count: 65
âȘ Local read count: 7766215
âȘ Local read latency: 0.343 ms
16
17. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Nodetool TableStats
Local write count: 3219609
Local write latency: NaN ms
Pending flushes: 0
Percent repaired: 0.0
Bloom filter false positives: 247
Bloom filter false ratio: 0.00001
Bloom filter space used: 1232672
Bloom filter off heap memory used: 1232632
Index summary off heap memory used: 171424
Compression metadata off heap memory used: 0
Compacted partition minimum bytes: 180
Compacted partition maximum bytes: 258
Compacted partition mean bytes: 258
Average live cells per slice (last five minutes): 1.0
Maximum live cells per slice (last five minutes): 1
Average tombstones per slice (last five minutes): 1.0
Maximum tombstones per slice (last five minutes): 1
Dropped Mutations: 0
17
18. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Nodetool Describecluster
Cluster Information:
Name: ver_3.11
Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Schema versions:
ee5e8a83-e806-3b31-aec6-17afe768c734: [127.0.0.1, 127.0.0.2, 127.0.0.3,
127.0.0.4, 127.0.0.5, 127.0.0.6]
18
19. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Alternatives to the
Command Line
20. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Alternatives
âȘ Why do we want to use something other than the command line?
o History
o Graph views on the fly -
o Alerts
o Aggregated data from all nodes at once
o Graphical correlations
20
21. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
Grafana view of a Cassandra cluster monitored by Prometheus
21
22. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
What are some of the alternatives
âȘ Proprietary
o Datadog - https://www.datadoghq.com/
o New Relic - https://newrelic.com/
âȘ Open source
o Prometheus - https://prometheus.io/
o Zabbix - https://www.zabbix.com/
o Lots of others
âȘ Log Aggregators
o ELK â Open source -
o Splunk â Proprietary -
22
23. PRESENTATION TITLE ON ONE LINE
AND ON TWO LINES
First and last name
Position, company
THANK YOU
schulz@pythian.com
@jschulz907
Please stay in touch
Any questions?