deploying digital promotions with aws

22
Deploying Digital Promotions with AWS A case-study of using Amazon Web Services (AWS) to support Super Bowl-advertising Internet traffic

Upload: mstanislav

Post on 24-Sep-2014

56 views

Category:

Documents


1 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Deploying Digital Promotions with AWS

Deploying Digital Promotions with AWS

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

Page 2: Deploying Digital Promotions with AWS

Naming Conventions

• The names in this presentation have been sanitized to protect trade-secrets, obscure company liability, and respect client NDAs

• The digital promotions company which provided these services will be known as “Promo Co.”

• The client represented within will be known as “Client Co.”

• The statistics and metrics within are real

Page 3: Deploying Digital Promotions with AWS

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 easily scalable to elastically grow and shrink to needs of Super Bowl-generated traffic

• Impossible to know exact needs until traffic begins to hit web infrastructure

Page 4: Deploying Digital Promotions with AWS

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

Page 5: Deploying Digital Promotions with AWS

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

Page 6: Deploying Digital Promotions with AWS

EC2 Basics

• Virtualization using Xen infrastructure

• Deployments are in California (US West), Virginia (US East), and Ireland (EU West)

• Separate regions require duplicate deployments of AMI, ELB, S3, and EBS

• Instances of AMIs do not by default contain persistent storage; EBS fixes that issue

• ‘Shut down’ means killing the VM and losing non-persistent data (e.g. data not on EBS)

Page 7: Deploying Digital Promotions with AWS

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

• “Registering” an AMI will make it available to create VM instances for usage

Page 8: Deploying Digital Promotions with AWS

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

Page 9: Deploying Digital Promotions with AWS

SimpleDB for CAPTCHA• SimpleDB provides simplistic key/value

storage rather than a complicated RDBMS

• CAPTCHA session storage needed to be centralized for availability to all instances behind a load balancer

• As with other AWS offerings, SimpleDB data is only available to the local region

• Promotion’s actual database calls were done to Promo Co.’s backend servers

Page 10: Deploying Digital Promotions with AWS

Load Testing Promotion

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

Page 11: Deploying Digital Promotions with AWS

Infrastructure Layout

• Akamai provides caching of static content

• Promo Co. has its own RDBMS backend

Internet

Akamai CDN

Promo Co.

Backend

AWS West ELB AWS East ELB

West EC2

East EC2

ActiveBackup

Page 12: Deploying Digital Promotions with AWS

EC2 Promotion Instances

Service Purpose

Nagios Service monitoring/availability

Munin Metric performance baselining

rsync Promotion application deployment

syslog Remote logging of software output

Java Jetty Promotion application service

• 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

Page 13: Deploying Digital Promotions with AWS

Promotion Results

Page 14: Deploying Digital Promotions with AWS

Page View per Second

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

Page 15: Deploying Digital Promotions with AWS

HTTP Response Codes

• ~94% of requests were handled fine

Page 16: Deploying Digital Promotions with AWS

404 Error Codes

• ~61,000 404 responses of 18M requests

Page 17: Deploying Digital Promotions with AWS

Usage Statistics

0

37.5

75

112.5

150

Edge Midgress Origin

Bandwidth Usage (GB)

Data represents 19:25 - 22:55

0

5

10

15

20

2007 2008 2009

Number of Requests in Millions

Page 18: Deploying Digital Promotions with AWS

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)

Page 19: Deploying Digital Promotions with AWS

Implementation Failures• SimpleDB wasn’t able to appropriately

handle our CAPTCHA implementation

• 503 error codes were returned to us from SimpleDB calls, breaking functionality

• ‘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

Page 20: Deploying Digital Promotions with AWS

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

• Costs were as-needed for instance uptime and bandwidth

• Quality customer service for questions

Page 21: Deploying Digital Promotions with AWS

Negatives of AWS Promotion Configuration• Must understand intricacies of offerings to

fully take advantage of services

• Slow process to create, package, upload, and deploy a new AMI

• 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

Page 22: Deploying Digital Promotions with AWS

SummaryThe 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.