Reputation: 11159
Say you are building the next great social app that will get tons of users. A problem that you might encounter is that you will need to host a lot of media files in a scalable fashion without limiting the performance of the entire site.
What might be some good ways of going about this problem?
A dedicated server just for the media files?
A cloud?
Upvotes: 2
Views: 644
Reputation: 3130
Media files are different from parts of your system that contain application logic in that serving media files is an I/O intensive task, whereas app logic usually requires some combination of I/O and CPU (the exact balance is very app-dependent). This is why it indeed makes sense to use a dedicated media-serving system that is optimized for disk and network throughput.
Some general guidelines if you use your own dedicated server:
If you're just starting out then your best bet imo is using S3 to store your files, with CloudFront as your CDN. In my own experience, its a very simple solution to set up, and quite cost-effective when starting out - as costs grow linearly with the amount of data and usage. Beyond a certain threshold though it makes sense to start looking at managing your own dedicated storage racks and use some other CDN.
Upvotes: 2