Would you use Amazon CloufFront as a Cache for a website? - caching

I have been using Amazon CloudFront for a while now as a cache and edge location for my css, js, image files. I am now thinking about using it for hosting all of my static html files as well. In essence my www.example.com and example.com will be hosted via CloudFront and I will use a separate tomcat server at my.example.com for all the dynamic stuff.
Any feedback about this? Suggestions?
Thanks,
Assaf

This is exactly what CloudFront is designed for. I think you will find this approach is typical of many high traffic web sites.
The only downside is added cost...

I used cloudfront for some time, but recently switched to Google Page Speed Service. It is a little light on features currently, but it deals with edge locations and all the tricks required to speed up you page.
It is currently in beta, but I've had no problems over the 2 months I've been using it. The only question is how much it'll cost when it leaves beta.

Related

Adding edge caching for GCE

I'm trying to add some caching for our Compute Engine server using cache-control and max-age, but I don't see any caching happening.
From the description here - http://www.youtube.com/watch?v=uFbfULXoXn8&feature=share&t=2m1s it should work seamlessly.
Looks like only GCS and GAE are supported. Or am I missing something?
It would be really, really great to have support for edge caching in GCE as well
As more in the comments, GCE doors not provide a CDN or edge caching solution with the layer 3/layer 4 load balancer. Using cache-control and max-age will still allow other intermediate proxies (e.g. ISP or mobile network caches) to cache your content.
At the moment, the best solution I can think of if you need edge caching is to hire one of the companies that specializes in this, such as Akamai. You can then point Akamai at your load-balanced GCE IP address as the content source, the same way you would with an on-premise server.
Sorry I can't point you to a more-integrated solution right now; since this is supported on GAE, I have to imagine that the GCE networking team is aware of the interest.

Not getting improvements by using CDN

I've just added a CDN distribution using Amazon Cloudfront to my Rails application on Heroku, it's working OK.
My homepage serves around 11 static assets, I've made some tests using http://www.webpagetest.org/ and there are no differences (in terms of performance, optimizing load times) between using the CDN or not.
Is there any particular reason why this could be happening?
My region is Latin America btw, so it's using the All locations edge option.
Thanks.
The main benefits of using CDN from Amazon or others is that they are hosted on fast and reliable servers and offload the traffic served directly from your server, which in case that you have a dedicated fast server you won't see a considerable boost.
But another benefit is that they are potentially cached by user's browser (due to visiting other websites which have used the same CDN) so the visitor will have a better experience first time they visit your site.
A couple of suggestinos.
If the site CSS is one of the static assets that you have moved to CloudFront then I would try moving it back to your main server.
Since page display can't start until the site CSS is downloaded, you want to serve this as fast as possible. If it's coming from a CDN then it requires a second HTTP request.
Also, use the waterfall display from webpagetest.org to pinpoint where the bottlenecks are.
Good luck!

Is it possible to implement a Content Delivery Network (CDN) if I'm with a cluster web host?

I'm with a webhost, a web farm or cluster, I guess you could say. I have a 47 page company website, and all speed tests suggest I use a CDN.
I've googled and SE's this to no end, but still don't understand how to implement a content delivery network. Are they suggesting I order a subdomain and put all my .css, .js, and image files in that subdomain? Or are they suggesting that instead of downloading jquery 1.7, I just link to malsup's jquery? But then what would I do for images and .css?
Just kinda confused here; any help in this regard would be truly appreciated!
Yes - you can implement a CDN with a cluster web host. In the vast majority of cases if you can change your DNS settings you can implement CDN. Another suggestion is to use a cookie-less domain. But, a content delivery network will optimize the delivery of all the files you mentioned. While I'm not sure of all the particulars of your specific setup and situation, it sounds like you could use front-end optimization and an overall faster site delivery. Take a look at the following that highlights EdgeCast's integration of Google's PageSpeed into our content delivery network, and how they'll help out sites like yours in tandem: http://www.edgecast.com/docs/ec-edgeopt-datasheet.pdf

Cloudflare - Do I still need to cache?

I heard about cloudflare 5 min ago and it seems really good. I read that they can hold my website online even if my server is offline, so I guess they are caching my site.
So I am very new to web-development but I think my visitors will hit the cloudflare servers instead of my server. Is this correct?
(I am talking about newspages that are the same of everyone, not user specific dynamic content)
So I guess I wouldn't have to cache those "static" sites anymore?
What Cloud Flare Provides Is Just a picture of your website and some pages may not be available at the time your server is offline, and it's very similar to what Google does.
In fact CloudFlare can cache everything on your website. You'd have to force it by creating a 'Cache-everything' PageRule. For mostly static sites it's actually a quite a good idea.
Look up here for more details:
http://blog.cloudflare.com/introducing-pagerules-advanced-caching

What kind of hosting is used for *tube sites?

I'm not sure if this is the right place for this question, and will be happy to remove the Q if needed.
When a site grows from a just-a-fun project to a site with bigger load of visitor, and you want to enable them to upload videos, you might find yourself in a need of a better hosting, including dedicated server and a no-limit web traffic (or some reasonable limit).
So, if people can upload their videos, and if page has around 1000-10000 visitors per day, what kind of hosting is there to choose from? What is needed in that case?
Thx
You are looking for a scalable solution.
The term cloud hosting comes to mind. Hosting your site in full or in parts (only the large media perhaps) at a cloud provider resolves the problem of the storage limit of servers in the easiest (and cheapest) manner.

Resources