The developers among you who have heard about these technologies will no doubt be incredibly excited to hear this.
But don't be despondent if you haven't the first idea what Redis or Memcached are - we'll explain everything to you in this post, and let you know how you can implement them.
And best of all, we're able to make Redis and Memcached available on shared hosting - both now included as standard with our Business Hosting plans.
To achieve this, we custom developed our own deep integration with cPanel, making setup simple and taking care of all of the security requirements. At other hosts who haven't developed this integration, if you want to use Redis or Memcached, you'd usually require your own expensive virtual or dedicated server.
So, what are Redis and Memcached?Redis and Memcached both belong to the "NoSQL" family of data management models. They are powerful, fast, in-memory data stores that are useful as a caching layer. They can accelerate applications by caching database results, HTML fragments, API data, or anything else that might otherwise take time to generate. As this data is then stored in the server's RAM, it's insanely fast to access.
Implementing data caching with either solution will increase the speed of your application. How this works depends on how it's implemented in your application itself. It could be used as a page cache to accelerate page loads, or store part of your database to speed up searching, or typically in e-commerce situations, functions like add to cart and checkout.
How easy is it to implement?Not only are Redis and Memcached extremely effective, one of the reasons for their surge in popularity is that they're usually also very easy to implement. Most open source applications, including WordPress, Drupal, Joomla, CraftCMS, Magento, Prestashop to name just a few, have either built in support for either Redis or Memcached, or have a plugin or module which adds support.
This means that developers can easily implement it. At Kualo, it's as simple as enabling either Redis or Memcached in your control panel, and then configuring your application with the address for the Redis/Memcached socket.
Which hosting plans support Redis and Memcached?Redis and Memcached are available on our Business Hosting plans. If you're currently on a regular web hosting plan, such as Solo plan or StartUp, you would need to upgrade to at least the Performance plan to avail of these technologies.
It is worth noting that our ability to support both Redis and Memcached on a relatively low cost hosting plan is extremely unusual in the market. The vast majority of hosts require an upgrade to your own server, which will cost significantly more.
We have developed in-house technology that allows Redis and Memcached to operate securely on a server with other customers - and also at significantly faster speeds, through the use of Unix sockets.
Of course, we can also add support for Redis and Memcached to your CloudVPS or Dedicated Server. If you run your own server, please contact us for details.
We will be announcing support for Redis and Memcached for reseller customers in the very near future.
What are the differences between the two?If your application has built in support for both Redis and Memcached, you may be wondering which to choose.
[What follows is a somewhat technical explanation of the difference between both technologies. If you don't have time to read, or don't care for the technical ins and outs - the short answer is if you have the choice, use Redis. If your application only supports one or other, then use with whichever it supports.]
To understand the difference between the two, it's easier to start with understanding where they're similar. They are both hugely popular and very mature open source projects, widely used by many companies in countless mission critical applications. Both store data in RAM and are about as fast as each other, and both are also often used as 'caches' - but it's at this point where they start to differ.
Although both are under active development, Redis is a newer technology than Memcached, which was originally developed primarily for one purpose - caching data. It does this very well - but that's essentially where it stops. It can store key/value pairs, where the value can be up to 1MB in size, and when it's restarted, your data is gone until it's repopulated. That's fine for a cache - but nothing 'important' should ever be stored there.
Redis was developed, at least in part, in response to the lessons learned from Memcached. As a result it has many more features and is sometimes described as "Memcached on steroids". Redis does everything that Memcached does as a cache, but better. It also does much more.
Firstly, data stored in Redis can be persistent, meaning it is not cleared on restart and can therefore be used as a general purpose data store, rather than just a cache cache.
With Redis, up to 512MB can be stored per object rather than just 1MB, making it the only choice for large data requirements.
Redis also has fine grained control over data eviction, with six different eviction policies to choose from, and the ability to proactively clear data. This contrasts to Memcached which only supports "Least Recently Used" eviction, a more arbitrary data clearing algorithm which aims to clear the least recently used data stored, which is roughly the same size as the new data that needs to be stored.
Finally, Redis has several different data storage types, including strings, hashes, lists, sets, sorted sets and geo data. It also includes commands that you need to make the most of those data types. Memcached can only store data in strings.
So in summary, you're using an open source application which can support both Redis and Memcached as a data cache, we'd generally always recommend using Redis as it offers more functionality which application developers can take advantage of. If your application only supports Memcached, then don't worry too much, as a general purpose in-memory cache, it remains a great solution.
If you're developing your own integration and are considering leveraging Redis or Memcached, again, since Redis can be used as full featured NoSQL data store, we'd definitely recommend that you focus on Redis.
Next steps?Get started today by signing up for a new Business Hosting Plan, or contact our sales team to upgrade an existing plan. Then you can follow the guides below to enable Redis or Memcached:
> How to Setup Redis in cPanel
> How to Setup Memcached in cPanel
If you have any questions or need help implementing this on your website, we are ready to help!