Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm planning to set up a Django site on Heroku. It will run on Heroku's Cedar stack, which allows Python apps, but doesn't include or support HTTP upstream caching with Varnish like the other stacks do.

It will be a very read-heavy site and I'd like to use Varnish for HTTP caching. I guess it should be possible to set up my own Varnish instance, point the site's A record to that instance and then have it fetch and cache the content from my Heroku app.

I thought that for minimizing latency, it would be a good idea to host that instance on EC2 in the same availability zone Heroku is in.

Do you think the overall idea is feasible? Do you have any experience how to choose the right geographical location for that EC2 instance so that its requests to the Heroku app will be as fast as possible?


Edit: same question goes for setting up a custom PostgreSQL instance.

share|improve this question
I'm looking at the same situation and I'd be curious to hear if you have an update. I haven't had the time to test it yet, but running Varnish on an EC2 instance doesn't seem like that bad an idea... – Eli Oct 19 '12 at 1:11
up vote 2 down vote accepted

You're on a bad track trying to do that; Heroku could, at any time, move their stuff around to somewhere far, far away from your instance. You'd be far better off talking to Heroku to get your concerns addressed within their platform.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.