All the MySQL-as-a-Service Services I Can Find
If you’ve followed the past couple of database-as-a-service (DBaaS) articles, you will have learned about Postgres as a service and MySQL as a service; I touched on a few related software-as-a-service (SaaS) offerings, such as hosted MongoDB and the NoSQL pack, as well.
This time I’m going to give a quick tour of the available MySQL-as-a-service products, although I should say LLMaaS – looks like MySQL as a Service – because if you’re looking for a hosted product that provides you with all the features of MySQL, it isn’t necessarily going to be running MySQL on the back end, as you saw with Xeround.
Because I haven’t used all of these services, this is more of a survey of the services out there that I’ve come across; so, you don’t have to wait for me to get around to trying them. I hope, in future, to have time to delve into more detail and bring you the exciting features that will turn your life around.
When I started this list last year, several of the services weren’t available or in their current form. The DBaaS market, along with SaaS, appears to be in early days. Some services from big providers, such as HP, Amazon Web Service (AWS), and Rackspace, are likely to be unchanged over the next few years, but the offerings of other providers will continue to change – if not individually, then in the market as a whole.
The MySQL Lock-In
Any technology presents a big lock-in, but for many companies, the database will present an increasing hold on them. Unlike the software layer, the database contains the data of the business, which means the longer it sits there, the less compelling is a change to it.
However, problems will arise. Although some people have suggested this database lock-in affects the likes of Facebook, you don’t need to panic. This shouldn’t be read as “don’t use MySQL”; however, consider in what ways you are locked in and know the options for hosting that data.
MySQL is a huge and still growing market. Despite the encroachment of NoSQL and other database engines, MySQL isn’t going away any time soon. Is it worth learning MySQL really well? Is it a skill that is valuable? Yes, it is.
As the size of the market grows, so will the range and size of the applications it powers. Services, forks, and alternatives each try to solve the problems of scaling and stability.
In return for fixing some of your problems, you have to make compromises along the way. For example, you might lose the chance to configure the database, or even part of the SQL language.
Google’s MySQL Cloud – Cloud SQL
Google’s app engine used to have only non-relational data storage, but last year they launched the Google MySQL cloud. They say, “By offering the capabilities of a familiar MySQL database, the service enables you to easily move your data, applications, and services in and out of the cloud.”
Instances start at US$ 1.46 per day for a 1GB database with half a gigabyte of RAM, which compares with AWS very well (which I use as an arbitrary benchmark), considering you’re getting much more than the bare metal.
As for Drizzle, which I’ll look at in a moment, and a few other services, you do lose out on a few standard MySQL features. User-defined functions might stop some people, but MySQL replication should be a infrastructure-level feature, rather than an app-level feature.
Missing functionality or slightly different functionality is either something you won’t notice or will hurt you. If it hurts and the application isn’t open source and suitably well designed, or if you aren’t familiar with it, then lacking features will be a show-stopper. This is true of all the MySQL alternatives, not just Google’s.
The missing features will hardly be noticed by many people. Say you try to use those features: The error messages you get are lovely: Error messages that mean something. Take note, developers:
Error 1290: The MySQL server is running with the google option so it cannot execute this statement
Google offers databases up to 10GB in size that will cost you US$ 11.71 per day. As for most of the DBaaS offerings, backups can be scheduled, and restoration can be run for you. These kind of features are really useful if you’re handing over the day-to-day management to non-technical staff.
The CLI tool can be used to pipe SQL directly up to the Google Cloud and run in interactive mode.
dotCloud
dotCloud is a platform that hides all the server details and lets you concentrate on setting up stacks, which are built of fairly generic services, such as Apache, MySQL, and the like. You provide the requirements – Python, Postgres, Mongo – and dotCloud launches and manages the instances for you.
The UX for the developer or sys admin is similar to Heroku: A command-line tool is used to provision, deploy, and manage the service.
The dotCloud service is configured with one simple dotcloud.yml file. To add MySQL to your stack, add the lines:
data: type: mysql
A few commands later, you’ve created the database and pushed your data to it. The dotCloud CLI tool gives you command-line acess to MySQL, which is really important with all these services. Unless you’ve planned it very well, at a certain point, you have to get a low-level connection and see your data.
Scaling is done by simply running:
dotcloud scale myapp data:instances=5
This is pretty normal – in fact, very similar to the scaling rules on AWS – but I’m not sure what I think of this. Scaling can be hidden further from the user, perhaps just setting an upper limit of cost or lower limit of performance. What dotCloud provides saves you a lot of fiddly architecture, though.
Under the hood, dotCloud’s MySQL service is MySQL as far as I can tell. This means you’re getting MySQL, but it also means you’re missing some of the features of running on one of the alternatives.
MemSQL
Uncompromisingly tagging themselves as “The World’s Fastest Database,” MemSQL provides “wire-compatibility with MySQL” but avoids use of the disk, preferring to run in memory. In-memory applications are increasingly popular and set to take over many areas of infrastructure, starting with apps that have large real-time or on-demand processing requirements.
To add weight to their claim, they state that “MemSQL is 30 times faster than MySQL.” They target real-time apps, such as finanical, ad-serving, and mobile applications.
This app is neither free nor runs as a service; however, it made my list because they’ve tackled the performance problem in an interesting way by taking out the big old disk. Anyone who’s worked on systems at any kind of scale ends up looking at part of the performance graph thinking, “what if I can kill that bit.” That’s what these guys did.
The company was set up by ex-Facebookers, which isn’t surprising given the investment in MySQL knowledge Facebook is continually making.
MemSQL’s approach to optimizing is to compile the queries into “native instructions for utmost efficiency of the CPU,” which is outlined in a MemSQL whitepaper.
As these guys have emerged from Facebook it’s worth reading their history and some comments about them. As with many of these MySQL alternatives, people are picking up on the details: “No outer or full outer joins, can only join two tables …,”
Anyone who has investigated running MySQL faster in memory will be interested, but read about the reasons to go with MemSQL first.
I couldn’t close better than with their own hype:
MemSQL is a next generation database that removes the most common bottleneck applications hit today: disk. By offering a familiar relational interface to an in-memory data tier, MemSQL empowers developers with the technology web-scale companies use to cope with massive traffic and growth. MemSQL offers orders of magnitude improvements in write and read performance and greatly simplifies application development and maintenance by offering wire-compatibility with MySQL.
Drizzle
Another approach to fixing the MySQL problem is Drizzle, a fork of MySQL, apparently for two reasons: license and architecture choices: “Drizzle is a transactional, relational, community-driven open source database that is forked from the popular MySQL database.”
They have stripped back the code, refactored it, and converted it to modern C++ and libraries – which will either sound like programmers doing code for its own sake or a much needed tidying up. One important change is making the codebase more modular.
The motivation for the license started with Sun’s acquisition of MySQL in 2008, which caused Brian Aker to begin the Drizzle project. Drizzle is an active fork of the MySQL server, and it appears to have some good contributors. A few other forks of MySQL exist if you’re interested. Contributions to the project come from Red Hat, Canonical, Google, Rackspace, Sun, Six Apart (creators of Movable Type), and others.
To install Drizzle on Ubuntu, enter:
apt-get install drizzle
To install the PHP drivers, enter
sudo pecl install -f drizzle
Please read all the docs before doing this on a production system because the drivers are only in beta at the moment.Although this is pretty easy, it could be a little easier. This is definitely something I will be running soon, so I hope they’ll make installation painfully easy.
When you try, investigate the ways in which Drizzle differs from MySQL. Lots of things have been removed, such as CSV storage engines (who really uses them?), several keywords, and other features that the team deamed unnecessary.
HP’s Cloud Relational Database for MySQL
Finally, since it launched in March last year, HP has been a strong alternative to the big-cloud providers. In beta, their database offering – HP Cloud Relational Database for MySQL – provides the standard set of features you’d expect with managed MySQL: snapshots, a management console, and managed scaling.
More Than One
I’ve presented a rapid tour of some database options. If you’re going to chose one service, it’s worth trying a few, but for a few reasons, people won’t move:
- Trust. Will it actually work?
- Is this something you really need? Swapping out one technology for another presents the question of training, especially given the team already knows MySQL well.
- If you’ve been running databases on physical hosting or cloud for a number of years, you’re used to logging in to the OS to administer it. You’re going to lose that ability with a few of the options here.
- The database engine might not be MySQL. Is that going to bother you?
- The solution might not be around forever. Are you able to migrate?
Let me know how it goes if you are running these in production.