Mathias Meyer
Mathias Meyer


Paul Tuckfield (YouTube’s MySQL administrator) gave a nice talk on do’s and don’ts when it comes to scaling MySQL. He held it at last year’s MySQL Conference, so it’s not that recent, but it’s still very much worth it.

You can (and should) watch his presentation, though unfortunately his slides don’t seem to be available anywhere. Colin Charles took some notes which sum it up quite nicely.

At the end of his talks, Paul mentions the oracle caching mechanism. On each of their replication slaves they have a script running that basically reads the relay log on the slaves a little bit ahead of the SQL thread and turns the statements into SELECTs. The data is fetched into the cache and will already be there when the slave wants to update the data, so that I/O is minimized at the point of the actual applying of the data in the relay log. Pretty neat stuff.

A tool called MaatKit now includes a command that does exactly that. The author of MaatKit also wrote a nice article on the issue.

Paul also says that Python is one of the factors that YouTube scales. A little something to think about.