SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
Lessons Learned
  while building Wakoopa
Menno van der Sman
    Developer at Wakoopa
       since May 2007
Wakoopa is about
   software
PC   Mac
200
million
Does it scale?
Scaling the front is easy
Scaling the back is
      harder
Limits spawn creativity
One server


            at Railsmachine
sliced into staging, production and db

            MySQL 4.1
         Apache + Mongrel
Background queue
Lots of tools already

BackgroundRB, DelayedJob, Daemons etc
Rolling our own

           database based
         using script/runner
processing multiple items in one loop
     one cache update per loop
Smart queries
    UPDATE developers SET active_seconds = active_seconds + ...


INSERT INTO hourly_usage (...) VALUES (...) ON DUPLICATE KEY UPDATE
  active_seconds = active_seconds + ..., idle_seconds = idle_seconds + ...



                     Allows for concurrency
Size = rowsize x rows
     Make rowsize smaller
sometimes `id`
shouldn’t be the
  Primary Key
Enter
composite_primary_keys
Overrides default PK
    class HourlyUsage < ActiveRecord::Base
      set_primary_keys :user_id, :software_id, :used_at

      ...
    end




         Original idea by Dr Nic
 Enhanced for Rail 2.1 by Darrin Holst
  http://compositekeys.rubyforge.org/
Archive old data
 that’s not frequently used
HourlyUsage
                 to
          HourlyUsageStorage
SELECT ... FROM hourly_usage WHERE used_at < '...' INTO OUTFILE '/path/to/file'

 LOAD DATA INFILE '/path/to/file' REPLACE INTO TABLE hourly_usage_storage




                      avoids long locks
Upcoming
improvements
MySQL 5.1
              Partitioning
   CREATE TABLE hourly_usage_storage ( ... )
   PARTITION BY RANGE (software_id) (
      PARTITION p0 VALUES LESS THAN (...),
      PARTITION p1 VALUES LESS THAN (...),
      PARTITION p2 VALUES LESS THAN (...),
      PARTITION p3 VALUES LESS THAN (...),
      ....
      PARTITION pn VALUES LESS THAN MAXVALUE
   );


Makes ‘WHERE software_id = ...’ very fast


     Available in MySQL 5.1
And many more plans

Designing a new infrastructure

            MySQL 5.1
           Memcached
              Sphinx
             Rails 2.1
           Amazon EC2
Announcing a new blog

  Inside Wakoopa
   http://inside.wakoopa.com
Questions?
             or suggestions?



Looking for C++ and frontend awesomeness
        http://wakoopa.com/jobs
Lessons Learned at Wakoopa

Más contenido relacionado

La actualidad más candente

Advance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul IntiAdvance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul IntiSahil Davawala
 
HashiCorp at Just Eat
HashiCorp at Just EatHashiCorp at Just Eat
HashiCorp at Just EatAndrew Brown
 
AWS Lambda at JUST EAT
AWS Lambda at JUST EATAWS Lambda at JUST EAT
AWS Lambda at JUST EATAndrew Brown
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual MachinesNeil Mackenzie
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with CapistranoSumit Chhetri
 
EXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationSuresh Kumar
 
Hosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a serviceHosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a serviceGrzegorz Gwoźdź
 
20명 규모의 팀에서 Vault 사용하기
20명 규모의 팀에서 Vault 사용하기20명 규모의 팀에서 Vault 사용하기
20명 규모의 팀에서 Vault 사용하기Doyoon Kim
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraFormWesley Charles Blake
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftWan Muzaffar Wan Hashim
 
ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014
ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014
ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014ChinaNetCloud
 
IaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual MachinesIaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual MachinesPavel Revenkov
 

La actualidad más candente (20)

Advance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul IntiAdvance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul Inti
 
HashiCorp at Just Eat
HashiCorp at Just EatHashiCorp at Just Eat
HashiCorp at Just Eat
 
Scalr Demo
Scalr DemoScalr Demo
Scalr Demo
 
AWS Lambda at JUST EAT
AWS Lambda at JUST EATAWS Lambda at JUST EAT
AWS Lambda at JUST EAT
 
Sql installation
Sql installationSql installation
Sql installation
 
London Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in ProductionLondon Hug 19/5 - Terraform in Production
London Hug 19/5 - Terraform in Production
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
DynamoDB for PHP sessions
DynamoDB for PHP sessionsDynamoDB for PHP sessions
DynamoDB for PHP sessions
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
 
EXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application Clustering
 
Cloudinit
CloudinitCloudinit
Cloudinit
 
Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible
 
Ansible and AWS
Ansible and AWSAnsible and AWS
Ansible and AWS
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Hosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a serviceHosting MongoDB & our experience with database as a service
Hosting MongoDB & our experience with database as a service
 
20명 규모의 팀에서 Vault 사용하기
20명 규모의 팀에서 Vault 사용하기20명 규모의 팀에서 Vault 사용하기
20명 규모의 팀에서 Vault 사용하기
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraForm
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in Swift
 
ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014
ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014
ChinaNetCloud - The Zabbix Database - Zabbix Conference 2014
 
IaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual MachinesIaaS: Windows Azure Virtual Machines
IaaS: Windows Azure Virtual Machines
 

Destacado

Wakoopa Recommendation Engine on AWS
Wakoopa Recommendation Engine on AWSWakoopa Recommendation Engine on AWS
Wakoopa Recommendation Engine on AWSMenno van der Sman
 
A Kirkbride visual CV 2013
A Kirkbride visual CV 2013A Kirkbride visual CV 2013
A Kirkbride visual CV 2013Austin Kirkbride
 
Motörhead
MotörheadMotörhead
MotörheadEirikVR
 
El Viol.Loncel Magic2
El Viol.Loncel Magic2El Viol.Loncel Magic2
El Viol.Loncel Magic2a8002231
 
育英國中校園資訊環境簡介
育英國中校園資訊環境簡介育英國中校園資訊環境簡介
育英國中校園資訊環境簡介shouyu cheng
 
Nuevos Escenarios: tecnología, cultura y subjetividad
Nuevos Escenarios: tecnología, cultura y subjetividadNuevos Escenarios: tecnología, cultura y subjetividad
Nuevos Escenarios: tecnología, cultura y subjetividadDaliaGut
 
Talle rtic s
Talle rtic sTalle rtic s
Talle rtic sAnel Sosa
 
Talle rtic s
Talle rtic sTalle rtic s
Talle rtic sAnel Sosa
 
Presentación1
Presentación1Presentación1
Presentación1Anel Sosa
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanPost Planner
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionIn a Rocket
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting PersonalKirsty Hulse
 

Destacado (19)

Wakoopa Recommendation Engine on AWS
Wakoopa Recommendation Engine on AWSWakoopa Recommendation Engine on AWS
Wakoopa Recommendation Engine on AWS
 
Ams.rb Oktober
Ams.rb OktoberAms.rb Oktober
Ams.rb Oktober
 
Introduction to Rails
Introduction to RailsIntroduction to Rails
Introduction to Rails
 
A Kirkbride visual CV 2013
A Kirkbride visual CV 2013A Kirkbride visual CV 2013
A Kirkbride visual CV 2013
 
Motörhead
MotörheadMotörhead
Motörhead
 
When Change Fails
When Change FailsWhen Change Fails
When Change Fails
 
Jaja
JajaJaja
Jaja
 
7 phases of pain
7 phases of pain7 phases of pain
7 phases of pain
 
El Viol.Loncel Magic2
El Viol.Loncel Magic2El Viol.Loncel Magic2
El Viol.Loncel Magic2
 
育英國中校園資訊環境簡介
育英國中校園資訊環境簡介育英國中校園資訊環境簡介
育英國中校園資訊環境簡介
 
Juan
JuanJuan
Juan
 
部落格
部落格部落格
部落格
 
Nuevos Escenarios: tecnología, cultura y subjetividad
Nuevos Escenarios: tecnología, cultura y subjetividadNuevos Escenarios: tecnología, cultura y subjetividad
Nuevos Escenarios: tecnología, cultura y subjetividad
 
Talle rtic s
Talle rtic sTalle rtic s
Talle rtic s
 
Talle rtic s
Talle rtic sTalle rtic s
Talle rtic s
 
Presentación1
Presentación1Presentación1
Presentación1
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media Plan
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 

Similar a Lessons Learned at Wakoopa

Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesNicola Ferraro
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
Just one-shade-of-openstack
Just one-shade-of-openstackJust one-shade-of-openstack
Just one-shade-of-openstackRoberto Polli
 
Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvarsSam Marley-Jarrett
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsMarcelo Pinheiro
 
Apache Spark Workshop, Apr. 2016, Euangelos Linardos
Apache Spark Workshop, Apr. 2016, Euangelos LinardosApache Spark Workshop, Apr. 2016, Euangelos Linardos
Apache Spark Workshop, Apr. 2016, Euangelos LinardosEuangelos Linardos
 
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014gethue
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?Thava Alagu
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardwayDave Pitts
 
Migrating existing open source machine learning to azure
Migrating existing open source machine learning to azureMigrating existing open source machine learning to azure
Migrating existing open source machine learning to azureMicrosoft Tech Community
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Scaling up Near Real-time Analytics @Uber &LinkedIn
Scaling up Near Real-time Analytics @Uber &LinkedInScaling up Near Real-time Analytics @Uber &LinkedIn
Scaling up Near Real-time Analytics @Uber &LinkedInC4Media
 
Migrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureMigrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureRevolution Analytics
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterKenny Gryp
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBXESUG
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersoazabir
 

Similar a Lessons Learned at Wakoopa (20)

Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
MySQL on Docker and Kubernetes
MySQL on Docker and KubernetesMySQL on Docker and Kubernetes
MySQL on Docker and Kubernetes
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with Kubernetes
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Just one-shade-of-openstack
Just one-shade-of-openstackJust one-shade-of-openstack
Just one-shade-of-openstack
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
Couch base
Couch baseCouch base
Couch base
 
Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvars
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability Systems
 
Apache Spark Workshop, Apr. 2016, Euangelos Linardos
Apache Spark Workshop, Apr. 2016, Euangelos LinardosApache Spark Workshop, Apr. 2016, Euangelos Linardos
Apache Spark Workshop, Apr. 2016, Euangelos Linardos
 
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
Hue: Big Data Web applications for Interactive Hadoop at Big Data Spain 2014
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Migrating existing open source machine learning to azure
Migrating existing open source machine learning to azureMigrating existing open source machine learning to azure
Migrating existing open source machine learning to azure
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Scaling up Near Real-time Analytics @Uber &LinkedIn
Scaling up Near Real-time Analytics @Uber &LinkedInScaling up Near Real-time Analytics @Uber &LinkedIn
Scaling up Near Real-time Analytics @Uber &LinkedIn
 
Migrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureMigrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to Azure
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 

Último

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Lessons Learned at Wakoopa

  • 1.
  • 2. Lessons Learned while building Wakoopa
  • 3. Menno van der Sman Developer at Wakoopa since May 2007
  • 5.
  • 6. PC Mac
  • 10. Scaling the back is harder
  • 12. One server at Railsmachine sliced into staging, production and db MySQL 4.1 Apache + Mongrel
  • 14. Lots of tools already BackgroundRB, DelayedJob, Daemons etc
  • 15. Rolling our own database based using script/runner processing multiple items in one loop one cache update per loop
  • 16. Smart queries UPDATE developers SET active_seconds = active_seconds + ... INSERT INTO hourly_usage (...) VALUES (...) ON DUPLICATE KEY UPDATE active_seconds = active_seconds + ..., idle_seconds = idle_seconds + ... Allows for concurrency
  • 17. Size = rowsize x rows Make rowsize smaller
  • 20. Overrides default PK class HourlyUsage < ActiveRecord::Base set_primary_keys :user_id, :software_id, :used_at ... end Original idea by Dr Nic Enhanced for Rail 2.1 by Darrin Holst http://compositekeys.rubyforge.org/
  • 21. Archive old data that’s not frequently used
  • 22. HourlyUsage to HourlyUsageStorage SELECT ... FROM hourly_usage WHERE used_at < '...' INTO OUTFILE '/path/to/file' LOAD DATA INFILE '/path/to/file' REPLACE INTO TABLE hourly_usage_storage avoids long locks
  • 24. MySQL 5.1 Partitioning CREATE TABLE hourly_usage_storage ( ... ) PARTITION BY RANGE (software_id) ( PARTITION p0 VALUES LESS THAN (...), PARTITION p1 VALUES LESS THAN (...), PARTITION p2 VALUES LESS THAN (...), PARTITION p3 VALUES LESS THAN (...), .... PARTITION pn VALUES LESS THAN MAXVALUE ); Makes ‘WHERE software_id = ...’ very fast Available in MySQL 5.1
  • 25. And many more plans Designing a new infrastructure MySQL 5.1 Memcached Sphinx Rails 2.1 Amazon EC2
  • 26. Announcing a new blog Inside Wakoopa http://inside.wakoopa.com
  • 27. Questions? or suggestions? Looking for C++ and frontend awesomeness http://wakoopa.com/jobs