Skip to content

Commit

Permalink
Relax the fallback timeout by default
Browse files Browse the repository at this point in the history
Increase the default fallback timeout, to give Redis over network more time before falling back to local in-memory-counter. Users can override this value.
  • Loading branch information
VojtechVitek authored Oct 23, 2024
1 parent 8710645 commit fbe712f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httprateredis.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewCounter(cfg *Config) *redisCounter {
} else {
// Activate local in-memory fallback fairly quickly,
// so we don't slow down incoming requests too much.
cfg.FallbackTimeout = 100 * time.Millisecond
cfg.FallbackTimeout = 250 * time.Millisecond
}
}

Expand Down

0 comments on commit fbe712f

Please sign in to comment.