SlideShare a Scribd company logo
1 of 54
Scalable PHP Cal Henderson
Oh hai
Does PHP scale?
Yes!
No!
Stupid question!
Languages don’t scale
Architectures scale
 
 
Universe of marshy force. Field sense shallows the hatchery saying Hello,. World!.  Hydro. Power spring  sometimes; snowmelt       powers   snowmelt always.
It’s all about the salmon And trees
But PHP sucks
No namespaces
Random function names
No quantum superpositions
People whining
Best of a bad bunch
Ok, scaling What  makes something scalable?
Bigger dataset More traffic Maintainable
NOT about performance
But PHP is slow!
 
Who cares?
PHP is not your bottleneck
More traffic Push issues down  the stack
Horizontal vs Vertical
Scale out vs Scale up
Scale out (horizontal) ftw
PHP sessions == bad /var/notshared
Sessions in a DB
 
No sessions at all
Sessions in cookies
Bigger dataset Not really a PHP issue
Pass big data by  function foo(&$big){} reference
Don’t serialize() big things
All arrays are sparse So that’s ok
Don’t keep much in memory
Maintainable Small logical blocks include()
Sucks about  namespaces
Classes are like  namespaces kinda
Many includes == bad
APC + full paths +  nostat == awesome
Set root path via .htaccess ENV Or whatever
deploy-time rollups also good
Consistency is king
# Comments # Also useful # (who knew?)
The bottom line: PHP is used for big things
Beauty is less important Than just working
Photos! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Moar Photos! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Even Moar Photos! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
find these slides online iamcal.com/talks

More Related Content

What's hot

SydPHP May 2012 - Deployment
SydPHP May 2012 - DeploymentSydPHP May 2012 - Deployment
SydPHP May 2012 - Deployment
Graham Weldon
 
WordPress for Real Estate
WordPress for Real EstateWordPress for Real Estate
WordPress for Real Estate
Jay Thompson
 

What's hot (20)

WordPress Rest API
WordPress Rest APIWordPress Rest API
WordPress Rest API
 
PHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traitsPHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traits
 
CakePHP - The Path to 2.0
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0
 
Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
 
Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performance
 
Professional Workflow from Development to Deployment
Professional Workflow from Development to DeploymentProfessional Workflow from Development to Deployment
Professional Workflow from Development to Deployment
 
Building 3D apps with Javascript
Building 3D apps with JavascriptBuilding 3D apps with Javascript
Building 3D apps with Javascript
 
SydPHP May 2012 - Deployment
SydPHP May 2012 - DeploymentSydPHP May 2012 - Deployment
SydPHP May 2012 - Deployment
 
Naked and afraid Offline Mobile
Naked and afraid Offline MobileNaked and afraid Offline Mobile
Naked and afraid Offline Mobile
 
Myphp-busters: symfony framework
Myphp-busters: symfony frameworkMyphp-busters: symfony framework
Myphp-busters: symfony framework
 
Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
 
Overboard.js - where are we going with with jsconfasia / devfestasia
Overboard.js - where are we going with with jsconfasia / devfestasiaOverboard.js - where are we going with with jsconfasia / devfestasia
Overboard.js - where are we going with with jsconfasia / devfestasia
 
Making ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCoreMaking ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCore
 
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105 Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105
 
Working local
Working localWorking local
Working local
 
WordPress for Real Estate
WordPress for Real EstateWordPress for Real Estate
WordPress for Real Estate
 
Freelancing and side-projects on Rails
Freelancing and side-projects on RailsFreelancing and side-projects on Rails
Freelancing and side-projects on Rails
 

Viewers also liked

Why I Hate Django - Part 1/2
Why I Hate Django - Part 1/2Why I Hate Django - Part 1/2
Why I Hate Django - Part 1/2
Cal Henderson
 
Convenções de código para a linguagem de programação
Convenções de código para a linguagem de programaçãoConvenções de código para a linguagem de programação
Convenções de código para a linguagem de programação
alyssontmv
 
Web Services Mash-Up
Web Services Mash-UpWeb Services Mash-Up
Web Services Mash-Up
Cal Henderson
 

Viewers also liked (8)

Why I Hate Django - Part 1/2
Why I Hate Django - Part 1/2Why I Hate Django - Part 1/2
Why I Hate Django - Part 1/2
 
Why I Hate Django - Part 2/2
Why I Hate Django - Part 2/2Why I Hate Django - Part 2/2
Why I Hate Django - Part 2/2
 
Convenções de código para a linguagem de programação
Convenções de código para a linguagem de programaçãoConvenções de código para a linguagem de programação
Convenções de código para a linguagem de programação
 
Boas Práticas com JavaServer Faces (Jsf)
Boas Práticas com JavaServer Faces (Jsf)Boas Práticas com JavaServer Faces (Jsf)
Boas Práticas com JavaServer Faces (Jsf)
 
Princípios de projeto e boas práticas de programação em Java - Márcio Torres
Princípios de projeto e boas práticas de programação em Java - Márcio TorresPrincípios de projeto e boas práticas de programação em Java - Márcio Torres
Princípios de projeto e boas práticas de programação em Java - Márcio Torres
 
Web Services Mash-Up
Web Services Mash-UpWeb Services Mash-Up
Web Services Mash-Up
 
PHP Jedi - Boas Práticas e Alta Performance
PHP Jedi - Boas Práticas e Alta PerformancePHP Jedi - Boas Práticas e Alta Performance
PHP Jedi - Boas Práticas e Alta Performance
 
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
 

Similar to Scalable PHP

Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 
Arizona State University Web Design for Non-Designers
Arizona State University Web Design for Non-DesignersArizona State University Web Design for Non-Designers
Arizona State University Web Design for Non-Designers
Nina Miller
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
guest18a0f1
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
Joseph Scott
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
BigBlueHat
 

Similar to Scalable PHP (20)

Nosql
NosqlNosql
Nosql
 
Localizing SharePoint: Adding Multi-language Support to Your Site
Localizing SharePoint: Adding Multi-language Support to Your SiteLocalizing SharePoint: Adding Multi-language Support to Your Site
Localizing SharePoint: Adding Multi-language Support to Your Site
 
Flickr Php
Flickr PhpFlickr Php
Flickr Php
 
Austin cassandra meetup
Austin cassandra meetupAustin cassandra meetup
Austin cassandra meetup
 
Exploiter le Web Semantic, le comprendre et y contribuer
Exploiter le Web Semantic, le comprendre et y contribuerExploiter le Web Semantic, le comprendre et y contribuer
Exploiter le Web Semantic, le comprendre et y contribuer
 
PHP: The Beginning and the Zend
PHP: The Beginning and the ZendPHP: The Beginning and the Zend
PHP: The Beginning and the Zend
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
 
Not only SQL
Not only SQL Not only SQL
Not only SQL
 
Mike walsh hadr_toomanychoices_20191107
Mike walsh hadr_toomanychoices_20191107Mike walsh hadr_toomanychoices_20191107
Mike walsh hadr_toomanychoices_20191107
 
Arizona State University Web Design for Non-Designers
Arizona State University Web Design for Non-DesignersArizona State University Web Design for Non-Designers
Arizona State University Web Design for Non-Designers
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Text Mining
Text MiningText Mining
Text Mining
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
Sparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With SparkSparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With Spark
 
Stop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard LibraryStop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard Library
 
Deliverance and Diazo - Easy Theming For Everyone
Deliverance and Diazo - Easy Theming For EveryoneDeliverance and Diazo - Easy Theming For Everyone
Deliverance and Diazo - Easy Theming For Everyone
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Scalable PHP