Flickr architecture and MySQL

I’ve read, a time or two, things like “if you’re going to scale, you should probably move away from MySQL up to Oracle or SQL Server.” And for all I can argue, that may be true—but it might depend on your idea of scaling. The other day I read through a Flickr presentation on their Architecture (they’re using MySQL), and came across some very impressive stats (such as ~25,000 DB transactions/second). The presentation says a snapshot of db1.flickr.com shows…

  • SELECT’s 44,220,588
  • INSERT’s 1,349,234
  • UPDATE’s 1,755,503
  • DELETE’s 318,439
  • 13 SELECT’s per Insert/Update/Delete

I would consider that to be a reasonable scale. Oh, and keep in mind, that presentation was from 2004. They’ve probably doubled that since then.

Glancing through those slides has shown me how much I really don’t know about high-traffic application design. But that’s not too disappointing since I’m not-so-much interested in that stuff. Server issues and “vertical partitioning” a DB (whatever that means) doesn’t intrigue me near as much as the application itself. Of course, though (and thankfully), I won’t ever have to worry about an application experiencing over 50 million SELECT’s on one instance of a database cluster. But apparently, when properly configured, MySQL can handle it. I think I’d save the $25,000 it would cost for SQL Server, too.

Comments

01

Nick on Fri Apr 06 at 04:40AM

I really like MySQL and I always have. Though, after taking CS 440 with Dr. Atkins, I really like Oracle, too. But MySQL is pretty hardcore for being an open-source (free) DBMS. First of all, I believe it will even operate in a cluster environment, which is probably what flickr is doing on their end to handle all of those connections.

SQL Server is trash. I had to work with it when I was with the Coast Guard and I just didn’t like it. The “Enterprise Manager”’s interface looked identical to IIS – just a crappy breadcrumb menu on the left and that’s it. And in true Microsoft fashion – most valid ANSI SQL breaks in SQL Server because of the way they perform joins.

02

Ryan on Fri Apr 06 at 05:25AM

Yeah, Dr. Atkins class was pretty cool—probably the most useful and enjoyable class I’ve had. I thought the PL/SQL projects and assignments were fun, which is odd since PL/SQL is basically Ada. Although it was a bit verbose, I actually liked it. Or maybe it was just a break from C/C++ assignments.

Anyway, at $15,000 for standard edition and $40,000 for enterprise edition, per processor, Oracle must do one or two things MySQL can’t. But like you said, for an open-source DB, MySQL is pretty hardcore.

03

Chris on Fri Apr 06 at 06:08AM

The downside to MySQL is user management, which is where SQL Server excels. SQL Server makes it easy to assign users to databases, tables, etc. I don’t like SQL Server, but unfortunately that’s what slate runs on, so I have to deal with it. Luckily, with ActiveRecord I have fewer pains.

Have something to say?
Please rewrite the image text Are You Human? Hint: Are You Human? Formatting Tips

or

© 2009 Ryan Heath | Site Management A Ruby on Rails production.

Get in Touch