There's a blog post from Salvatore somewhere talking about how he marshalled time series data into strings which made me thing the naive/straightforward approach was suboptimal. I always thought ZSETs indexed by time_ts would be a good fit for this.
- https://github.com/antirez/redis-timeseries
- ZSET pull request https://github.com/antirez/redis-timeseries/pull/1
- and the resulting "dsl uptime" script I made out of it: https://github.com/thbar/dsl-uptime
Thinking of it, you could probably remove the old value and insert the new (incremented) one, but that seems both slower and non-atomic.