title: Django: Simple rate limiting
body: <p>Many of my views fetch external resources. I want to make sure that under heavy load I don't blow up the remote sites (and/or get banned).</p>
  <p>I only have 1 crawler so having a central lock will work fine.</p>
  <p>I want to allow at most 3 queries to a host per second, and have the rest block for a maximum of 15 seconds. How could I do this (easily)?</p>
  <ul>
  <li>Use django cache
  <ul>
  <li>Seems to only have 1 second resolution</li>
  </ul>
  </li>
  <li>Use a file based semaphore
  <ul>
  <li>Easy to do locks for concurrency. Not sure how to make sure only 3 fetches happen a second.</li>
  </ul>
  </li>
  <li>Use some shared memory state
  <ul>
  <li>I'd rather not install more things, but will if I have to.</li>
  </ul>
  </li>
  </ul>