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
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response