You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is having the code for cleaning up (that's specified in the official example) necessary for each configuration you create?
What is it actually doing?
Will the memory build up over time if you don't clean it manually using the background task or does it clean periodically even without the background task?
I'm talking about this code specifically:
let governor_limiter = governor_conf.limiter().clone();let interval = Duration::from_secs(60);// a separate background task to clean up
std::thread::spawn(move || {loop{
std::thread::sleep(interval);
tracing::info!("rate limiting storage size: {}", governor_limiter.len());
governor_limiter.retain_recent();}});
Wouldn't using a tokio task with tokio::spawn be more efficient if we are already using Axum for example?
The text was updated successfully, but these errors were encountered:
Is having the code for cleaning up (that's specified in the official example) necessary for each configuration you create?
What is it actually doing?
Will the memory build up over time if you don't clean it manually using the background task or does it clean periodically even without the background task?
I'm talking about this code specifically:
Wouldn't using a tokio task with tokio::spawn be more efficient if we are already using Axum for example?
The text was updated successfully, but these errors were encountered: