Setting up Memcached
MySQL has its own Memcached plugin, daemon_memcached
, which is tightly integrated with the MySQL server. This improves the performance and avoids network traffic over the traditional Memcached approach.
In the traditional way, Memcached was running on a separate port and as a different process; hence, it would have an overhead of network communication between MySQL and Memcached. However, this plugin made it easy to use and lightweight as it is integrated with the MySQL server itself.
Supported environments for this plugin are as follows:
- Linux
- Solaris
- OS X
Let's see to how to set up the daemon_memcached
plugin in the MySQL server. We would have to install this plugin on each of the MySQL server instances, in case we are using the cluster environment of MySQL.
Installation
To enable the Memcached feature with MySQL, we first need to install the dependency for the Memcached plugin. libevent
is the dependency that must be installed on the server to enable the Memcached plugin...