Grafana HA Setup with synchronized SQLite DBs

Hi all

We are looking for a lightweight HA solution to run Grafana in a simple setup with SQLite. For HA, a Postgres/mysql cluster is recommended. But we are thinking to implement a solution in which every instance has its own local SQLite DB, with an additional solution synchronising those DBs. By doing so, we hope to decrease complexity in our environment and keep things simple.

Does someone setup a similar solution? Or are there opinions against this approach?

Thanks for your feedback!

How are you going to achieve that?

Not sure yet. One option would be something like RQLite : https://github.com/rqlite/rqlite

Other options:
http://litereplica.io/sqlite-replication.html
https://www.symmetricds.org/
Or even a manual replication (attach command)

IMHO you are not going to reduce complexity. You will just replace well known DB replication (MySQL, PostgreSQL) with less known SQLite replication/workaround. If you can guarantee SQLite file consistency across all nodes, then you should be fine.

Yeah, see your point. Thanks for the input. We will evaluate a bit more and make a decision. I’ll post an update once we know more.

So here is what we decided to do:

  • Every instance of Grafana has its own SQLite DB
  • There will be a static ‘master’ (all traffic is forwarded to this instance)
  • DB changes will be copied from the master to the slaves (e.g. every 30m)