Why is the Innodb Memcached plugin being deprecated in MySQL 8.0.22?

Posted on

Question :

I originally used “the handlersocket” plugin for NoSQL access to InnoDB tables, then it eventually couldn’t be built on newer versions so I migrated to the “Memcached” plugin which was being baked in by Oracle and seemed like a good long term replacement.

Now there is a notice on the plugin documentation that “InnoDB memcached plugin is deprecated as of MySQL 8.0.22”.

Does anyone know why, and second, does this just mean that it won’t be baked in any more but can still be compiled when required, or that development of the plugin has ceased? If it’s the latter, are there newer/different options for socket access to tables that skip the overhead of the Query Optimizer? I don’t understand why something that adds so much efficiency and flexibility would be dropped so unceremoniously 🙁

Answer :

The memcached plugin never did skip the overhead of InnoDB. It was an API, not a storage engine. Your data posted to the memcached plugin was still subject to transactions, still written to InnoDB’s redo log, still cached in the buffer pool, etc. You could even access the same table via SQL. The only advantage to the memcached plugin was that it skipped SQL parsing, and because you couldn’t do joins or searches except by primary key, that avoided a lot of complex choices for optimization.

I haven’t seen a post that describes their reasons for deprecating this plugin. But any of the following reasons would be good ones:

  • It’s insecure. The memcached API has no authentication by default, and that’s the way it was used in the memcached plugin. This is such a security gap that the documentation discourages users from storing “sensitive data” in the MySQL instance if the memcached plugin is enabled.

    That’s a pretty strong statement for a database vendor to make! What would you think of an automobile whose maker said, “uh, you probably shouldn’t let your family ride in this car.”

  • It’s confusing. Is the memcached API providing access to a memcached instance? No. A memcached work-alike, that is an in-memory datastore? No. Is it as fast as memcached? No.

  • The XDevAPI provides NoSQL data access. This is a more full-featured and secure API for MySQL, and it supports data like a document-oriented database. No doubt MySQL’s product managers would rather developers use this, so they could have a better solution about non-SQL access to data in a MySQL Server.

  • It wasn’t popular enough. You used the memcached plugin, but not many other developers do. If they want to use memcached, it’s not hard to actually use the real memcached service, which has the same advantages of a simple query interface, and also is 2-3 times faster than the memcached plugin in MySQL.

Leave a Reply

Your email address will not be published. Required fields are marked *