We are Exposed to a lot of advertisements on the web be it while browsing our favorite news site, or reading through that blog we love, or while on social media. Advertisers need to make sure that these advertisements are highly targeted to ensure that they get value for their marketing dollars. To post these advertisements on relevant news sites, blogs, social media or any other online asset, advertisers need to tie-up either each one of these Publishers or Ad Network companies who in turn tie-up with many publishers.
One of the most common examples of an Ad Network is Google Display Network, which has millions of sites (publishers, who sign-up via AdSense) to show these advertisements (Advertisers, who sign-up to advertise via Adwords).
To sum-up, Ad Networks need to serve targeted advertising and this must happen in real time or in other words as defined on Wikipedia “The key function of an ad network is aggregation of ad space supply from publishers and matching it with advertiser demand”
Now Let’s Explore what it takes to achieve this on AWS Cloud:
1. Ad Server – To fetch a right advertisement file based on the profile of the visitor which is a combination of many factors including content on webpage, location of the user, time of the day, go through time, bid value etc.
These servers can be put on EC2 with Auto Scaling and Elastic Load Balancers to handle surge in ad impressions at peak hours. Further usage of EC2 spot instances can be explored to minimize the cost of serving these advertisements.
2. Delivery of Ad files – For any end user, advertisement is one of the least important parts on a web page and delivery of the advertisement file with minimum latency becomes all the more important.
Ad Server decides on a right advertisement for every impression of a webpage and the decided advertisement file can then be delivered using Amazon CloudFront to minimize delay in displaying those files.
Click to Download the Sample Architecture from AWS
3. Click-Through Servers – Once the ad is served, metrics like number of clicks, no. of impressions, average bid price are some of the most important metric required. This information is collected by click through servers.
The click-through servers can be put on a group of Amazon EC2 instances dedicated for collecting data. This information is usually in the form of log files of the click through web servers, which can then be periodically uploaded to Amazon S3.
4. Processing & storage of Click-through Data – The log files stored on Amazon S3 can then be retrieved and processed by Amazon Elastic Map Reduce cluster. This enables processing of large amount of data in parallel job flow to reduce time of processing, Spot instances can also be used to reduce the cost of running these jobs.
The processed data can then be pushed on to Amazon DynamoDB, this information can then be made available to Advertisers & Publishers who can use this information while planning future ad campaigns, deciding budgets, enhancing ad files etc.
5. Analytics of delivered ad files with Cloudlytics – The ad files delivered from CloudFront can be in various multi-media formats, and if configured appropriately, CloudFront generates logs which can then be processed with Cloudlytics to get the following analytics,
- Geographical serving of ad files
- CloudFront Cost Report
- Timeline Charts
- Browser and OS stats
- Check out Cloudlytics.com for more report