Show HN: AWS CloudFront (CDN) for dynamically generated content
1–9 of 9 posts
Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#2Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#3What about the CloudFront pricing? Is it cheaper than scaling own servers?
Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#4Nice post... thanks.
Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#5What about the CloudFront pricing? Is it cheaper than scaling own servers?
Good question. It depends on the caching strategy. As we essentially serve Gists we have two types of URLs one something like [gist-id]/ meaning the latest version of that particular gist and another URL is [gist-id]/[revision-id] which is a particular revision. For 'latest' URL we just do a redirect to particular latest version. For first type of resource we have 60 seconds expire, however it is also not too expensi…
I was thinking to use Cloudfront to lower the latency (not costs) for dynamic resources, because in Italy there isn't an ec2 datacenter, but there is an edge location for Cloudfront.
Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#6Earlier quoted context omitted.
Good question. It depends on the caching strategy. As we essentially serve Gists we have two types of URLs one something like [gist-id]/ meaning the latest version of that particular gist and another URL is [gist-id]/[revision-id] which is a particular revision. For 'latest' URL we just do a redirect to particular latest version. For first type of resource we have 60 seconds expire, however it is also not too expensi…
Since there is a 1005ms latency for a cache-miss, for the average user the loading times are shorter? (based on your data on hit/miss ratio) I was thinking to use Cloudfront to lower the latency (not costs) for dynamic resources, because in Italy there isn't an ec2 datacenter, but there is an edge location for Cloudfront.
No 1005 ms was not a cache miss it was a request to the origin server. Latency was 799 ms.
I assume CloudFront will contribute some latency, however in our case (we are using Heroku) our servers were already on Amazon platform, therefore CloudFront --> our server latency should be significantly lower. So CloudFront cache miss latency for the enduser will be not significantly higher than origin server latency for the enduser.
Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#7Earlier quoted context omitted.
Since there is a 1005ms latency for a cache-miss, for the average user the loading times are shorter? (based on your data on hit/miss ratio) I was thinking to use Cloudfront to lower the latency (not costs) for dynamic resources, because in Italy there isn't an ec2 datacenter, but there is an edge location for Cloudfront.
Hi, No 1005 ms was not a cache miss it was a request to the origin server. Latency was 799 ms. I assume CloudFront will contribute some latency, however in our case (we are using Heroku) our servers were already on Amazon platform, therefore CloudFront --> our server latency should be significantly lower. So CloudFront cache miss latency for the enduser will be not significantly higher than origin server latency for…
Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#8I recently had a similar problem - I needed to serve dynamically resized images via CloudFront (with the images being stored in S3). Images are resized on-demand - if they exist they are served directly from S3. If not, they are resized and stored in S3, then the next request will serve them directly from S3.
It works rather well, although it is quite susceptible to the thundering herd problem - putting it behind a reverse proxy that supports collapsed forwards would probably help here.
I've put the WSGI app I used for this on github - hopefully someone finds it useful! https://github.com/mikery/s3cacher
Re: Show HN: AWS CloudFront (CDN) for dynamically generated content
#9What about the CloudFront pricing? Is it cheaper than scaling own servers?