

Speeding up FreeBSD Portsnap via geolocation (using EC2 and Route53) - cperciva
http://www.daemonology.net/blog/2012-05-20-portsnap-geolocation.html

======
aristus
If you are interested in "latency-based" DNS routing, I'm giving a talk at
Velocity in June about how we do it at Facebook:

[http://velocityconf.com/velocity2012/public/schedule/detail/...](http://velocityconf.com/velocity2012/public/schedule/detail/23732)

Slides: <http://www.slideshare.net/aristus/doppler-12564220>

~~~
cperciva
For what it's worth, I decided to use Route 53 for this precisely because of
the hard issues you discuss in your talk: Amazon has a huge amount of data at
their disposal to use in figuring out how to route traffic. This is one of the
areas where the scale of AWS gives them an unfair advantage, and for $2/month
(roughly what Route 53 is costing) I'd be a fool to not accept their help.

Given the scale of Facebook, you guys can gather your own data and produce
your own reasonably-accurate routing maps; this isn't an option available to
most of us.

~~~
aristus
Of course. Route 53 is the way to go for any site smaller than, say, Reddit.

------
JoachimSchipper
It's surprising that setting up your own servers on EC2 works out to be
cheaper than using CloudFront. Is Amazon just not doing a very good job of
charging their real costs, or is HTTP/1.1 pipelining such a big win that this
actually works out in EC2's favor here?

~~~
cperciva
I don't know the details behind CloudFront, so this is just speculation, but
based on the assumption that CloudFront pricing is based on the usual AWS
"cost plus" computations, the per-request price looks like it's mostly
covering the cost of random disk seeks. For arbitrary request streams, this is
a conservative cost model and makes sense; but portsnap bits happen to be
cheaper to serve up since most of the requests are for very small patch files
which should never be evicted from RAM.

So I don't think Amazon is doing anything wrong with their pricing, nor is
this due to HTTP/1.1; it's just that the portsnap bits are "easy" to serve up
in ways which are too subtle to be captured by any reasonable CDN pricing
model.

------
sgt
Good work...

