ankoder system architecture

26
System Architecture by Rex Chung - Founder

Upload: rex-chung

Post on 30-Jun-2015

1.876 views

Category:

Technology


0 download

DESCRIPTION

System Architecture for hosting on Amazon EC2

TRANSCRIPT

Page 1: Ankoder System Architecture

System Architectureby Rex Chung - Founder

Page 2: Ankoder System Architecture

What we do?

• Video conversion API

Ankoder AmazonS3

Youtubedownloader

Custom Video

Channel

Page 3: Ankoder System Architecture

What we do?

• Video conversion API

Ankoder AmazonS3

Youtubedownloader

Custom Video

Channel

request

Page 4: Ankoder System Architecture

What we do?

• Video conversion API

Ankoder AmazonS3

Youtubedownloader

Custom Video

Channel

request

postback

Page 5: Ankoder System Architecture

Our status

Page 6: Ankoder System Architecture

Our status

• 3 people, 3 months from October 2007

Page 7: Ankoder System Architecture

Our status

• 3 people, 3 months from October 2007

• Demo usage - free.ankoder.com

Page 8: Ankoder System Architecture

Our status

• 3 people, 3 months from October 2007

• Demo usage - free.ankoder.com

• Rails Plugin released

Page 9: Ankoder System Architecture

Our status

• 3 people, 3 months from October 2007

• Demo usage - free.ankoder.com

• Rails Plugin released

• Ruby Gem released

Page 10: Ankoder System Architecture

Our status

• 3 people, 3 months from October 2007

• Demo usage - free.ankoder.com

• Rails Plugin released

• Ruby Gem released

• Still a lot to do...

Page 11: Ankoder System Architecture

Current Architecture

• Slicehost - VPS

• FFmpeg - video conversion

• Ruby Reliable-messaging

• Ruby drb workers on Amazon EC2

• Amazon S3 storage

Page 12: Ankoder System Architecture

Current Architecture

API Rails ApplicationMySQL

Reliable-messaging

Download queue

Conversion queue

EC2 EC2

ActiveResource

S3

Page 13: Ankoder System Architecture

Current Problems

Page 14: Ankoder System Architecture

Current Problems

• Uploads cannot scale

Page 15: Ankoder System Architecture

Current Problems

• Uploads cannot scale

• Bandwidth is doubled.

Page 16: Ankoder System Architecture

Current Problems

• Uploads cannot scale

• Bandwidth is doubled.

• File uploaded will have a delay

Page 17: Ankoder System Architecture

Current Problems

• Uploads cannot scale

• Bandwidth is doubled.

• File uploaded will have a delay

• Slicehost VPS is not fault tolerant

Page 18: Ankoder System Architecture

Moving to EC2

Problems with EC2

• No persistent storage

• No permanent IP

• Server up time is not guaranteed

Page 19: Ankoder System Architecture

Moving to EC2

Benefits with EC2

• Delay to S3 is small (700KB/s)

• Scalable Upload

• Scalable download by hiding S3

• More reliable network communication

Page 20: Ankoder System Architecture

EC2 Architecture

RAILSMySQL cluster

RAILSMySQL cluster

RAILSMySQL cluster

SQS

S3

Rubyworker

Rubyworker

DNS

Page 21: Ankoder System Architecture

Difficulties

• Bandwidth of each instances are limited

• No fixed IP means can only use DNS to route to different server.

• Since server uptime is not guaranteed, DNS config will need to be automatically updated.

• DNS may be the single point of failure.

Page 22: Ankoder System Architecture

Improvements from S3

Page 23: Ankoder System Architecture

Improvements from S3

• Direct upload to S3, but cannot handle custom form fields.

Page 24: Ankoder System Architecture

Improvements from S3

• Direct upload to S3, but cannot handle custom form fields.

• Increase packet buffer size to increase transfer speed.

Page 25: Ankoder System Architecture

Improvements from S3

• Direct upload to S3, but cannot handle custom form fields.

• Increase packet buffer size to increase transfer speed.

• SQS pricing now 100 times cheaper From $0.10/1,000 messages to $0.01/10,000 requests

Page 26: Ankoder System Architecture

Some links

• Rails plugin - http://code.google.com/p/ankoder/

• Ruby Gem - http://ankoder.rubyforge.org/

• Doc - http://doc.ankoder.com

• Youtube Downloader - http://free.ankoder.com

• Beta - http://beta.ankoder.com