Best way to detect an idle state? #2291
-
I want to be able to detect if an axum service hasn't gotten any requests in the last (configurable) 5 minutes. I was thinking of adding a middleware that ran before everything that basically sent a message to a task that loops forever reading messages or timing out, but I was wondering how expensive this might be or if its the right way to solve this. Anyone got any ideas? |
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
Oct 26, 2023
Replies: 1 comment 5 replies
-
That sounds like a reasonable approach to me. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
jkbbwr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That sounds like a reasonable approach to me.