What's the best way to scale a single database horizontally?
In this episode of The Software Engineering Radio podcast the interviewer talks with a Distinguished Architect at eBay. As you might imagine, eBay has scalability concerns both horizontally and vertically. This issue is discussed at length and well worth a listen, as the architect explains it better and more thoroughly than I could here.
A lot of the systems that I've seen that scale horizontally use MS SQL Server 2005.
Database design plays a large part of the scaling too. Use GUID for primary keys in your table so that it prevents primary key collisions from inserts. I then use SQL Server's Merge Replication to keep the database synchronized together.
This is just a quick summary, but it will give you a head start.
For those of you who are a little too lazy (or do not have headphones), you can download the slides (of the presentation Alan was talking about) here -
Alternatively, you can read this article -
http://www.infoq.com/articles/ebay-scalability-best-practices
This article talks about Flickr's architecture and how they delt with MySQL scaling
http://www.niallkennedy.com/blog/uploads/flickr_php.pdf
Another good site reference for scaling is: http://highscalability.com/