Time Series with Apache Cassandra: the basics
summary
Apache Cassandra stores time series by partitioning rows (recommend ~100k rows or ~100MB per partition) and using a compound primary key like (device_id, year) with a clustering key on timestamp DESC so recent writes are topmost. Writes go to the commit log and memtable then flush to immutable SSTables with periodic compaction; deletes create tombstones. Use CQL and the DataStax PHP driver (connect via a contact point, keyspace, persistent sessions). Expect linear write scaling and a hard per-partition limit of two billion cells. write-optimized, partition-per-sensor-per-year
AI-written summary · about
chapters (27)
- 0:00Intro
- 0:14About me
- 1:17Big data
- 1:34My goal for this talk
- 2:41One thing I won't talk about
- 3:12What I will talk about
- 5:04Cassandra: key features
- 6:46What you should expect
- 7:28What you should not expect
- 9:54Data storage: partitions
- 12:45Partitioning: limits
- 13:36Partitioning: compound key
- 15:23From write to storage
- 16:45Compaction
- 17:48Effects on usage
- 19:42Time series: an example
- 20:03Example data
- 20:18Considering our data
- 22:03Our primary key
- 22:30The full create table CQL
- 22:42That's it.
- 23:05DataStax PHP Driver
- 24:12Connecting to your cluster
- 25:13Inserting data
- 26:17Retrieving data
- 27:11In summary
- 28:04In closing
related talks
34mTime Series Data With Apache Cassandra
53mApache Cassandra. Inception - all you need to know
29mCassandra - an introduction
07mTime Series Databases
14mBuilding the future of time series data
30mBuilding a Time-Series Database for Point-in-Time Lookups
45mCassandra Architecture: Understanding, Scaling and Optimizing
35mThe What and Why of Cassandra Datamodelling at Scale
