cmd/frontend: add quota middleware in record-only mode
Add the Quota middleware to the chain, but configure it only
to collect metrics about how many requests it would have blocked;
do not actually block anything.
@@ -95,6 +95,12 @@ func main() {
requestLogger := getLogger(ctx)
mw := middleware.Chain(
middleware.RequestLog(requestLogger),
+ middleware.Quota(middleware.QuotaSettings{
+ QPS: 10,
+ Burst: 20,
+ MaxEntries: 1000,
+ RecordOnly: true,
+ }),
middleware.SecureHeaders(), // must come before any caching middleware for nonces to work
middleware.Timeout(1*time.Minute),
)
