Akamai
One technical problem we encountered early on as we started to grow our customer base is the issue of handling large spikes in bandwidth. While small requests to our tracking counted for a majority of web requests the bulk of our bandwidth came from serving images off our hosting service.
For most websites, requests are distributed throughout the day and throughout the week fairly evenly. With our traffic if one or two large customers sent out to 100,000+ contacts at the same time then we would see a large spike in the number of requests. As contacts opened their email our total bandwidth would grow as requests came in for images from our hosting service.
To counter this problem we decided to incorporate Akamai into our hosting. Akamai is a content delivery network or CDN provider. What this means is they have a network of servers that act as a caching proxy between a site and visitors. This provides a significant decrease in the number of requests that have to hit the servers directly. It also allows for faster downloading since Akamai will chose to serve requests from the closest node in their network to the visitor.
The actual integration into Akamai required a few changes from our end. In order for new requests to go to Akamai's caching servers instead of our hosting servers we had to update our hosting.bronto.com DNS record to a CNAME that goes to Akamai:
hosting.bronto.com. IN CNAME hosting.bronto.com.edgesuite.net.
We also setup a new subdomain that served hosting directly so that we could have Akamai pull uncached images and files from there.
For sites that host static images that won't ever change this solution would be complete. However with our application users are allowed to overwrite images and files that exist in hosting. This means that we needed a way to let Akamai know that the file is no longer current and needs to be refreshed from the source. Thankfully Akamai has an API that allows the ability to purge specific files from the cache servers. So in our application whenever a user goes to overwrite or edit a file in hosting directly we issue a request to purge that content from Akamai's network and redownload it from us.
Hopefully this will help anyone looking to integrate a CDN solution into their setup. A lot of this information of how Akamai actually gets implemented, while not difficult, wasn't widely available when we were setting this up.
Justin
I didn't know Akamai had an API that allowed you to purge content...that's awesome. Did that come about recently?
When I used Akamai we were stuck using the control.akamai.com user interface for purging content. And when you have to purge 300+ streaming videos off their servers? Well, that's why they have interns..
Posted by: Todd | May 03, 2007 at 09:19 PM
Interesting, that I cannot use WSDL2Java (or wsdl from ruby, or wsdl from c#) to parse their wsdl files.
I always get an error stating the paramOrder is invalid.
Posted by: Roger | January 29, 2008 at 08:00 AM