SlideShare a Scribd company logo
Technology at digg.com Elliott White III -  Eli Tim Ellis -  Time
What's all this then? History of Tech at Digg Standard Setup Memcached Purpose Driven MySQL Server Pools Sharding Other MySQL details
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...
A Standard Setup Many PHP Servers behind a load balancer:
A Standard Setup Many MySQL slaves, talking to a master
A Standard Setup Randomized PHP to MySQL relations
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.
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.
Purpose Driven MySQL Pools Creating separate slave pools, that are close to identical in order to isolate high database load.
Purpose Driven Pool Example
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
Possible Types of Sharding Table-based Range-based Date-based Hashed Partial Sharding
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
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
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
Any Questions? For this presentation and more: http://eliw.com/ Visit  http://digg.com/

More Related Content

PPTX
Using Redis as Distributed Cache for ASP.NET apps - Peter Kellner, 73rd Stre...
PPTX
Building Scalable Web Apps - LVL.UP KL
PPT
MongoDB at community engine
PPT
High Performance Wordpress
PDF
Roshan Bhattarai: Scaling WordPress for high traffic sites
PPTX
Scaling wordpress for high traffic
PPTX
MongoDB on EC2 and EBS
PPTX
Day 2 General Session Presentations RedisConf
Using Redis as Distributed Cache for ASP.NET apps - Peter Kellner, 73rd Stre...
Building Scalable Web Apps - LVL.UP KL
MongoDB at community engine
High Performance Wordpress
Roshan Bhattarai: Scaling WordPress for high traffic sites
Scaling wordpress for high traffic
MongoDB on EC2 and EBS
Day 2 General Session Presentations RedisConf

What's hot (16)

PPTX
Kubernetes talk at DDDSydney 2017
PPTX
Optimizing Your WordPress Site
PDF
Configuring MongoDB HA Replica Set on AWS EC2
PDF
Memcache and Drupal - Vaibhav Jain
PPTX
Bacula4
PPTX
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
PPTX
PDF
OpenExpo: MySQL, Where are you going?
PDF
dba_lounge_Iasi: Everybody likes redis
PPTX
Rocking mongo db on the cloud
PDF
Growing MongoDB on AWS
PDF
WordCamp RVA
PPTX
Microsoft Azure Storage Basics
PPTX
MySQL At Yelp
PPTX
Scaling Drupal & Deployment in AWS
PDF
High Performance WordPress II
Kubernetes talk at DDDSydney 2017
Optimizing Your WordPress Site
Configuring MongoDB HA Replica Set on AWS EC2
Memcache and Drupal - Vaibhav Jain
Bacula4
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
OpenExpo: MySQL, Where are you going?
dba_lounge_Iasi: Everybody likes redis
Rocking mongo db on the cloud
Growing MongoDB on AWS
WordCamp RVA
Microsoft Azure Storage Basics
MySQL At Yelp
Scaling Drupal & Deployment in AWS
High Performance WordPress II
Ad

Similar to Mysql 2007 Tech At Digg V3 (20)

PDF
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
PDF
Introductiontomysql 100420092731-phpapp01
PPTX
MySQL database
PDF
MySQL overview
PDF
My sql crashcourse_intro_kdl
PDF
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
PDF
🐬 The future of MySQL is Postgres 🐘
ODP
MySQL And Search At Craigslist
PDF
My sql susecon_crashcourse_2012
PDF
Introduction to MySQL
PDF
My Sql And Search At Craigslist
PDF
The MySQL Server ecosystem in 2016
PDF
Getting 100B Metrics to Disk
PDF
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
PDF
Mysql User Camp : 20th June - Mysql New Features
PDF
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
PDF
MySQL overview
PPTX
Web scale MySQL at Facebook (Domas Mituzas)
PPTX
Case Study with Answers.com on Scaling with Memcached and MySQL
PPT
MySQL Alta Disponibilidade com Replicação
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
Introductiontomysql 100420092731-phpapp01
MySQL database
MySQL overview
My sql crashcourse_intro_kdl
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
🐬 The future of MySQL is Postgres 🐘
MySQL And Search At Craigslist
My sql susecon_crashcourse_2012
Introduction to MySQL
My Sql And Search At Craigslist
The MySQL Server ecosystem in 2016
Getting 100B Metrics to Disk
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20th June - Mysql New Features
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
MySQL overview
Web scale MySQL at Facebook (Domas Mituzas)
Case Study with Answers.com on Scaling with Memcached and MySQL
MySQL Alta Disponibilidade com Replicação
Ad

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Review of recent advances in non-invasive hemoglobin estimation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf

Mysql 2007 Tech At Digg V3

  • 1. Technology at digg.com Elliott White III - Eli Tim Ellis - Time
  • 2. What's all this then? History of Tech at Digg Standard Setup Memcached Purpose Driven MySQL Server Pools Sharding Other MySQL details
  • 3. 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...
  • 4. A Standard Setup Many PHP Servers behind a load balancer:
  • 5. A Standard Setup Many MySQL slaves, talking to a master
  • 6. A Standard Setup Randomized PHP to MySQL relations
  • 7. 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.
  • 8. 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.
  • 9. Purpose Driven MySQL Pools Creating separate slave pools, that are close to identical in order to isolate high database load.
  • 11. 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
  • 12. Possible Types of Sharding Table-based Range-based Date-based Hashed Partial Sharding
  • 13. 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
  • 14. 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
  • 15. 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
  • 16. Any Questions? For this presentation and more: http://eliw.com/ Visit http://digg.com/