[+/-]
The memcached daemon is frequently used as an
in-memory caching layer in front of a MySQL database server. With
the introduction of the InnoDB
memcached plugin, MySQL now allows direct access
to InnoDB
tables using the
memcached protocol and client libraries.
The InnoDB
memcached plugin
provides an integrated memcached daemon that can
automatically store and retrieve data from InnoDB
tables, turning the MySQL server into a fast “key-value
store”. Instead of formulating queries in SQL, you can
perform simple get, set, and increment operations that avoid the
performance overhead of SQL parsing and constructing a query
optimization plan. You can also access the same
InnoDB
tables through SQL for convenience,
complex queries, bulk operations, application compatibility, and
other strengths of traditional database software.
This “NoSQL-style” interface uses the
memcached API to speed up database operations,
letting InnoDB
handle memory caching using its
buffer pool mechanism. Data
modified through memcached operations such as
ADD
, SET
,
INCR
are stored to disk, using
InnoDB
mechanisms such as
change buffering, the
doublewrite buffer,
and crash recovery. The
combination of memcached simplicity and
InnoDB
reliability and consistency provides users
with the best of both worlds, as explained in
Section 14.18.1, “Benefits of the InnoDB / memcached Combination”. For architectural
details about how the components fit together, see
Section 14.18.2, “Architecture of InnoDB and memcached Integration”.
User Comments