title: Token bucket vs Fixed window (Traffic Burst)
body: <p>I was comparing <em>Token bucket</em> and <em>Fixed window</em> rate limiting algorithm, But a bit confused with traffic bursts in both algorithm.</p>
  <p>Let's say i want to limit traffic to 10 requests/minute.</p>
  <p>In Token bucket, tokens are added at the rate of 10 tokens per minute.</p>
  <pre><code> Time      Requests AvailableTokens
  10:00:00     0          10 (added 10 tokens)
  10:00:58    10          0
  10:01:00     0          10 (added 10 tokens)
  10:01:01    10          0 
  </code></pre>
  <p>Now if we see at timestamp 10:01:01, in last minute 20 requests were allowed, more than our limit.</p>
  <p>Similarly, With Fixed window algorithms.
  Window size: 1 minute.</p>
  <pre><code> Window    RequestCount IncomingRequests
  10:00:00      10         10 req at 10:00:58
  10:01:00      10         10 req at 10:01:01
  </code></pre>
  <p>Similar problem is here as well.</p>
  <p>Does both the algorithms suffer from this problem, or is there a gap in my understanding?</p>