minWindow

Minimum deduplication window (in milliseconds).

Adds an artificial delay to ensure fast responses (like errors or cached responses) wait long enough for concurrent requests to join the deduplication window.

Default: 0 (no delay)

When to use:

  • Fast error responses that complete before other concurrent requests arrive

  • Cached responses that return almost instantly

  • You want to maximize deduplication effectiveness for rapid requests

Trade-off: Higher values increase deduplication effectiveness but primarily add latency to fast responses (and errors) that would otherwise complete sooner than minWindow, without adding extra delay to already-slow requests.

Example:

install(RequestDeduplication) {
minWindow = 50 // Wait at least 50ms before completing
}

Recommended: Start with 50-100ms if you have very fast responses and measure the impact.