Skip to content

Commit a4686e7

Browse files
authored
Relax the fallback timeout by default (#22)
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.
1 parent 8710645 commit a4686e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httprateredis.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func NewCounter(cfg *Config) *redisCounter {
5050
} else {
5151
// Activate local in-memory fallback fairly quickly,
5252
// so we don't slow down incoming requests too much.
53-
cfg.FallbackTimeout = 100 * time.Millisecond
53+
cfg.FallbackTimeout = 250 * time.Millisecond
5454
}
5555
}
5656

0 commit comments

Comments
 (0)