Deploying Digital Promotions with AWS

A case-study of using Amazon Web Services (AWS) to support Super Bowl-advertising Internet traffic

Naming Conventions
• The names in this presentation have been • The digital promotions company which • The client represented within will be
known as “Client Co.” provided these services will be known as “Promo Co.” sanitized to protect trade-secrets, obscure company liability, and respect client NDAs

• The statistics and metrics within are real

Wide-Angle Scope
• Promo Co. hired to provide a web-based
promotion for a give-away

• Client Co. advertised the aforementioned
give-away during the 2010 Super Bowl

• In-house promotion infrastructure not
begins to hit web infrastructure

easily scalable to elastically grow and shrink to needs of Super Bowl-generated traffic

• Impossible to know exact needs until traffic

AWS Learning Curve
• Integrating Amazon Web Services offered • Building & deploying Amazon Machine
Images (AMI) for VM deployment on EC2

• Managing regional configurations of AWS • Implementing Elastic Load Balancer (ELB) • Deploying promotion updates/patches to
EC2 cluster

• Integration of EC2 hosts with DB backend

AWS Offerings Used
• EC2 provides virtualization infrastructure
based on “Xen” platform

• ELB provides DNS-based load balancing
configurations for EC2 hosts

• SimpleDB provides non-relational data
store for generic data objects

• EBS provides persistent storage for any
sort of data; mountable to one host

• S3 allows for ‘bucket’ storage of EC2 AMIs

EC2 Basics
• Virtualization using Xen infrastructure • Deployments are in California (US West),
Virginia (US East), and Ireland (EU West) deployments of AMI, ELB, S3, and EBS persistent storage; EBS fixes that issue

• Separate regions require duplicate

• Instances of AMIs do not by default contain • ‘Shut down’ means killing the VM and losing
non-persistent data (e.g. data not on EBS)

EC2 AMIs
• Special file-format used with AWS Xen
deployment; specific to Amazon only

• Starts as a Linux filesystem image/partition • Creation of AMI done using AWS tools • Separated into parts, encrypted, and
uploaded to Amazon S3 with a checksum to create VM instances for usage

• “Registering” an AMI will make it available

Elastic Load Balancing
• Simple configuration to group EC2 hosts • Intelligent load-balancing; will not direct
traffic to EC2 hosts deemed ‘unhealthy’

• Provides configuration of min & max

instances to run in an auto-scaling fashion

• Able to provide request/latency metrics • Unable to load-balance across regions • Does not provide balancing-type options

SimpleDB for CAPTCHA
• SimpleDB provides simplistic key/value
storage rather than a complicated RDBMS centralized for availability to all instances behind a load balancer data is only available to the local region done to Promo Co.’s backend servers

• CAPTCHA session storage needed to be • As with other AWS offerings, SimpleDB • Promotion’s actual database calls were

Load Testing Promotion

• 3.7 million page views over ~45 minutes • Peak of ~1800 page views/sec • 99.3% successful requests (200, 206, 210)

Infrastructure Layout
Internet Akamai CDN AWS West ELB AWS East ELB East EC2 Promo Co. Backend

Backup

West EC2

Active

• Akamai provides caching of static content • Promo Co. has its own RDBMS backend

EC2 Promotion Instances
• Servers running CentOS 5.4, 32-bit • All promotion logs sent to external syslog • c1.medium, 1.7GB of RAM, 2 virtual cores • Instances focuses on high CPU performance
Service Nagios Munin rsync syslog Java Jetty Purpose Service monitoring/availability Metric performance baselining Promotion application deployment Remote logging of software output Promotion application service

Promotion Results

Page View per Second

• ~2500 page views/second peak • ~4 million page views

HTTP Response Codes

• ~94% of requests were handled fine

404 Error Codes

• ~61,000 404 responses of 18M requests

Usage Statistics
Bandwidth Usage (GB)
150 112.5 75 37.5 0 20 15 10 5 0

Number of Requests in Millions

Edge

Midgress

Origin

2007

2008

2009

Data represents 19:25 - 22:55

Promotion Scaling
• Initial load balancer was for 20 instances • An increase of 10 instances to ELB was
made after traffic starting coming in

• Akamai off-set ~71% of bandwidth to EC2 • 3.32M/4.03M page views were19:00-20:00 • Peaks: CPU at 63% ; Memory at 60% • Never utilized backup ELB (West region)

Implementation Failures
• SimpleDB wasn’t able to appropriately
SimpleDB calls, breaking functionality handle our CAPTCHA implementation

• 503 error codes were returned to us from • ‘Eventually consistent reads’ broke
CAPTCHA due to not syncing properly

• CAPTCHA was disabled as a hot-fix • 1.1 million SimpleDB errors total • Approximately 9 minutes of SDB errors

Positives of AWS Promotion Configuration
• Able to handle load for 2,500 page views/
second with 30 hosts behind one ELB

• Multiple EC2 regions allowed for hot-sites • Integration of AWS offerings provided easy
scalability for entire infrastructure and bandwidth

• Costs were as-needed for instance uptime • Quality customer service for questions

Negatives of AWS Promotion Configuration
• Must understand intricacies of offerings to
fully take advantage of services and deploy a new AMI

• Slow process to create, package, upload, • No scalability between regions of EC2 • Different costs for West vs. East vs. Europe • Tools for EC2 mostly command line driven;
interfaces need knowledge to leverage

Summary
The Amazon Web Service (AWS) offerings provide a cohesive application of cloud technologies. Competitors such as RackSpace Cloud were unable to provide the customer service, uptime, nor customization that Amazon does. Promo Co. will be expanding their cloud offerings in the near future to host other promotions as well as company infrastructure in the could utilizing AWS. Further effort has since gone into more adequately understanding the exact functionalities and limitations of AWS services. This more thorough understanding of technologies (especially that of SimpleDB) is expected to provide an even better experience going forward.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.