If you care about optimizing an eCommerce site, you know that page load times are critical. For every second you shave off the time of a page load, conversions increase dramatically.
For every 1 second delay your page takes to load, you’ll see approximately 7% less conversions, and 11% fewer subsequent page views.
Our clients don’t usually call us to see if we can help speed up their page views. Rather, we look at their sites, using advanced tools (some free, like Google Analytics), and see how long pages take to load, and what the conversion rates are.
If we speed up a page, it means (a) more business for the eCommerce Magento site, (b) a better experience for the end user (we save them time), and (c) the page tends to be ranked higher via Google and other search engines.
If you set up your Magento eCommerce site correctly with caching turned on well, it will scream. Fast page load times – sub-one-second. We’ve taken sites from 8-10 second page load times, and had them load in 1 or 1.5 seconds.
How? We use many techniques, but one is Varnish.
What is Varnish?
Varnish is a HTTP Accelerator (reverse proxy for technical folk).
A HTTP Accelerator sits between your web server and other people’s web browsers, and creates copies of content normally served from the web server. This content can include anything from images, JavaScript files, swf files, HTML files, to dynamically generated content.
How does Varnish benefit someone running Magento?
Magento varies in the amount of resources it consumes, suffice it to say Magento is more resource hungry than most PHP apps.
For this reason Magento has many types of caching built into it (you can see these in your admin panel).
These caches can help quite a bit, but there is still more you can do.
The overhead of loading the actual Magento core to start utilizing these caches is one more component that we can eliminate with Varnish.
For the following cases:
• First time users to your site
• Users that are not logged in
• Users that do have items in their carts
There may be no reason to have Magento load more than once.
Why is that? In the cases listed above Magento may not render any differently for different users.
Because of this we only need to let Magento once per page, from there Varnish will keep a static copy of the content so that PHP, Mysql, and Magento do not need to run in the future.
This saves system resources, and just as important it significantly lowers your First Byte Time.
Your users will be waiting less for the page to load, and Google will love you!
So you may be asking what about when I do not meet the criteria listed above.
In those cases you will need to let Magento run as it normally would, this is because we want each user to have a unique experience based on their interactions with the site (i.e. if a user adds a product to the cart, it needs to be shown to them in the header as it normally would).
In these cases however, users still benefit from Varnish since the system is not working as hard as it normally would, and can serve those users faster.
The problem with Varnish: When You Add New Products, Edit Products, Edit Categories or CMS Pages:
Why is the Customer Paradigm Magento Varnish Extension needed to run Varnish on my Magento site?
The Customer Paradigm Magento Varnish Extension takes a lot of the headache out of running Varnish, it automates many of the tasks needed to keep the Varnish Cache in sync with the actual Magento install.
For instance, if you did not have the Customer Paradigm Magento Varnish Extension , and updated a product from the Magento Admin Panel, your updates would not be reflected on the frontend until your restarted Varnish, thus reducing the effectiveness of Varnish.
With the Customer Paradigm Magento Varnish Extension , all changes to Categories, Product, and CMS pages are kept in sync.
It does this without ever needing to clear the entire Varnish cache, thus keeping most of your Magento site fast.
Customer Paradigm’s Magento Varnish Extension also provides methods to flush the entire cache, or to disable the cache for certain parts of your site. This is very useful for people that may not manage their server infrastructure directly.
What the Customer Paradigm Magento Varnish Extension Does:
• Lowers the amount of time needed to setup a Varnish Cache.
• Syncs Varnish with Magento’s Catalog Search, Catagories, Products, and CMS pages.
• Adds debugging features to the Magento Admin panel.
Requirements:
• Magento 1.5 +
• Varnish 3.0.0
Results:
Non-Varnish results (3 users):
SIEGE 2.70
** Preparing 3 concurrent users for battle.
The server is now under siege…
Lifting the server siege…-done.
Transactions: 23 hits
Availability: 100.00 %
Elapsed time: 14.57 secs
Data transferred: 0.13 MB
Response time: 1.38 secs
Transaction rate: 1.58 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 2.19
Successful transactions: 23
Failed transactions: 0
Longest transaction: 1.87
Shortest transaction: 0.89
Varnish results (1st run ie. Not in cache)
SIEGE 2.70
** Preparing 3 concurrent users for battle.
The server is now under siege...
Lifting the server siege...-done.
Transactions: 33 hits
Availability: 100.00 %
Elapsed time: 14.76 secs
Data transferred: 0.19 MB
Response time: 0.71 secs
Transaction rate: 2.24 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 1.59
Successful transactions: 33
Failed transactions: 0
Longest transaction: 1.52
Shortest transaction: 0.01
Varnish results (2nd run cache is loaded):
SIEGE 2.70
** Preparing 3 concurrent users for battle.
The server is now under siege...
Lifting the server siege...-done.
Transactions: 48 hits
Availability: 100.00 %
Elapsed time: 14.04 secs
Data transferred: 0.27 MB
Response time: 0.36 secs
Transaction rate: 3.42 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 1.25
Successful transactions: 48
Failed transactions: 0
Longest transaction: 1.96
Shortest transaction: 0.00
Want the Extension?
This extension is currently being submitted to Magento Connect, but if you’d like to get a copy before it’s available there, please call us at 303.473.4400 or click here to have someone contact you now >>