Quantcast
Channel: MGT-Commerce Blog » Magento
Viewing all articles
Browse latest Browse all 19

Use Amazon CloudFront CDN to instantly improve the performance of your magento store

$
0
0

Use Amazon CloudFront CDN to instantly improve the performance of your magento store

In this post i will explain what Amazon CloudFront CDN is and how to use it with magento.

Whether you just launched a new magento store or are maintaining an existing one, sooner or later you will take a look at possible ways to improve the performance of your magento store.

What is Amazon CloudFront?

Amazon CloudFront is a web service which can be used to deliver static files like images, css, javascript or streaming content using a global network of edge locations.
If you have customers from Asia which requests your site in the US they get routed to the nearest edge location, so the content is delivered with the best possible performance.

Why should i use a CDN with Magento?

Easy Integration: The integration takes about 15 – 45 minutes, depending on your knowledge

Performance Booster: It’s really fast to use a edge locations around the world to deliver your static content.
Amazon CloudFront caches copies of your static content close to viewers, lowering latency when the download your static files.
It’s good way to offload your static files, all requests are handled by the amazon servers which decreases your server load.

Cost-Effective: Pay only for what you use. You only pay for the content that you deliver through the network.
Visit http://aws.amazon.com/cloudfront/pricing/ to get more information about pricing.

Reliable: Amazon CloudFront is built using a highly reliable infrastructure.

Step1: Configure Amazon CloudFront

1. Access CloudFront from the Amazon Web Services Management Console here: http://console.aws.amazon.com/cloudfront/home

2. Create a pull zone contribution by clicking “Create Contribution”.
Afterwards you should see a wizard in a dialog.

Ensure that the delivery method is set to “Download”.

Create CloudFront Contribution

3. Enter your Origin Domain Name and Origin Id

Amazon CloudFront Origin Domain Name

4. Configure the default behavior how CloudFront communicates with your origin

Amazon CloudFront Default Bahavior

5. Enter distribution Details

Alternate Domain Names (CNAMEs): This field is not required. If you want use your own domain name (for example assets.mgt-commerce.com) instead of the Cloudfront domain name (e.g. d1256.cloudfront.net) for the URLs for your files.

Amazon CloudFront - Enter Distribution Detail

6. When you are satisfied with the configuration, select “Create Distribution”. CloudFront will now generates then a domain for you to use. In our example it generates:

dxkds3d2lqja0.cloudfront.net

You can use this domain to deliver static content or your configured CNAMEs (e.g assets.mgt-commerce.com).

Before proceeding, you must wait for your CDN to propagate worldwide to the CloudFront servers.
This usually takes about 10 minutes and the status of your distribution will change from “In Progress” to “Deployed” in the CloudFront dashboard:

Amazon CloudFront Create Contribution

If you use your own CNAMEs please make sure to enter the domain in your domain management dashboard.

Amazon CloudFront enter your CNAME

Step 2: Configure Magento

The integration is really easy and takes about 3 minutes.

Go to Magento Backend -> System -> Configuration -> Web -> Unsecure

Magento CloudFront configuration

Go to Magento Backend -> System -> Configuration -> Web -> Secure

Magento CloudFront integration

What about updating the files when they change?

We have developed a little magento extension to purge (invalidate) one or more files from Amazon’s Cloudfront.
You can download the magento extension in our store.

Download in our Store


Viewing all articles
Browse latest Browse all 19

Trending Articles