Vimeo uses Amazon Web Services like S3 for storage and EC2 for auto-scaling video encoding to handle peaks in traffic. They reserve EC2 capacity for guaranteed availability and use spot instances for lower priority jobs to save costs, keeping requests short to avoid interruptions. This allows them to provide high quality video hosting and tools at a reasonable price through scalable cloud infrastructure.
2. Vimeo?
The best place for video creators to put their video
The best experience for everyone:
• Video quality
• Video player
• Community
• Tools for sharing and privacy
Free Users Plus Users
500mb upload per week 5GB per week
Advanced stats, customization, advanced
Basic tools
privacy options
Wait for transcoding No wait for transcoding
Free $60/year
2
3. Why AWS?
S3, 2007
It was there
High cost, small servers in managed hosting
S3 had more features (query string auth – store and serve)
EC2, 2008
Everyone uploads on Sundays
Needed auto-scaling: two peak days per week, peak was 4x normal encoding load
Free & fast transfer between EC2 and S3
3
4. The Workflow
EC2 • Metadata
User’s Raw Sourcefile
Upload S3
Browser sourcefile • Verified stored
Machine
• HD
EC2 • SD Playable
CDN
Transcoder • Mobile video files
• Thumbnails
4
5. On-demand, Reserved
Reserved capacity is cheaper
Reserve capacity for paying customers
• Guaranteed availability, even when Amazon runs out of on-demand
Reserve capacity for 100% utilization
Reserve capacity for 75% utilization
Still need on-demand for elasticity
5
6. Upload/Transcoding Infrastructure
Upload
m1.large instances
Nginx + nodejs + SQS
Transcoding
c1.xlarge instances
Reserved, On demand and spots
Spots for low priority jobs. Instances will shut down without warning
6
7. Spots@Vimeo
Leverage open source libraries (boto in python)
Keep it Simple
Onetime spot requests, One instance per request, across all availability zones
Bidding strategy
7
8. Conceptualization the Obvious
Thinking of spots for your Database and Web servers?
Failover to On demand when spot market is saturated
Never kill spots. Let Amazon do it.
Watch out for open spot requests. Add expiry to your requests.
Keep tweaking your Algorithm.
8
9. Results
Some months we save 50% over pure on-demand instances
Guaranteed availability for our plus users
9