SlideShare a Scribd company logo
Scalability at GROU.PSEmreSokullu
DisclaimerWe’re not fully there yetWe hire: jobs@groups-inc.com
Challenges @ GROU.PS3M unique visitors per month120M page views1PB assets to be served every monthVideo,Photos, FilesSupport for 5Gbit/sVery dynamic pages:With social networks; p(u,t) = HTMLp(g,u,t) = HTML -> WHERE group_id = ? AND …
What is GROU.PS ?
Scalability at GROU.PS
Scalability at GROU.PS
Scalability at GROU.PS
Scalability at GROU.PS
Distributed Architecture25+ servers, S3 cloud, EdgeCast CDN4 cores + All Linux: Red HatSome Debian, Ubuntu, CentOS
Amazon TechnologiesS3CloudFrontEC2 (elastic IP and persistent storage)SimpleDBQueue technologies, distributed hadoop and more…
Amazon TechnologiesDownside: Not so cheapBad database performance
Serving Content?Use MogileFSDistributed file servingUse CDNhot content served off from local serversSysctl tunings needed!
Our typical sysctl additionsnet.ipv4.tcp_syncookies = 1net.ipv4.tcp_synack_retries = 2## Emre edited# http://www.oracle-base.com/articles/11g/OracleDB11gR1InstallationOnFedora8.phpkernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=4194304#net.core.rmem_max=4194304net.core.wmem_default=262144#net.core.wmem_max=262144fs.file-max=5049800vm.swappiness=10## Emre edited# from http://forums.softlayer.com/showthread.php?t=3252net.ipv4.tcp_rmem = 4096 87380 8388608net.ipv4.tcp_wmem = 4096 87380 8388608net.core.rmem_max = 8388608net.core.wmem_max = 8388608net.core.netdev_max_backlog = 5000net.ipv4.tcp_window_scaling = 1net.ipv4.ip_nonlocal_bind=1# http://rackerhacker.com/2007/08/24/apache-no-space-left-on-device-couldnt-create-accept-lock/kernel.msgmni = 1024kernel.sem = 250 256000 32 1024net.ipv4.ip_conntrack_max = 524288net.ipv4.netfilter.ip_conntrack_max = 524288
MySQLLoad off via memcache$memcache->set(“group_by_name.jtpd”, 1122, false, 0);$memcache->set(“home_module_html.1122”,…, true, 30);function getGroupID($group_name) {  global $memcache;  if( !isset($memcache) || ($res=($memcache->get(“group_by_name.{$group_name}”)))===false ) {    // get it from mysql and memcache  }  else {    return $res; // serve from memcache  }}
MySQLReplication easySplit ReadsWhat about writes?That’s where sharding comes to playVertical ShardingHorizontal ShardingMMM
MySQLRuns poorly on multi-coresquery_cache_size = 0 # on masterquery_cache_type = 0 # on masterthread_concurrency = 8 # total coresmax_connections = 750 # shouldn’t exceed thatinnodb_buffer_pool_size = 10G  # a little less than the total amount
MySQL Query OptimizationINDEX  group, userWHERE group = ? AND user = ?Not WHERE user = ? AND group = ?B-tree
MySQL Query OptimizationSHOW PROCESSLISTMaatkit, mk-query-digestPercona builds
NOSQLVoldemort, LinkedinCassandra, FacebookTokyo Cabinet, mixi
LoggingDatabase logging is not the solutionFile system is expensive tooA legal necessity
LoggingSolution:Scribe & ThriftBy FacebookEventually consistent
Nginx & libevent
Nginx & libeventHandles 10000 connections5gbit/sRamblerWordpressGrou.ps
PostfixRun multiple instancesSpam Clusters
MonitoringMunin + monitOther alternatives:CactiNagiosHyperic – vmware
PHP
More to come on my bloghttp://emresokullu.comMore fine tuning tipsBecome a member of my communityLove grou.ps ;)Convert to PHPWe’re hiring: jobs@groups-inc.com

More Related Content

PDF
Hosting MongoDB & our experience with database as a service
ODP
Hosting Drupal on Amazon EC2
PPTX
Drupal in the cloud with Windows Azure
PDF
Bacd zenoss
KEY
CHI - YAPC NA 2012
ZIP
CHI-YAPC-2009
PPTX
Heap Dump Analysis - AEM: Real World Issues
ODP
Itb session v_memcached
Hosting MongoDB & our experience with database as a service
Hosting Drupal on Amazon EC2
Drupal in the cloud with Windows Azure
Bacd zenoss
CHI - YAPC NA 2012
CHI-YAPC-2009
Heap Dump Analysis - AEM: Real World Issues
Itb session v_memcached

What's hot (19)

PPTX
Kenshoo - Use Hadoop, One Week, No Coding
PPTX
Azure Recovery Services
PPTX
Cloud init and cloud provisioning [openstack summit vancouver]
PPTX
Migrating Existing Open Source Machine Learning to Azure
PDF
Sofia WP User Group Presentation
PDF
High Performance Drupal
PPT
Day of Cloud: Amazon EC2
PPTX
Running JVM in Docker
PPT
Implementing High Performance Drupal Sites
PDF
Rich storytelling with Drupal, Paragraphs and Islandora DAMS
PDF
Scaling in Mind (Case study of Drupal Core)
PPTX
Automating with Ansible
PDF
Migratory Workloads Across Clouds with Nomad
PDF
Environment for training models
PDF
Practical Hadoop Big Data Training Course by Certified Architect
PPTX
Performance Demystified for SQL Server on Azure Virtual Machines
PDF
Optimize drupal
PDF
CloudOps CloudStack Days, Austin April 2015
PDF
Lessons Learned at Wakoopa
Kenshoo - Use Hadoop, One Week, No Coding
Azure Recovery Services
Cloud init and cloud provisioning [openstack summit vancouver]
Migrating Existing Open Source Machine Learning to Azure
Sofia WP User Group Presentation
High Performance Drupal
Day of Cloud: Amazon EC2
Running JVM in Docker
Implementing High Performance Drupal Sites
Rich storytelling with Drupal, Paragraphs and Islandora DAMS
Scaling in Mind (Case study of Drupal Core)
Automating with Ansible
Migratory Workloads Across Clouds with Nomad
Environment for training models
Practical Hadoop Big Data Training Course by Certified Architect
Performance Demystified for SQL Server on Azure Virtual Machines
Optimize drupal
CloudOps CloudStack Days, Austin April 2015
Lessons Learned at Wakoopa
Ad

Viewers also liked (17)

PDF
Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
PPT
E-Tohum Girisimcilik Sunumu
PDF
Violence Stops Here2011 Tearsheet
PPSX
2011 Violence Stops Here Campaign Details Finalanalysis San
PPT
Project Proteus Proteus Overview Q404
PPT
Value Stream Mapping
PDF
Project management in a visual way
PPTX
Facebook Connect & Facebook Platform In Use At GROU.PS
PPT
Five Whys
PPT
Silikon vadisi'nde turk olmak 2014 odtu
PPT
Quality Circle
PPT
The Basics of Creating a Metric
PPT
Waste Overview and Benefits
PPT
Reunion 1º trrm 13 14
PPT
Root Cause Corrective Action
PPT
Leading High Performance Teams
PPT
Conducting Effective Meetings
Mayor Emanuel meets with Responsible Retailers group to improve liquor store ...
E-Tohum Girisimcilik Sunumu
Violence Stops Here2011 Tearsheet
2011 Violence Stops Here Campaign Details Finalanalysis San
Project Proteus Proteus Overview Q404
Value Stream Mapping
Project management in a visual way
Facebook Connect & Facebook Platform In Use At GROU.PS
Five Whys
Silikon vadisi'nde turk olmak 2014 odtu
Quality Circle
The Basics of Creating a Metric
Waste Overview and Benefits
Reunion 1º trrm 13 14
Root Cause Corrective Action
Leading High Performance Teams
Conducting Effective Meetings
Ad

Similar to Scalability at GROU.PS (20)

PPTX
EEDC 2010. Scaling Web Applications
PDF
Scaling MySQL -- Swanseacon.co.uk
PDF
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
PPS
Scalable Web Architectures - Common Patterns & Approaches
PPS
Scalable Web Arch
PPS
Web20expo Scalable Web Arch
PPS
Web20expo Scalable Web Arch
PPS
Web20expo Scalable Web Arch
PPT
Gavin M
PPS
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
PPTX
Infrastructure review - Shining a light on the Black Box
PDF
My Sql And Search At Craigslist
PPTX
Black Friday and Cyber Monday- Best Practices for Your E-Commerce Database
ODP
MNPHP Scalable Architecture 101 - Feb 3 2011
PDF
Memcached Code Camp 2009
PDF
Your backend architecture is what matters slideshare
PDF
Deployment
PDF
System Design.pdf
PDF
System design handwritten notes guidance
ODP
Scalable Architecture 101
EEDC 2010. Scaling Web Applications
Scaling MySQL -- Swanseacon.co.uk
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Arch
Web20expo Scalable Web Arch
Web20expo Scalable Web Arch
Web20expo Scalable Web Arch
Gavin M
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Infrastructure review - Shining a light on the Black Box
My Sql And Search At Craigslist
Black Friday and Cyber Monday- Best Practices for Your E-Commerce Database
MNPHP Scalable Architecture 101 - Feb 3 2011
Memcached Code Camp 2009
Your backend architecture is what matters slideshare
Deployment
System Design.pdf
System design handwritten notes guidance
Scalable Architecture 101

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
A Presentation on Artificial Intelligence
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Mushroom cultivation and it's methods.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MIND Revenue Release Quarter 2 2025 Press Release
A Presentation on Artificial Intelligence
A novel scalable deep ensemble learning framework for big data classification...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
A comparative analysis of optical character recognition models for extracting...
cloud_computing_Infrastucture_as_cloud_p
WOOl fibre morphology and structure.pdf for textiles
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Unlocking AI with Model Context Protocol (MCP)
Mushroom cultivation and it's methods.pdf
1 - Historical Antecedents, Social Consideration.pdf
Web App vs Mobile App What Should You Build First.pdf
Encapsulation theory and applications.pdf
1. Introduction to Computer Programming.pptx
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars

Scalability at GROU.PS

  • 2. DisclaimerWe’re not fully there yetWe hire: jobs@groups-inc.com
  • 3. Challenges @ GROU.PS3M unique visitors per month120M page views1PB assets to be served every monthVideo,Photos, FilesSupport for 5Gbit/sVery dynamic pages:With social networks; p(u,t) = HTMLp(g,u,t) = HTML -> WHERE group_id = ? AND …
  • 9. Distributed Architecture25+ servers, S3 cloud, EdgeCast CDN4 cores + All Linux: Red HatSome Debian, Ubuntu, CentOS
  • 10. Amazon TechnologiesS3CloudFrontEC2 (elastic IP and persistent storage)SimpleDBQueue technologies, distributed hadoop and more…
  • 11. Amazon TechnologiesDownside: Not so cheapBad database performance
  • 12. Serving Content?Use MogileFSDistributed file servingUse CDNhot content served off from local serversSysctl tunings needed!
  • 13. Our typical sysctl additionsnet.ipv4.tcp_syncookies = 1net.ipv4.tcp_synack_retries = 2## Emre edited# http://www.oracle-base.com/articles/11g/OracleDB11gR1InstallationOnFedora8.phpkernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=4194304#net.core.rmem_max=4194304net.core.wmem_default=262144#net.core.wmem_max=262144fs.file-max=5049800vm.swappiness=10## Emre edited# from http://forums.softlayer.com/showthread.php?t=3252net.ipv4.tcp_rmem = 4096 87380 8388608net.ipv4.tcp_wmem = 4096 87380 8388608net.core.rmem_max = 8388608net.core.wmem_max = 8388608net.core.netdev_max_backlog = 5000net.ipv4.tcp_window_scaling = 1net.ipv4.ip_nonlocal_bind=1# http://rackerhacker.com/2007/08/24/apache-no-space-left-on-device-couldnt-create-accept-lock/kernel.msgmni = 1024kernel.sem = 250 256000 32 1024net.ipv4.ip_conntrack_max = 524288net.ipv4.netfilter.ip_conntrack_max = 524288
  • 14. MySQLLoad off via memcache$memcache->set(“group_by_name.jtpd”, 1122, false, 0);$memcache->set(“home_module_html.1122”,…, true, 30);function getGroupID($group_name) { global $memcache; if( !isset($memcache) || ($res=($memcache->get(“group_by_name.{$group_name}”)))===false ) { // get it from mysql and memcache } else { return $res; // serve from memcache }}
  • 15. MySQLReplication easySplit ReadsWhat about writes?That’s where sharding comes to playVertical ShardingHorizontal ShardingMMM
  • 16. MySQLRuns poorly on multi-coresquery_cache_size = 0 # on masterquery_cache_type = 0 # on masterthread_concurrency = 8 # total coresmax_connections = 750 # shouldn’t exceed thatinnodb_buffer_pool_size = 10G # a little less than the total amount
  • 17. MySQL Query OptimizationINDEX group, userWHERE group = ? AND user = ?Not WHERE user = ? AND group = ?B-tree
  • 18. MySQL Query OptimizationSHOW PROCESSLISTMaatkit, mk-query-digestPercona builds
  • 20. LoggingDatabase logging is not the solutionFile system is expensive tooA legal necessity
  • 21. LoggingSolution:Scribe & ThriftBy FacebookEventually consistent
  • 23. Nginx & libeventHandles 10000 connections5gbit/sRamblerWordpressGrou.ps
  • 25. MonitoringMunin + monitOther alternatives:CactiNagiosHyperic – vmware
  • 26. PHP
  • 27. More to come on my bloghttp://emresokullu.comMore fine tuning tipsBecome a member of my communityLove grou.ps ;)Convert to PHPWe’re hiring: jobs@groups-inc.com