Conversation
|
Could this be accomplished if we added something that responded to |
|
I think |
|
It doesn't need to be |
|
In general, I'm apprehensive about adding webrick and a web service into the mix. I'd rather have another repo/project that could provide a web interface of some sort, that was able to query mailroom through some other means 🤔 |
|
Would it be preferable instead to have mail_room report out, like a heartbeat? I feel like that would require less code, generally be safer. |
|
In this case, I think that is more complex because now you need to have a separate process that determines whether the process is alive. HTTP liveness probes are a common practice in Kubernetes: https://www.magalix.com/blog/kubernetes-and-containers-best-practices-health-probes As for push vs pull for metrics, Prometheus has written extensively why they prefer a pull model for monitoring, particular for detecting a downed service: |
0e19593 to
d96292d
Compare
|
Okay. Re-reviewing this. If we're going to do it, I'd like to change a few things.
I can leave more specific comments in the code, if that is helpful. Sorry I didn't get back to this for months and months (new baby). |
c939eaa to
cec63fd
Compare
|
@tpitale Congrats on your new arrival! I've updated this pull request; let me know what you think. |
When MailRoom is run in Kubernetes, we have found occasions where MailRoom appears to have attempted to stop running, but `Net::IMAP` is stuck waiting for threads (ruby/net-imap#14). This commit adds an HTTP liveness checker to enable detection of a terminated MailRoom pod.
By default, the `NopHealthCheck` will be used. Make it explicit that we have an HTTP health check in case we need to support different health checks down the line.
Also ensure the health check is never nil.
cec63fd to
abb3d6d
Compare
When MailRoom is run in Kubernetes, we have found occasions where
MailRoom appears to have attempted to stop running, but
Net::IMAPisstuck waiting for threads (ruby/net-imap#14).
This commit adds an HTTP liveness checker to enable detection of a
terminated MailRoom pod.