A feature that I’ve been thinking about is Prometheus for the history addon, instead of MySQL or the other RDBMS back-ends. I’d like to look into this myself to build, but I’m curious if there’s attraction for it in the community/suggestions from devs as I haven’t looked in the complexity yet.
The purposed implementation would be to move a large portion of the time-series MySQL data to Prometheus and read history from Prometheus. Entity states should still be stored in-memory (preferably not MySQL). Furthermore it would involve exposing an official
/metrics endpoint (or maybe re-use the Prometheus exporter that’s currently available) that Prometheus is able to scrape and provide data for the history plugin.
I’m suggesting this because I’m having scalability issues with MySQL. In the recent changes this became a bit better, but still - I experience a wide variety of locking issues and performance bottlenecks. In another project I’ve got Prometheus up-and-running, in which I scrape way more data (about ~10Mbps of data continuously) then Home Assistant currently does - on a smaller server.
Curious to your idea, thanks & Stay Safe,