Scalable PHP

Cal Henderson
Cal HendersonProgrammerer at Tiny Speck
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
1 of 54

Recommended

Moving Pictures - Web 2.0 Expo NYC by
Moving Pictures - Web 2.0 Expo NYCMoving Pictures - Web 2.0 Expo NYC
Moving Pictures - Web 2.0 Expo NYCCal Henderson
2.9K views70 slides
I can has API? A Love Story by
I can has API? A Love StoryI can has API? A Love Story
I can has API? A Love StoryCal Henderson
3.1K views97 slides
Scalable Web Architectures - Common Patterns & Approaches by
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesCal Henderson
3K views108 slides
Building Big on the Web by
Building Big on the WebBuilding Big on the Web
Building Big on the WebCal Henderson
2.7K views133 slides
Re-imaginging CakePHP by
Re-imaginging CakePHPRe-imaginging CakePHP
Re-imaginging CakePHPGraham Weldon
6.1K views43 slides
An introduction to Titanium by
An introduction to TitaniumAn introduction to Titanium
An introduction to TitaniumGraham Weldon
2.8K views67 slides

More Related Content

What's hot

WordPress Rest API by
WordPress Rest APIWordPress Rest API
WordPress Rest APIBrian Layman
503 views20 slides
PHP 5.4 - Begin your love affair with traits by
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 traitsGraham Weldon
8.9K views38 slides
CakePHP - The Path to 2.0 by
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0Graham Weldon
1.3K views188 slides
Day 9 - PostgreSQL Application Architecture by
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureBarry Jones
1.1K views23 slides
Day 8 - jRuby by
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRubyBarry Jones
858 views18 slides
Windy cityrails performance_tuning by
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuningJohn McCaffrey
1.7K views64 slides

What's hot(20)

PHP 5.4 - Begin your love affair with traits by Graham Weldon
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
Graham Weldon8.9K views
CakePHP - The Path to 2.0 by Graham Weldon
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0
Graham Weldon1.3K views
Day 9 - PostgreSQL Application Architecture by Barry Jones
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
Barry Jones1.1K views
Windy cityrails performance_tuning by John McCaffrey
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
John McCaffrey1.7K views
Windycityrails page performance by John McCaffrey
Windycityrails page performanceWindycityrails page performance
Windycityrails page performance
John McCaffrey2.9K views
Professional Workflow from Development to Deployment by Rachel Andrew
Professional Workflow from Development to DeploymentProfessional Workflow from Development to Deployment
Professional Workflow from Development to Deployment
Rachel Andrew1.8K views
Building 3D apps with Javascript by Graham Weldon
Building 3D apps with JavascriptBuilding 3D apps with Javascript
Building 3D apps with Javascript
Graham Weldon2.5K views
SydPHP May 2012 - Deployment by Graham Weldon
SydPHP May 2012 - DeploymentSydPHP May 2012 - Deployment
SydPHP May 2012 - Deployment
Graham Weldon1.2K views
improving the performance of Rails web Applications by John McCaffrey
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
John McCaffrey1.6K views
Overboard.js - where are we going with with jsconfasia / devfestasia by Christian Heilmann
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
Christian Heilmann5.4K views
Making ES6 available to all with ChakraCore by Christian Heilmann
Making ES6 available to all with ChakraCoreMaking ES6 available to all with ChakraCore
Making ES6 available to all with ChakraCore
Christian Heilmann4.8K views
Can we make es6 the baseline of the “modern web”? - BrazilJS 2105 by Christian Heilmann
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
Christian Heilmann5.3K views
WordPress for Real Estate by Jay Thompson
WordPress for Real EstateWordPress for Real Estate
WordPress for Real Estate
Jay Thompson488 views
Freelancing and side-projects on Rails by John McCaffrey
Freelancing and side-projects on RailsFreelancing and side-projects on Rails
Freelancing and side-projects on Rails
John McCaffrey1.4K views

Viewers also liked

Why I Hate Django - Part 1/2 by
Why I Hate Django - Part 1/2Why I Hate Django - Part 1/2
Why I Hate Django - Part 1/2Cal Henderson
6.1K views97 slides
Why I Hate Django - Part 2/2 by
Why I Hate Django - Part 2/2Why I Hate Django - Part 2/2
Why I Hate Django - Part 2/2Cal Henderson
3.4K views87 slides
Convenções de código para a linguagem de programação by
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çãoalyssontmv
1.3K views8 slides
Boas Práticas com JavaServer Faces (Jsf) by
Boas Práticas com JavaServer Faces (Jsf)Boas Práticas com JavaServer Faces (Jsf)
Boas Práticas com JavaServer Faces (Jsf)Rafael Ponte
4.6K views36 slides
Princípios de projeto e boas práticas de programação em Java - Márcio Torres by
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 TorresTchelinux
7.1K views30 slides
Web Services Mash-Up by
Web Services Mash-UpWeb Services Mash-Up
Web Services Mash-UpCal Henderson
2K views22 slides

Viewers also liked(8)

Why I Hate Django - Part 1/2 by Cal Henderson
Why I Hate Django - Part 1/2Why I Hate Django - Part 1/2
Why I Hate Django - Part 1/2
Cal Henderson6.1K views
Why I Hate Django - Part 2/2 by Cal Henderson
Why I Hate Django - Part 2/2Why I Hate Django - Part 2/2
Why I Hate Django - Part 2/2
Cal Henderson3.4K views
Convenções de código para a linguagem de programação by alyssontmv
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
alyssontmv1.3K views
Boas Práticas com JavaServer Faces (Jsf) by Rafael Ponte
Boas Práticas com JavaServer Faces (Jsf)Boas Práticas com JavaServer Faces (Jsf)
Boas Práticas com JavaServer Faces (Jsf)
Rafael Ponte4.6K views
Princípios de projeto e boas práticas de programação em Java - Márcio Torres by Tchelinux
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
Tchelinux7.1K views
PHP Jedi - Boas Práticas e Alta Performance by Felipe Ribeiro
PHP Jedi - Boas Práticas e Alta PerformancePHP Jedi - Boas Práticas e Alta Performance
PHP Jedi - Boas Práticas e Alta Performance
Felipe Ribeiro7.8K views
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites by Caelum
[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
Caelum173.3K views

Similar to Scalable PHP

Nosql by
NosqlNosql
Nosqlericwilliammarshall
606 views48 slides
Localizing SharePoint: Adding Multi-language Support to Your Site by
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 SiteGreg Hurlman
1.1K views25 slides
Flickr Php by
Flickr PhpFlickr Php
Flickr Phproyans
1.4K views41 slides
Austin cassandra meetup by
Austin cassandra meetupAustin cassandra meetup
Austin cassandra meetupgdusbabek
768 views33 slides
Exploiter le Web Semantic, le comprendre et y contribuer by
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 contribuerMathieu d'Aquin
509 views48 slides
PHP: The Beginning and the Zend by
PHP: The Beginning and the ZendPHP: The Beginning and the Zend
PHP: The Beginning and the Zenddoublecompile
1.6K views37 slides

Similar to Scalable PHP(20)

Localizing SharePoint: Adding Multi-language Support to Your Site by Greg Hurlman
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
Greg Hurlman1.1K views
Flickr Php by royans
Flickr PhpFlickr Php
Flickr Php
royans1.4K views
Austin cassandra meetup by gdusbabek
Austin cassandra meetupAustin cassandra meetup
Austin cassandra meetup
gdusbabek768 views
Exploiter le Web Semantic, le comprendre et y contribuer by Mathieu d'Aquin
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
Mathieu d'Aquin509 views
PHP: The Beginning and the Zend by doublecompile
PHP: The Beginning and the ZendPHP: The Beginning and the Zend
PHP: The Beginning and the Zend
doublecompile1.6K views
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC by Cal Henderson
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 Henderson23.4K views
Mike walsh hadr_toomanychoices_20191107 by Mike Walsh
Mike walsh hadr_toomanychoices_20191107Mike walsh hadr_toomanychoices_20191107
Mike walsh hadr_toomanychoices_20191107
Mike Walsh274 views
Arizona State University Web Design for Non-Designers by Nina Miller
Arizona State University Web Design for Non-DesignersArizona State University Web Design for Non-Designers
Arizona State University Web Design for Non-Designers
Nina Miller1.6K views
Web20expo Scalable Web Arch by guest18a0f1
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
guest18a0f1570 views
Web20expo Scalable Web Arch by mclee
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
mclee1K views
Web20expo Scalable Web Arch by royans
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
royans894 views
Text Mining by rueshyna
Text MiningText Mining
Text Mining
rueshyna2.5K views
DiUS Computing Lca Rails Final by Robert Postill
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
Robert Postill587 views
Site Performance - From Pinto to Ferrari by Joseph Scott
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
Joseph Scott3.5K views
Sparklife - Life In The Trenches With Spark by Ian Pointer
Sparklife - Life In The Trenches With SparkSparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With Spark
Ian Pointer595 views
Stop Reinventing The Wheel - The Ruby Standard Library by Brian Hogan
Stop Reinventing The Wheel - The Ruby Standard LibraryStop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard Library
Brian Hogan9.8K views
Deliverance and Diazo - Easy Theming For Everyone by Roché Compaan
Deliverance and Diazo - Easy Theming For EveryoneDeliverance and Diazo - Easy Theming For Everyone
Deliverance and Diazo - Easy Theming For Everyone
Roché Compaan2.5K views
NoSQL: Why, When, and How by BigBlueHat
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
BigBlueHat6.2K views

Recently uploaded

CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
138 views15 slides
The Role of Patterns in the Era of Large Language Models by
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language ModelsYunyao Li
85 views65 slides
State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
297 views53 slides
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...ShapeBlue
180 views18 slides
DRBD Deep Dive - Philipp Reisner - LINBIT by
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBITShapeBlue
180 views21 slides
CryptoBotsAI by
CryptoBotsAICryptoBotsAI
CryptoBotsAIchandureddyvadala199
40 views5 slides

Recently uploaded(20)

CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue138 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li85 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue297 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue180 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue180 views
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue263 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc170 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue145 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu423 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue139 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue186 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10139 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash158 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue203 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue152 views

Scalable PHP