mtlynch / logpaste

A simple web service for storing text log files

Home Page:https://logpaste.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add litestream health check

mtlynch opened this issue · comments

If logpaste expects litestream to be replicating data, and it's not, it should fail hard so that users stop uploading logs that will never be replicated.

Maybe the Go app can have a periodic check similar to what's mentioned in this Kubernetes example and panic if litestream is no longer replicating.

Hi Michael,
I just read your blog post on Litestream and found it really interesting, thanks. If you still want to tackle this issue a Docker health check could be helpful (link to docs). Maybe you could build a health check that kills the container if Litestream stops working. The hosting platform would need to take care of spinning up a new container though, which could lead to some downtime.
This was just a quick idea that came to my mind, and maybe it's helpful to you. Thanks again for the great content on your blog.

Edit: Added the correct link to Docker documentation.

Thanks for reading!

If you still want to tackle this issue a Docker health check could be helpful (link to docs).

I think you may have included the wrong link because that points back to my blog post.

I was thinking of migrating to the s6 model, but I haven't looked into it too carefully yet, so I'm not sure if that would be enough or I'd still need health checks.

Sorry, I made a copy and past error. This is the correct link.

The s6 model approach is properly more solid. I never worked if it and from a first look it comes at the price of higher complexity.

Fixed in #115