+ All Categories
Home > Technology > Architecting high traffic websites with rapid changes in data on AWS

Architecting high traffic websites with rapid changes in data on AWS

Date post: 21-Jun-2015
Category:
Upload: aws-user-group-brisbane
View: 234 times
Download: 0 times
Share this document with a friend
Description:
Presented by CEO, Luc Pettett Australia's largest horse racing website and social network for punters. PP runs over 110 websites from an agile and highly pragmatic architecture on AWS. Using solutions such as EC2, RDS, DynamoDB & CloudFormation, with up to 1 million unique visitors per month and 18 million odds fluctuations every day, dexterous and extremely durable architecture is key to the group's success.
Popular Tags:
39
Australia’s #1 horse racing website
Transcript
Page 1: Architecting high traffic websites with rapid changes in data on AWS

Australia’s #1 horse racing website

Page 2: Architecting high traffic websites with rapid changes in data on AWS

Our Brands

PuntersParadise.com.au BestOdds.com.au rleague.com

+ over 110 individual content websites

Page 3: Architecting high traffic websites with rapid changes in data on AWS

Stupid shit we do

Page 4: Architecting high traffic websites with rapid changes in data on AWS

More stupid shit we do

Page 5: Architecting high traffic websites with rapid changes in data on AWS

Why AWS?

Page 6: Architecting high traffic websites with rapid changes in data on AWS

Normal 30 days

Page 7: Architecting high traffic websites with rapid changes in data on AWS

12 month traffic

Page 8: Architecting high traffic websites with rapid changes in data on AWS

Melbourne Cup Day 2012

•  13,350  concurrent  users  peak  load    

•  550,000  uniques  in  a  few  hours    

•  Almost  3  x  more  visitors  than  Flemington  racecourse  

•  Residents  of  Darwin  loose  internet    

PuntersParadise.com.au

Page 9: Architecting high traffic websites with rapid changes in data on AWS

Our year on year growth

Visits  

2009   572,000  

2010   796,000  

2011   1,731,000  

2012   3,008,000  

2013   3M  +  so  far  

PuntersParadise.com.au

Page 10: Architecting high traffic websites with rapid changes in data on AWS

Migrated to AWS about here

2008

2009

2010

2011

2012

Melbourne Cup Uptime History

Page 11: Architecting high traffic websites with rapid changes in data on AWS

The early days.

Page 12: Architecting high traffic websites with rapid changes in data on AWS

Immediate wins

We killed our pets and started producing cattle

Automated builds

Performance issues were obvious

Survived 1st Melbourne Cup!

Tech was there

Page 13: Architecting high traffic websites with rapid changes in data on AWS

Cache Servers

Web Servers

ElastiCache

RDS

ELB

ELB

Our Basic Stack

Page 14: Architecting high traffic websites with rapid changes in data on AWS

Odds Comparison

Page 15: Architecting high traffic websites with rapid changes in data on AWS

Cache Servers

Web Servers

ElastiCache

RDS

ELB

ELB

Our Basic Stack

Feed Server

Page 16: Architecting high traffic websites with rapid changes in data on AWS

On any given day..

8-10 races per meeting

Page 17: Architecting high traffic websites with rapid changes in data on AWS

On any given day..

Average of 12 race meetings per day

Page 18: Architecting high traffic websites with rapid changes in data on AWS

On any given day..

+ 45 sporting games

Page 19: Architecting high traffic websites with rapid changes in data on AWS

On any given day..

+ 8 greyhound meetings x 10 races

Page 20: Architecting high traffic websites with rapid changes in data on AWS

On any given day..

x2 bet types (win/place or sport margin/outrights)

Page 21: Architecting high traffic websites with rapid changes in data on AWS

x12 bookmakers!

On any given day..

Page 22: Architecting high traffic websites with rapid changes in data on AWS

On any given day..

Odds can change every few seconds

Page 23: Architecting high traffic websites with rapid changes in data on AWS

Two problems here.

Delivery

Processing

Page 24: Architecting high traffic websites with rapid changes in data on AWS

Our first attempt

while(true) { //some magic in here $market = getMarketInQueue(); //web requests to XML/JSON feeds $market->hitUpBookmakers(); //save to DB $market->saveOddsToMySQL(); }

Page 25: Architecting high traffic websites with rapid changes in data on AWS

How it works

//this sucks. Doesn’t feel right. $market->saveOddsToMySQL();

Page 26: Architecting high traffic websites with rapid changes in data on AWS

Push that puppy

while(true) { //some magic in here $market = getMarketInQueue(); //web requests to XML/JSON feeds $market->hitUpBookmakers(); //ahhh. That feels better $market->saveOddsToDynamoDB(); //like a boss $market->pushOddsToPusher(); }

Page 27: Architecting high traffic websites with rapid changes in data on AWS

Push that puppy

"2081715-Average-FixedWin": { "sid": 2081715, "bt": "FixedWin", "b": "Average", "f": [ [ 1381882761, 1 ] ], "p": null, "ps": null

Pushed Message

From DynamoDB

"2081715-Average-FixedWin": { "sid": 2081715, "bt": "FixedWin", "b": "Average", "f": [ [ 1381882761, 1 ] ], "p": null, "ps": null

"2081715-Average-FixedWin": { "sid": 2081715, "bt": "FixedWin", "b": "Average", "f": [ [ 1381882761, 1 ] ], "p": null, "ps": null

"2081715-Average-FixedWin": { "sid": 2081715, "bt": "FixedWin", "b": "Average", "f": [ [ 1381882761, 1 ] ], "p": null, "ps": null

Template language

Page 28: Architecting high traffic websites with rapid changes in data on AWS

Cache Servers

Web Servers

ElastiCache

RDS

ELB

ELB

Our Full Stack

Feed Servers

Pusher.com DynamoDB

Page 29: Architecting high traffic websites with rapid changes in data on AWS

Cache Servers

Web Servers

ElastiCache

RDS

ELB

ELB

Whats next?

Feed Servers

Pusher.com DynamoDB

Autoscale!

Autoscale!

Page 30: Architecting high traffic websites with rapid changes in data on AWS

AWS Reference Architecture

Too easy. Let’s just do that..

Page 31: Architecting high traffic websites with rapid changes in data on AWS

Autoscaling the feedserver

Feed Server Feed Server

Controller

Page 32: Architecting high traffic websites with rapid changes in data on AWS

Autoscaling the feedserver

Feed Server Feed Server

Controller

Page 33: Architecting high traffic websites with rapid changes in data on AWS

Autoscaling the feedserver

Feed Server Feed Server Feed Server

Page 34: Architecting high traffic websites with rapid changes in data on AWS

Autoscaling the feedserver

Feed Server 1 Feed Server 2 Feed Server 3

Page 35: Architecting high traffic websites with rapid changes in data on AWS

Autoscaling the feedserver

Page 36: Architecting high traffic websites with rapid changes in data on AWS

Autoscaling the feedserver

Page 37: Architecting high traffic websites with rapid changes in data on AWS

Autoscaling the feedserver

Page 38: Architecting high traffic websites with rapid changes in data on AWS

Our advice

Let everything get hit by a bus Empower the worker, not the boss Utilise the AWS API as much as possible It’s easy. We can all do it.

Page 39: Architecting high traffic websites with rapid changes in data on AWS

One last cool thing…


Recommended