Quantcast
Channel: HostingFu » mediatemple
Viewing all articles
Browse latest Browse all 2

Media Temple and Its New MySQL Containers

$
0
0

Media Temple Media Temple, home of the Grid Server which I wrote about here, has just posted an excellent post on their blog, titled Anatomy of MySQL on the Grid Server. It

  1. Acknowledge MySQL issues in the current grid server platform.
  2. Talk about their old load balancing system for MySQL, and why it did not work.
  3. Discuss their new VPS based MySQL solution that will be switched on in March.

Scaling databases on a shared multi-tenant system has to be one of the most challenging exercise for system administrators, and I am sure the Media Temple would agree. Because of the way web applications are usually written these days, scaling your PHP apps can be trivial. PHP’s share nothing architecture makes scalability native to the language itself, and you can simply add more boxes to take care the load on the web servers.

However, with “share-nothing”, the design is that all states are pushed into the database, and the assumption is that database is scalable. Is the database scalable? That alone is worth a separate discussion article. To cut the story short, you cannot simply add more hardware to scale up a busy database server. It usually requires the application to optimise the way data are queried. Setting up replication. Distribute heavy queries. Partition the dataset. Rewrite big queries into smaller ones in case of MySQL. Etc etc.

With shared hosting, you’ll get even more problems. As a web hosting provider you need to optimise your database to cater for your customers who might install random or home-made apps with badly designed queries.

Media Temple’s old design was pretty interesting — a load balancer for MySQL database clusters. From the description, it looks like it constantly monitor all MySQL servers in the system, and live-migrate busy databases onto servers that are less loaded. However it does not work as hostile DB users can still bring the entire database server to its knees, where anyone else on the same server will suffer.

Media Temple’s new approach is even more interesting — they will put MySQL into “containers”, i.e. a VPS-like environment with restricted CPU and RAM. From the description I think the new MySQL container approach will be even easier to manage than the current load balancing cluster approach.

Each account would have its own MySQL server running inside a VPS. Instead of continuously monitoring the load and move the offending DBs around, they can just rely on the virtualisation software to keep each instance in check. A busy user will only crash his own MySQL container and won’t affect other accounts. Likewise, a light user should always receive guaranteed CPU and IO.

That’s quite revolutionary for shared hosts. Well done! It also demonstrated a great use case for VPS — partition otherwise shared resources.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images