Time-Series Query Routing — One Sensor, One Month

Time-Series Query Routing — One Sensor, One Month A data-flow diagram generated by Archify. 01 / Write 02 / Map 03 / Shard 04 / Query Append a reading · sensor + timestamp · 01 / Write · every second Append a reading sensor + timestamp every second Key sensor:timestamp · range per sensor · 02 / Map · owner = sensor % 8 Key sensor:timestamp range per sensor owner = sensor % 8 Owner shard · one shard per sensor · 03 / Shard · hot sensor = hot shard Owner shard one shard per sensor hot sensor = hot shard One-sensor month scan · single range scan · 04 / Query · fan-out 1 One-sensor month scan single range scan fan-out 1 Append a reading · same write load · 01 / Write · hot sensor still hot Append a reading same write load hot sensor still hot Hash the full key · sensor:time:seq · 02 / Map · order lost Hash the full key sensor:time:seq order lost Scattered shards · even spread · 03 / Shard · max share near 13% Scattered shards even spread max share near 13% One-sensor month gather · point lookups x8 · 04 / Query · fan-out 8 One-sensor month gather point lookups x8 fan-out 8 append with sensor key write path owner = sensor % 8 ownership one range scan, fan-out 1 range scan same readings in write path order lost in hashing scatter ask all 8, then merge gather Legend primary data data store data flow