2

I would like to serve user uploaded content (pictures, videos, and other files) from a CDN. using Amazon S3 with cloudfront seems like a reasonable way to go. My only question is about the speed of the file system. My plan was to host user media with the following uri. cdn.mycompany.com/u/u/i/d/uuid.jpg.

I don't haven any prior experience with S3 or CDN's and I was just wondering if this strategy would scale well to handle a large amount of user uploaded content. And if there might be another conventional way to accomplish this.

wfbarksdale
  • 7,498
  • 15
  • 65
  • 88

3 Answers3

2

You will never have problems dealing with scale on CloudFront. It's an enterprise-grade beast.

Disclaimer: Not if you're Google.

Jeff Dickey
  • 5,036
  • 4
  • 28
  • 39
2

It is an excellent choice. Especially for streaming video and audio, CloudFront is priceless. My customers use my plugin to display private streaming video and audio, one of them even has 8,000 videos in one bucket without problems.

1

My question stemmed from a misunderstanding of S3 buckets as a conventional file system. I was concerned that hacking too many files in the same directory would create overhead in finding the file. However, it turns out that S3 buckets are implemented more something like a hashmap so this overhead doesn't actually exist. See here for details: Max files per directory in S3

Community
  • 1
  • 1
wfbarksdale
  • 7,498
  • 15
  • 65
  • 88