In my previous post on this topic, I told you about our e-commerce customer TradeMe and how they have used Varnish to boost the user experience on their site to help them outperform their competitors. In this article, I will explain how you can use the Varnish Hashninja to further enhance your web performance by making your e-commerce website more efficient than you thought possible.
The complexity of keeping your e-commerce site up to date and accurate
When every 2 seconds of load time on your e-commerce site equals an 8% abandonment rate the pressure for performance is tough. Making your website more efficient and better performing can truly become your competitive edge. But we know that managing an efficient e-commerce site is no easy task. Product articles or stock keeping units (SKU) are possibly referenced in six or ten different variants on your website, under multiple URLs (and to add to the complexity some sites operate with separate URLs for desktop, mobile and tablet). Keeping track of all these relations when you want to update or change your SKU can become extremely complex and painful. This may not be a problem if you only occasionally update or edit your articles, but if you are dealing with a lot of them and you have many objects in memory, keeping an up-to-date and accurate website requires a lot of CPU time.
How to use the Varnish Hashninja to gain a competitive advantage
The Varnish Hashninja was designed to solve the challenge described above.It can be configured to keep track of the relationships between SKUs and web pages by having your Content Management System (CMS) list all the SKUs that appear on a particular web page. The Hashninja will then, when given a particular SKU, invalidate every page that mentions that SKU. This happens without any significant performance impact on Varnish Cache ensuring that your website operates at an optimal speed.
How on earth does the Varnish Hashninja work?
Yes, I figured you’d ask. The Hashninja is designed to maintain an additional hash, in addition to the main hash that links objects and content in Varnish. You can put whatever you want into that hash and it will maintain a many-to-many relationship between keys and objects.
So, the content presentation layer can generate the same list of product articles in a header and Varnish Hashninja will maintain pointers from product article numbers to cached objects. This hash is very efficient and does not require much CPU overhead. As a result, you will have a more efficient website and you can rest assured that all your SKUs are updated and accurate on your entire site at all times.
If you have a Varnish subscription* and would like to start benefitting from the Hashninja please get in touch and we would be more than happy to get you started.
The Hashninja is available to our Gold and Platinum customers.