Mysql 2007 Tech At Digg V3

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

3 comments

Comments 1 - 3 of 3 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

63 Favorites & 3 Groups

Mysql 2007 Tech At Digg V3 - Presentation Transcript

      • Technology at digg.com
      • Elliott White III - Eli
      • Tim Ellis - Time
  1. What's all this then?
    • History of Tech at Digg
    • Standard Setup
    • Memcached
    • Purpose Driven MySQL Server Pools
    • Sharding
    • Other MySQL details
  2. History of Tech at Digg
    • Initially one Linux server with Apache 1.3 and PHP 4.x
    • MySQL 4.0 and myisam tables & MySQL full-text search
    • Started with as many open source packages as possible for rapid development.
      • ImageMagick, Ispell, prototype/scriptaculous, etc
    • Grew quick. One server became two. myisam become innodb. We moved to 3 servers, Apache 2.x, MySQL master-slave replication, started using memcached, moved to PHP 5.x & hired a dba
    • And then the pace picked up yet again...
  3. A Standard Setup Many PHP Servers behind a load balancer:
  4. A Standard Setup Many MySQL slaves, talking to a master
  5. A Standard Setup Randomized PHP to MySQL relations
  6. Memcached What is it & Why use it? Why not just pregenerate pages of content?
    • Performance gains:
    • Caching certain chunks of data that may be used on many different pages.
    • From that, still being able to dynamically create the page, but using cached data.
  7. Memcached Server Farm
    • Issues to be solved:
    • Allowing for Failover and Redundancy
    • Removing or ignoring stale data upon machine failure
    • Stopping perpetuation of database slave lag
    • Making the actual decisions of what and when to cache
    • Solution: Write generic code that understands your data.
  8. Purpose Driven MySQL Pools Creating separate slave pools, that are close to identical in order to isolate high database load.
  9. Purpose Driven Pool Example
  10. Sharding Simplest Definition: Breaking up your database into a number of smaller ones.
    • Pros
      • Greater performance
      • Tweakable / Scalable
    • Cons
      • Loss of SQL support (JOIN)
      • Increased PHP load
      • Complicated programming
  11. Possible Types of Sharding Table-based Range-based Date-based Hashed Partial Sharding
  12. How MySQL Can Do Sharding
    • Partition tables
    • Federated tables
    • MySQL Cluster (NDB)
      • Which of these technologies does Digg use?
        • None of them
        • They weren't ready when we needed them
  13. Digg MySQL Specifics
    • Mix of MySQL 5.0 versions: 5.0.22, 5.0.27, 5.0.30, 5.0.32
    • A single MySQL 4.1 supporting Cacti
    • MySQL installation & patching done via Debian apt
    • 5.0 performs fine for us compared to 4.1
    • OLTP DBs are InnoDB & OLAP DB is MyISAM
    • InnoDB backup DB for dumps and slave creation
    • InnoDB recovery faster after slave hardware dies
    • MyISAM great for loads and date-versioned DBs
  14. Current DB Challenges
    • Scaled via “buy more RAM,” can't afford that anymore
    • Physical I/O common, so rewrite queries
    • Convincing site architects to change features to more scalable alternatives
    • MySQL debug binary testing
    • Schema cruft
    • Managing monitoring & alerting systems (Cacti)
    • Master is a single point of failure (not as bad as it sounds)
    • Why are our disks lying? Use diskTest.pl from: http://faemalia.net/mysqlUtils
  15. Any Questions?
      • For this presentation and more: http://eliw.com/
    Visit http://digg.com/

+ epeeepee, 3 years ago

custom

42114 views, 63 favs, 28 embeds more stats

More info about this presentation

© All Rights Reserved

  • Total Views 42114
    • 41466 on SlideShare
    • 648 from embeds
  • Comments 3
  • Favorites 63
  • Downloads 1418
Most viewed embeds
  • 313 views on http://www.simpleentrepreneur.com
  • 86 views on http://blog.taragana.com
  • 67 views on http://www.morphir.com
  • 36 views on http://rapd.wordpress.com
  • 26 views on http://www.yista.com

more

All embeds
  • 313 views on http://www.simpleentrepreneur.com
  • 86 views on http://blog.taragana.com
  • 67 views on http://www.morphir.com
  • 36 views on http://rapd.wordpress.com
  • 26 views on http://www.yista.com
  • 20 views on http://www.netvibes.com
  • 15 views on http://hikrish.blogspot.com
  • 14 views on http://www.hlibco.com.br
  • 9 views on http://www.maitrella.com
  • 8 views on http://headstart.in
  • 6 views on http://www.nexen.net
  • 6 views on http://www.tekevo.net
  • 5 views on http://www.ventureitch.com
  • 5 views on http://ronaldoprazeres.com.br
  • 5 views on http://www.via6.com
  • 4 views on http://www.lonerunners.net
  • 4 views on http://morphir.com
  • 3 views on http://static.slideshare.net
  • 3 views on http://yista.com
  • 3 views on http://s3.amazonaws.com
  • 2 views on http://www.ronaldoprazeres.com.br
  • 2 views on http://localhost
  • 1 views on http://10.10.12.70
  • 1 views on http://feeds.feedburner.com
  • 1 views on http://64.233.169.104
  • 1 views on http://64.233.183.104
  • 1 views on http://km2factory.sud.capgemini.fr
  • 1 views on http://wildfire.gigya.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories