SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
Coding
       Mark Jaquith
                        “JAKE-with”
                                      Scaling
                                        and
        @markjaquith
                                      Deploys
       mark@jaquith.me
       markjaquith.com                 O hM y!
Friday, August 12, 11
Meanwhile, in 2006...




                                    Photo by Sco Beale (Laughing Squid)



Friday, August 12, 11
Cowboy
                        Coding
Friday, August 12, 11
PE R! BA D!
                     AD DE VELO
                   B
                        Cowboy
                        Coding
Friday, August 12, 11
bnj.com/cowboy-coding-pink-sombrero


Friday, August 12, 11
VCS    • or •   GTFO

Friday, August 12, 11
WordPress
                        in your repo

Friday, August 12, 11
My Ideal
                        index.php
                        wp-config.php
                        content/themes/
                        content/plugins/
                        content/uploads/ (ignored)
                        wp ➠ EXTERNAL

Friday, August 12, 11
Local
                   Development
Friday, August 12, 11
1. MAMP, XAMPP, other
                        2. /etc/hosts
                        3. local-config.php

Friday, August 12, 11
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) {
                   include( dirname( __FILE__ ) . '/local-config.php' );
                   define( 'WP_LOCAL_DEV', true );
                 } else {
                   define( 'WP_LOCAL_DEV', false );
                   define( 'DB_NAME',     'production_db'       );
                   define( 'DB_USER',     'production_user'     );
                   define( 'DB_PASSWORD', 'production_password' );
                   define( 'DB_HOST',     'production_db_host' );
                 }




                        Ignore local-config.php so
                         it doesn’t get checked in.

Friday, August 12, 11
Deploying
                         — with —




Friday, August 12, 11
1. gem install capistrano
                        2. gem install railsless-deploy
                        3. gem install capistrano-ext

Friday, August 12, 11
releases/
          current => {current-release}
          shared/cached-copy
          shared/files/


Friday, August 12, 11
checked in:
           content/uploads => ../../files/uploads/



           done on deploy:
           files => /srv/www/example.org/shared/files/



Friday, August 12, 11
Scaling
             a Single Server

Friday, August 12, 11
nginx
Friday, August 12, 11
proxy to Apache
                              or
                        PHP-FPM
Friday, August 12, 11
PHP
                        Opcode
                        Cache
Friday, August 12, 11
WP
                        Object
                        Cache
Friday, August 12, 11
HTML
                             Output
                             Cache
                        Batcache || W3 Total Cache

Friday, August 12, 11
Fragment
                                  Caching
                   if ( $html = wp_cache_get( 'expensive-html-chunk', 'my-theme' ) ) {
                     echo $html;
                   } else {
                     $html = dynamically_generate_foo();
                     wp_cache_set( 'expensive-html-chunk', $html, 'my-theme', 3600 );
                     echo $html;
                   }




Friday, August 12, 11
MySQL
           Query Cache
Friday, August 12, 11
CDN
                           — with —
                        Origin Pull
Friday, August 12, 11
The Plan



Friday, August 12, 11
The Plan
                        What happens if we
                        outgrow our server?



        Boss
                                              Tech

Friday, August 12, 11
The Plan
                        What happens if we
                        outgrow our server?

                                              We’ll just add new
        Boss                                       servers!




                                                          Tech

Friday, August 12, 11
The Plan
                        What happens if we
                        outgrow our server?

                                              We’ll just add new
        Boss                                       servers!


                              Brilliant!
                                                          Tech

Friday, August 12, 11
The Plan



Friday, August 12, 11
The Reality



Friday, August 12, 11
The Reality
                         Our site is slow. Let’s
                         add another server.



        Boss
                                                   Tech

Friday, August 12, 11
The Reality
                         Our site is slow. Let’s
                         add another server.


                                                   Uh...
        Boss
                                                       Tech

Friday, August 12, 11
The Reality
                         Our site is slow. Let’s
                         add another server.


                                                    Uh...
        Boss
                         So this will take like 5
                             minutes, right?
                                                        Tech

Friday, August 12, 11
Have a plan

                   Not an idea
Friday, August 12, 11
Multiple
                        Servers
Friday, August 12, 11
Load
                        Balancing
Friday, August 12, 11
Sharing
                        Uploads
Friday, August 12, 11
Memcached

Friday, August 12, 11
Rinse &
                        Repeat
Friday, August 12, 11
HyperDB

Friday, August 12, 11
Maintaining
                        Servers with
                        Puppet
Friday, August 12, 11
This is the start of a
             larger conversation


Friday, August 12, 11
Mark Jaquith
                        “JAKE-with”   Thanks!
        @markjaquith
       mark@jaquith.me
       markjaquith.com

Friday, August 12, 11

Weitere ähnliche Inhalte

Was ist angesagt?

Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010
isnull
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
andymccurdy
 
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Hostway|HOSTING
 

Was ist angesagt? (20)

Riak with Rails
Riak with RailsRiak with Rails
Riak with Rails
 
Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010Dutch php conference_apc_mem2010
Dutch php conference_apc_mem2010
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
 
Challenges when building high profile editorial sites
Challenges when building high profile editorial sitesChallenges when building high profile editorial sites
Challenges when building high profile editorial sites
 
Scaling to-5000-nodes
Scaling to-5000-nodesScaling to-5000-nodes
Scaling to-5000-nodes
 
How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)
 
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
 
My Opera meets Varnish, Dec 2009
My Opera meets Varnish, Dec 2009My Opera meets Varnish, Dec 2009
My Opera meets Varnish, Dec 2009
 
Deployment with Fabric
Deployment with FabricDeployment with Fabric
Deployment with Fabric
 
Demystifying eZ Publish 5.x for eZ Publish 4.0 developers
Demystifying eZ Publish 5.x for eZ Publish 4.0 developersDemystifying eZ Publish 5.x for eZ Publish 4.0 developers
Demystifying eZ Publish 5.x for eZ Publish 4.0 developers
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
 
Nginx Workshop Aftermath
Nginx Workshop AftermathNginx Workshop Aftermath
Nginx Workshop Aftermath
 
PyCon Russia 2014 - Auto Scale in the Cloud
PyCon Russia 2014 - Auto Scale in the CloudPyCon Russia 2014 - Auto Scale in the Cloud
PyCon Russia 2014 - Auto Scale in the Cloud
 
Hackingtomcat
HackingtomcatHackingtomcat
Hackingtomcat
 
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
Tuning the Performance of Your ColdFusion Environment to Racecar Specs!
 
How to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishHow to deploy & optimize eZ Publish
How to deploy & optimize eZ Publish
 
All The Little Pieces
All The Little PiecesAll The Little Pieces
All The Little Pieces
 
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1
 
Writing your own augeasproviders
Writing your own augeasprovidersWriting your own augeasproviders
Writing your own augeasproviders
 

Andere mochten auch

Don't Repeat Your Mistakes: JavaScript Unit Testing
Don't Repeat Your Mistakes: JavaScript Unit TestingDon't Repeat Your Mistakes: JavaScript Unit Testing
Don't Repeat Your Mistakes: JavaScript Unit Testing
aaronjorbin
 
Architecture Behind WordPress.com
Architecture Behind WordPress.comArchitecture Behind WordPress.com
Architecture Behind WordPress.com
photomatt
 
Pushing Python: Building a High Throughput, Low Latency System
Pushing Python: Building a High Throughput, Low Latency SystemPushing Python: Building a High Throughput, Low Latency System
Pushing Python: Building a High Throughput, Low Latency System
Kevin Ballard
 
Twitter Presentation: #APIConSF
Twitter Presentation: #APIConSFTwitter Presentation: #APIConSF
Twitter Presentation: #APIConSF
Ryan Choi
 

Andere mochten auch (20)

eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
 
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
 
How Testing Changed My Life
How Testing Changed My LifeHow Testing Changed My Life
How Testing Changed My Life
 
E-commerce & WordPress: Navigating the Minefield
E-commerce & WordPress: Navigating the MinefieldE-commerce & WordPress: Navigating the Minefield
E-commerce & WordPress: Navigating the Minefield
 
State of the Word 2016
State of the Word 2016State of the Word 2016
State of the Word 2016
 
State of the Word 2015, WordCamp US
State of the Word 2015, WordCamp USState of the Word 2015, WordCamp US
State of the Word 2015, WordCamp US
 
Taking WordPress to the World : Options for a Multilingual Site | WordCamp Sa...
Taking WordPress to the World : Options for a Multilingual Site | WordCamp Sa...Taking WordPress to the World : Options for a Multilingual Site | WordCamp Sa...
Taking WordPress to the World : Options for a Multilingual Site | WordCamp Sa...
 
Don't Repeat Your Mistakes: JavaScript Unit Testing
Don't Repeat Your Mistakes: JavaScript Unit TestingDon't Repeat Your Mistakes: JavaScript Unit Testing
Don't Repeat Your Mistakes: JavaScript Unit Testing
 
DNS exfiltration using sqlmap
DNS exfiltration using sqlmapDNS exfiltration using sqlmap
DNS exfiltration using sqlmap
 
How WordPress Changed My Life! - Ricky Blacker
How WordPress Changed My Life! - Ricky BlackerHow WordPress Changed My Life! - Ricky Blacker
How WordPress Changed My Life! - Ricky Blacker
 
The Child Theme Dilemma (EN) - Milano Edition
The Child Theme Dilemma (EN) - Milano EditionThe Child Theme Dilemma (EN) - Milano Edition
The Child Theme Dilemma (EN) - Milano Edition
 
Architecture Behind WordPress.com
Architecture Behind WordPress.comArchitecture Behind WordPress.com
Architecture Behind WordPress.com
 
WordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and VagrantWordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and Vagrant
 
WordPress 4.4 and Beyond
WordPress 4.4 and BeyondWordPress 4.4 and Beyond
WordPress 4.4 and Beyond
 
What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?What is the Responsibility of Plugin Developers?
What is the Responsibility of Plugin Developers?
 
WordPress: Getting Under the Hood
WordPress: Getting Under the HoodWordPress: Getting Under the Hood
WordPress: Getting Under the Hood
 
Architecting an Highly Available and Scalable WordPress Site in AWS
Architecting an Highly Available and Scalable WordPress Site in AWS Architecting an Highly Available and Scalable WordPress Site in AWS
Architecting an Highly Available and Scalable WordPress Site in AWS
 
Pushing Python: Building a High Throughput, Low Latency System
Pushing Python: Building a High Throughput, Low Latency SystemPushing Python: Building a High Throughput, Low Latency System
Pushing Python: Building a High Throughput, Low Latency System
 
Twitter Presentation: #APIConSF
Twitter Presentation: #APIConSFTwitter Presentation: #APIConSF
Twitter Presentation: #APIConSF
 

Ähnlich wie Coding, Scaling, and Deploys... Oh My!

Rcos presentation
Rcos presentationRcos presentation
Rcos presentation
mskmoorthy
 
TorqueBox - When Java meets Ruby
TorqueBox - When Java meets RubyTorqueBox - When Java meets Ruby
TorqueBox - When Java meets Ruby
Bruno Oliveira
 
ZFS and FreeBSD Jails
ZFS and FreeBSD JailsZFS and FreeBSD Jails
ZFS and FreeBSD Jails
apeiron
 
Optimizing your site for contextual ads: SEO, Design and Content
Optimizing your site for contextual ads: SEO, Design and ContentOptimizing your site for contextual ads: SEO, Design and Content
Optimizing your site for contextual ads: SEO, Design and Content
Raven Tools
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deployment
zeeg
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talk
bodepd
 
Html5 Audio & video
Html5 Audio & videoHtml5 Audio & video
Html5 Audio & video
Carlos Solis
 

Ähnlich wie Coding, Scaling, and Deploys... Oh My! (20)

Rcos presentation
Rcos presentationRcos presentation
Rcos presentation
 
Modern HTML & CSS Coding: Speed, Semantics & Structure
Modern HTML & CSS Coding: Speed, Semantics & StructureModern HTML & CSS Coding: Speed, Semantics & Structure
Modern HTML & CSS Coding: Speed, Semantics & Structure
 
TorqueBox - When Java meets Ruby
TorqueBox - When Java meets RubyTorqueBox - When Java meets Ruby
TorqueBox - When Java meets Ruby
 
ZFS and FreeBSD Jails
ZFS and FreeBSD JailsZFS and FreeBSD Jails
ZFS and FreeBSD Jails
 
Big app design for Node.js
Big app design for Node.jsBig app design for Node.js
Big app design for Node.js
 
Optimizing your site for contextual ads: SEO, Design and Content
Optimizing your site for contextual ads: SEO, Design and ContentOptimizing your site for contextual ads: SEO, Design and Content
Optimizing your site for contextual ads: SEO, Design and Content
 
Optimizing WordPress Performance on Shared Web Hosting
Optimizing WordPress Performance on Shared Web HostingOptimizing WordPress Performance on Shared Web Hosting
Optimizing WordPress Performance on Shared Web Hosting
 
Lightning talks percona live mysql_2012
Lightning talks percona live mysql_2012Lightning talks percona live mysql_2012
Lightning talks percona live mysql_2012
 
StORM preview
StORM previewStORM preview
StORM preview
 
Tackling Big Data with Hadoop
Tackling Big Data with HadoopTackling Big Data with Hadoop
Tackling Big Data with Hadoop
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deployment
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talk
 
It's code but not as we know: Infrastructure as Code - Patrick Debois
It's code but not as we know: Infrastructure as Code - Patrick DeboisIt's code but not as we know: Infrastructure as Code - Patrick Debois
It's code but not as we know: Infrastructure as Code - Patrick Debois
 
Localizing iOS Apps
Localizing iOS AppsLocalizing iOS Apps
Localizing iOS Apps
 
Inside the Atlassian OnDemand Private Cloud
Inside the Atlassian OnDemand Private CloudInside the Atlassian OnDemand Private Cloud
Inside the Atlassian OnDemand Private Cloud
 
Fluentd and WebHDFS
Fluentd and WebHDFSFluentd and WebHDFS
Fluentd and WebHDFS
 
Html5 Audio & video
Html5 Audio & videoHtml5 Audio & video
Html5 Audio & video
 
Fast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browserFast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browser
 
Multiplatform, Promises and HTML5
Multiplatform, Promises and HTML5Multiplatform, Promises and HTML5
Multiplatform, Promises and HTML5
 
Apache Flume NG
Apache Flume NGApache Flume NG
Apache Flume NG
 

Mehr von Mark Jaquith

Creating and Maintaining WordPress Plugins
Creating and Maintaining WordPress PluginsCreating and Maintaining WordPress Plugins
Creating and Maintaining WordPress Plugins
Mark Jaquith
 
WordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixWordPress Security - WordCamp Phoenix
WordPress Security - WordCamp Phoenix
Mark Jaquith
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
Mark Jaquith
 
Secure Coding with WordPress - WordCamp SF 2008
Secure Coding with WordPress - WordCamp SF 2008Secure Coding with WordPress - WordCamp SF 2008
Secure Coding with WordPress - WordCamp SF 2008
Mark Jaquith
 

Mehr von Mark Jaquith (15)

Cache Money Business
Cache Money BusinessCache Money Business
Cache Money Business
 
Scaling WordPress
Scaling WordPressScaling WordPress
Scaling WordPress
 
Creating and Maintaining WordPress Plugins
Creating and Maintaining WordPress PluginsCreating and Maintaining WordPress Plugins
Creating and Maintaining WordPress Plugins
 
WordPress Security - WordCamp Phoenix
WordPress Security - WordCamp PhoenixWordPress Security - WordCamp Phoenix
WordPress Security - WordCamp Phoenix
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
 
Writing Your First WordPress Plugin
Writing Your First WordPress PluginWriting Your First WordPress Plugin
Writing Your First WordPress Plugin
 
What I Hate About Wordpress
What I Hate About WordpressWhat I Hate About Wordpress
What I Hate About Wordpress
 
Writing Secure Plugins — WordCamp New York 2009
Writing Secure Plugins — WordCamp New York 2009Writing Secure Plugins — WordCamp New York 2009
Writing Secure Plugins — WordCamp New York 2009
 
BuddyPress and the Future of WordPress Plugins
BuddyPress and the Future of WordPress PluginsBuddyPress and the Future of WordPress Plugins
BuddyPress and the Future of WordPress Plugins
 
"State of the Word" at WordCamp Mid-Atlantic, by Mark Jaquith
"State of the Word" at WordCamp Mid-Atlantic, by Mark Jaquith"State of the Word" at WordCamp Mid-Atlantic, by Mark Jaquith
"State of the Word" at WordCamp Mid-Atlantic, by Mark Jaquith
 
Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)Secure Coding With Wordpress (BarCamp Orlando 2009)
Secure Coding With Wordpress (BarCamp Orlando 2009)
 
Wordcamp Charlotte: WordPress Today and Tomorrow
Wordcamp Charlotte: WordPress Today and TomorrowWordcamp Charlotte: WordPress Today and Tomorrow
Wordcamp Charlotte: WordPress Today and Tomorrow
 
Secure Coding with WordPress - WordCamp SF 2008
Secure Coding with WordPress - WordCamp SF 2008Secure Coding with WordPress - WordCamp SF 2008
Secure Coding with WordPress - WordCamp SF 2008
 
Amping up your WordPress Blog
Amping up your WordPress BlogAmping up your WordPress Blog
Amping up your WordPress Blog
 
Contributing To WordPress
Contributing To WordPressContributing To WordPress
Contributing To WordPress
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Coding, Scaling, and Deploys... Oh My!

  • 1. Coding Mark Jaquith “JAKE-with” Scaling and @markjaquith Deploys mark@jaquith.me markjaquith.com O hM y! Friday, August 12, 11
  • 2. Meanwhile, in 2006... Photo by Sco Beale (Laughing Squid) Friday, August 12, 11
  • 3. Cowboy Coding Friday, August 12, 11
  • 4. PE R! BA D! AD DE VELO B Cowboy Coding Friday, August 12, 11
  • 6. VCS • or • GTFO Friday, August 12, 11
  • 7. WordPress in your repo Friday, August 12, 11
  • 8. My Ideal index.php wp-config.php content/themes/ content/plugins/ content/uploads/ (ignored) wp ➠ EXTERNAL Friday, August 12, 11
  • 9. Local Development Friday, August 12, 11
  • 10. 1. MAMP, XAMPP, other 2. /etc/hosts 3. local-config.php Friday, August 12, 11
  • 11. if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) { include( dirname( __FILE__ ) . '/local-config.php' ); define( 'WP_LOCAL_DEV', true ); } else { define( 'WP_LOCAL_DEV', false ); define( 'DB_NAME', 'production_db' ); define( 'DB_USER', 'production_user' ); define( 'DB_PASSWORD', 'production_password' ); define( 'DB_HOST', 'production_db_host' ); } Ignore local-config.php so it doesn’t get checked in. Friday, August 12, 11
  • 12. Deploying — with — Friday, August 12, 11
  • 13. 1. gem install capistrano 2. gem install railsless-deploy 3. gem install capistrano-ext Friday, August 12, 11
  • 14. releases/ current => {current-release} shared/cached-copy shared/files/ Friday, August 12, 11
  • 15. checked in: content/uploads => ../../files/uploads/ done on deploy: files => /srv/www/example.org/shared/files/ Friday, August 12, 11
  • 16. Scaling a Single Server Friday, August 12, 11
  • 18. proxy to Apache or PHP-FPM Friday, August 12, 11
  • 19. PHP Opcode Cache Friday, August 12, 11
  • 20. WP Object Cache Friday, August 12, 11
  • 21. HTML Output Cache Batcache || W3 Total Cache Friday, August 12, 11
  • 22. Fragment Caching if ( $html = wp_cache_get( 'expensive-html-chunk', 'my-theme' ) ) { echo $html; } else { $html = dynamically_generate_foo(); wp_cache_set( 'expensive-html-chunk', $html, 'my-theme', 3600 ); echo $html; } Friday, August 12, 11
  • 23. MySQL Query Cache Friday, August 12, 11
  • 24. CDN — with — Origin Pull Friday, August 12, 11
  • 26. The Plan What happens if we outgrow our server? Boss Tech Friday, August 12, 11
  • 27. The Plan What happens if we outgrow our server? We’ll just add new Boss servers! Tech Friday, August 12, 11
  • 28. The Plan What happens if we outgrow our server? We’ll just add new Boss servers! Brilliant! Tech Friday, August 12, 11
  • 31. The Reality Our site is slow. Let’s add another server. Boss Tech Friday, August 12, 11
  • 32. The Reality Our site is slow. Let’s add another server. Uh... Boss Tech Friday, August 12, 11
  • 33. The Reality Our site is slow. Let’s add another server. Uh... Boss So this will take like 5 minutes, right? Tech Friday, August 12, 11
  • 34. Have a plan Not an idea Friday, August 12, 11
  • 35. Multiple Servers Friday, August 12, 11
  • 36. Load Balancing Friday, August 12, 11
  • 37. Sharing Uploads Friday, August 12, 11
  • 39. Rinse & Repeat Friday, August 12, 11
  • 41. Maintaining Servers with Puppet Friday, August 12, 11
  • 42. This is the start of a larger conversation Friday, August 12, 11
  • 43. Mark Jaquith “JAKE-with” Thanks! @markjaquith mark@jaquith.me markjaquith.com Friday, August 12, 11