Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacing varnish with aws cloudfront

Recently came across an article on using AWS CloudFront to deliver the whole site, instead of using Varnish as reverse proxy. Is it really better than Varnish, especially in case of Magento?

like image 675
Miky Avatar asked Jan 16 '14 08:01

Miky


People also ask

What is varnish AWS CloudFront?

Varnish is a Caching Reverse Proxy while CloudFront is a Content Delivery Network. My suggestion: If you are looking at serving content all over the world, go with CloudFront. If you're just serving to a local user base, simply fire up a high memory instance and install Varnish and serve content off Varnish.

Does CloudFront improve performance?

You can use a content delivery network (CDN) like Amazon CloudFront to improve the performance of your website by securely delivering data, videos, applications, and APIs to customers globally with low latency and high transfer speeds.

What is a main benefit of CloudFront?

CloudFront speeds up the distribution of your content by routing each user request through the AWS backbone network to the edge location that can best serve your content. Typically, this is a CloudFront edge server that provides the fastest delivery to the viewer.


2 Answers

Varnish is a Caching Reverse Proxy while CloudFront is a Content Delivery Network. My suggestion: If you are looking at serving content all over the world, go with CloudFront. If you're just serving to a local user base, simply fire up a high memory instance and install Varnish and serve content off Varnish. This takes time, but is definitely worth the effort.

Here's a useful link: https://fournines.wordpress.com/2011/12/02/improving-page-speed-cdn-vs-squid-varnish-nginx/

like image 81
eternaltyro Avatar answered Sep 17 '22 14:09

eternaltyro


Varnish is page level caching while Cloudfront is CDN. Varnish has a programming language called vcl which provides you ultimate flexibility in setting redirects etc. Also it prvides lot of modules to lot of wonderful thinngs, Varnish and Cloudfront are not competitiors

like image 39
Sid Sharma Avatar answered Sep 20 '22 14:09

Sid Sharma