intermediateTop 30 Scenario-Based Questions
An IoT platform receives 1 million sensor events per second. How do you design the storage?
Cassandra is ideal for high-write time-series: 1) Table design (time bucketing): CREATE TABLE readings (device_id TEXT, bucket DATE, reading_ts TIMESTAMP, temperature DECIMAL, PRIMARY KEY ((device_id, bucket), reading_ts)) WITH CLUSTERING ORDER BY (reading_ts DESC). 2) Bucket by day/hour to control partition size. 3) TTL: default_time_to_live = 7776000 (90 days). 4) Compaction: TWCS for time-serie
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
An IoT platform receives 1 million sensor events per second. How do you design the storage?