Distributed time-series database