liveness healthcheck probes with faststream #2272
Replies: 1 comment 2 replies
|
@jonathan-fileread hi! |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi there!
I'm looking to setup a liveness healthprobe inside kubernetes with faststream, where the liveness probe can periodically check if the subscriber is still actively polling.
Previously I used azure servicebus where we needed to do a while True: loop to continously poll the queues for messages. I was able to create a health file periodically in this for loop as i needed to manage the poller to consistently poll for messages.
However Faststream handles it all within app.run() once you apply the broker.subscriber handlers. so it's hard for me to extend any healthcheck functionality to make sure that the run is still online. I would like to avoid any cases of zombie pods, where the pod is up but faststream has stopped polling (e.g.)
I'm also considering other methods as well (i.e. looking at stdout if any new logs have taken place). Seeking best practices here. The goal is to have the pod liveness probe (which run shell commands) be able to see any change in filesystem or shell processes that are indictive of the faststream app running properly).
Thank you!!
All reactions