bencherdev / bencher

🐰 Bencher - Continuous Benchmarking
https://bencher.dev
Other
531 stars 24 forks source link

Add support for `litefs` #19

Closed epompeii closed 8 months ago

epompeii commented 2 years ago

There is currently support for litestream which handles disaster recovery. However, it does not support failover. litefs currently supports failover, but it does not support robust disaster recovery (yet).

Adding support for litefs will require setting up (Consul)[https://github.com/hashicorp/consul] and some pretty big code changes to handle detecting if the node itself is the primary node (via the .primary file) and if not, redirecting all write operations to the primary node. It is likely that this behavior will need to be gated in the Rust code via a feature.

epompeii commented 8 months ago

Using litefs would make deploying and using Bencher Self-Hosted much more onerous. Also, it would create quite a bit of lock-in/friction/switching cost to leave Fly.io. Therefore, the decision was made to stick with litestream and even more tightly integrate it into Bencher. Now Bencher Plus users can configure disaster_recovery for their Bencher Self-Hosted server that's backended with litestream: https://github.com/bencherdev/bencher/releases/tag/v0.4.2 Further work will need to be invested in getting Bencher Cloud a warm standby/instant failover using litestream. However, given the current usage of Bencher, this isn't the highest priority at the moment.