SlideShare a Scribd company logo
1 of 37
Download to read offline
Starting with
About Me
●   Kevin Bond
    ●   Kitchener, Ontario
    ●   PHP Developer
         –   Symfony2 core/docs contributor



        kevinbond@gmail.com
        zenstruck.com
                                              @zenstruck
What is Symfony2?




                    @zenstruck
What is Symfony2?
●   Set of stand-alone, decoupled components




                                           @zenstruck
What is Symfony2?
●   Set of stand-alone, decoupled components
●   Full-stack framework based on these
    components




                                           @zenstruck
What is Symfony2?
●   Set of stand-alone, decoupled components
●   Full-stack framework based on these
    components
●   Community
    ●   Forum/Mailing List/IRC (#symfony on Freenode)
    ●   3rd party bundles (knpbundles.com)
    ●   5000+ watchers / 1300+ forks
    ●   560+ unique contributors
                                                  @zenstruck
Symfony2 Components
            DependencyInjection
              EventDispatcher
              HttpFoundation
               DomCrawler
               ClassLoader
                CssSelector
                HttpKernel
                BrowserKit
                Templating
                Translation
                 Serializer
                 Validator
                 Security
                 Routing
                 Console
                 Process
                  Config
                  Finder
                  Locale
                   Yaml
                   Form

                                  @zenstruck
Projects using Symfony2
●   Assetic (Process)
●   Doctrine2 (Console)
●   PHPUnit (Yaml)
●   Behat
●   Silex
●   Drupal 8
●   Propel
                          @zenstruck
Why use Symfony2?
●   Fast
●   PHP 5.3
●   Well engineered (no singletons)
●   Forces* best practices
●   Extensible and flexible
●   Stable and established
●   Testable
                                      @zenstruck
What Symfony2 is not




                       @zenstruck
What Symfony2 is not




           MVC Framework




                           @zenstruck
What Symfony2 is not




           MVC Framework




                           @zenstruck
HTTP Framework



       Request   Response




                            @zenstruck
HTTP Framework



            Request                   Response

    I don't like MVC because that's not how the web works. Symfony2
    is an HTTP framework; it is a Request/Response framework.
    That's the big deal. The fundamental principles of Symfony2 are
    centered around the HTTP specification. - Fabien Potencier




                                                                      @zenstruck
Bundles
●   Everything is a bundle (even the framework is a collection of core
    bundles)
●   Bundles contain:
    ●   Configuration/Translations/Documentation
    ●   Routes/Controllers/Views
    ●   Public resources (js/css/images)
    ●   Services/Events/Models/Forms etc (* don't make your bundle a library)
    ●   Tests
    ●   NOT VENDOR LIBS
●   Override with child bundle
●   690+ bundles on knpbundles.com
                                                                        @zenstruck
Useful Bundles
●   FOSUserBundle
●   FOSFacebookBundle
●   KnpMenuBundle
●   SonataAdminBundle
●   FOSJsRoutingBundle
●   OAuthBundle
●   JMSI18nRoutingBundle
                           @zenstruck
Anatomy of a Request




                       @zenstruck
Anatomy of a Request
●   Request




                       @zenstruck
Anatomy of a Request
●   Request
●   Kernel




                       @zenstruck
Anatomy of a Request
●   Request
●   Kernel
    ●   Controller




                       @zenstruck
Anatomy of a Request
●   Request
●   Kernel
    ●   Controller
●   Response (html, json, xml, etc...)




                                         @zenstruck
Anatomy of a Request
●   Request
●   Kernel
    ●   Controller
    ●   Exception?
●   Response (html, json, xml, etc...)



                                         @zenstruck
Service Container
Get Started



curl -s http://getcomposer.org/installer | php


composer.phar create-project symfony/framework-standard-edition path/to/install




                                                                      @zenstruck
Demo
“Killer” Feature




                   @zenstruck
“Killer” Feature



         Symfony2 Reverse Proxy




                                  @zenstruck
3 Types of HTTP Cache
●   From the docs:
    ●   Browser caches: Every browser comes with its own local cache that
        is mainly useful for when you hit "back" or for images and other
        assets. The browser cache is a private cache as cached resources
        aren't shared with anyone else.
    ●   Proxy caches: A proxy is a shared cache as many people can be
        behind a single one. It's usually installed by large corporations and
        ISPs to reduce latency and network traffic.
    ●   Gateway caches: Like a proxy, it's also a shared cache but on the
        server side. Installed by network administrators, it makes websites
        more scalable, reliable and performant.


                                                                       @zenstruck
Symfony2 Reverse Proxy
●   Request
●   Kernel
●   Controller
●   Response (html, json, xml, etc...)




                                         @zenstruck
Symfony2 Reverse Proxy
●   Request
●   Reverse Proxy
●   Kernel
●   Controller
●   Response (html, json, xml, etc...)



                                         @zenstruck
Symfony2 Reverse Proxy
●   Request
●   Reverse Proxy
●   Kernel
●   Controller
●   Response (html, json, xml, etc...)
    ●   Set s-maxage header


                                         @zenstruck
Symfony2 Reverse Proxy
●   Request
●   Reverse Proxy
    ●   Cached version?
●   Kernel
●   Controller
●   Response (html, json, xml, etc...)
    ●   Set s-maxage header
                                         @zenstruck
Caching Dynamic Content




                          @zenstruck
Caching Dynamic Content
●   Sub-requests




                          @zenstruck
Caching Dynamic Content
●   Sub-requests
    ●   ESI – Edge Side Includes
        –   Server side sub-requests




                                       @zenstruck
Caching Dynamic Content
●   Sub-requests
    ●   ESI – Edge Side Includes
        –   Server side sub-requests
    ●   CSI – Client Side Includes (new in 2.1)
        –   Uses javascript (hinclude.js)
        –   Client side sub-requests




                                                  @zenstruck
Resources
●   github.com/kbond/gpug-symfony2
●   symfony.com (docs/cookbook)
●   fabien.potencier.org
●   knpbundles.com
●   richardmiller.co.uk
●   knpuniversity.com
●   connect.sensiolabs.com
●   live.symfony.com
●   mnot.github.com/hinclude
                                     @zenstruck

More Related Content

What's hot

Rust Programming Language
Rust Programming LanguageRust Programming Language
Rust Programming LanguageJaeju Kim
 
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Codemotion
 
Concurrent Ruby Application Servers
Concurrent Ruby Application ServersConcurrent Ruby Application Servers
Concurrent Ruby Application ServersLin Jen-Shin
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOpsRicardo Sanchez
 
Programming The Arduino Due in Rust
Programming The Arduino Due in RustProgramming The Arduino Due in Rust
Programming The Arduino Due in Rustkellogh
 
Building MapAttack
Building MapAttackBuilding MapAttack
Building MapAttackKyle Drake
 
How *NOT* to firmware
How *NOT* to firmwareHow *NOT* to firmware
How *NOT* to firmwareAmit Serper
 
My month with Ruby
My month with RubyMy month with Ruby
My month with Rubyalextomovski
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Codemotion
 
vert.x - life beyond jetty and apache
vert.x - life beyond jetty and apachevert.x - life beyond jetty and apache
vert.x - life beyond jetty and apacheRalph Winzinger
 
Dive into sentry
Dive into sentryDive into sentry
Dive into sentryLeo Zhou
 
vert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in Javavert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in JavaClément Escoffier
 
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup ChicagoNode.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup ChicagoAziz Ali
 

What's hot (20)

Rust Programming Language
Rust Programming LanguageRust Programming Language
Rust Programming Language
 
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
 
Concurrent Ruby Application Servers
Concurrent Ruby Application ServersConcurrent Ruby Application Servers
Concurrent Ruby Application Servers
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
 
Programming The Arduino Due in Rust
Programming The Arduino Due in RustProgramming The Arduino Due in Rust
Programming The Arduino Due in Rust
 
Building MapAttack
Building MapAttackBuilding MapAttack
Building MapAttack
 
How *NOT* to firmware
How *NOT* to firmwareHow *NOT* to firmware
How *NOT* to firmware
 
My month with Ruby
My month with RubyMy month with Ruby
My month with Ruby
 
Git+jenkins+rex presentation
Git+jenkins+rex presentationGit+jenkins+rex presentation
Git+jenkins+rex presentation
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
 
vert.x - life beyond jetty and apache
vert.x - life beyond jetty and apachevert.x - life beyond jetty and apache
vert.x - life beyond jetty and apache
 
Node.js and Ruby
Node.js and RubyNode.js and Ruby
Node.js and Ruby
 
Rust 101 (2017 edition)
Rust 101 (2017 edition)Rust 101 (2017 edition)
Rust 101 (2017 edition)
 
Dive into sentry
Dive into sentryDive into sentry
Dive into sentry
 
I believe in rust
I believe in rustI believe in rust
I believe in rust
 
vert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in Javavert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in Java
 
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup ChicagoNode.js: Whats the Big Deal? Presented and JS Meetup Chicago
Node.js: Whats the Big Deal? Presented and JS Meetup Chicago
 
The Rust Programming Language
The Rust Programming LanguageThe Rust Programming Language
The Rust Programming Language
 
Ruby On Rails Ecosystem
Ruby On Rails EcosystemRuby On Rails Ecosystem
Ruby On Rails Ecosystem
 
From 'Legacy' to 'Edge'
From 'Legacy' to 'Edge'From 'Legacy' to 'Edge'
From 'Legacy' to 'Edge'
 

Viewers also liked

Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UKRicard Clau
 
A Practical Introduction to Symfony2
A Practical Introduction to Symfony2A Practical Introduction to Symfony2
A Practical Introduction to Symfony2Kris Wallsmith
 
Effective Doctrine2: Performance Tips for Symfony2 Developers
Effective Doctrine2: Performance Tips for Symfony2 DevelopersEffective Doctrine2: Performance Tips for Symfony2 Developers
Effective Doctrine2: Performance Tips for Symfony2 DevelopersMarcin Chwedziak
 
Symfony2 and MongoDB
Symfony2 and MongoDBSymfony2 and MongoDB
Symfony2 and MongoDBPablo Godel
 
Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2Pablo Godel
 

Viewers also liked (6)

Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
 
A Practical Introduction to Symfony2
A Practical Introduction to Symfony2A Practical Introduction to Symfony2
A Practical Introduction to Symfony2
 
Effective Doctrine2: Performance Tips for Symfony2 Developers
Effective Doctrine2: Performance Tips for Symfony2 DevelopersEffective Doctrine2: Performance Tips for Symfony2 Developers
Effective Doctrine2: Performance Tips for Symfony2 Developers
 
Symfony2 and AngularJS
Symfony2 and AngularJSSymfony2 and AngularJS
Symfony2 and AngularJS
 
Symfony2 and MongoDB
Symfony2 and MongoDBSymfony2 and MongoDB
Symfony2 and MongoDB
 
Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2Creating Mobile Apps With PHP & Symfony2
Creating Mobile Apps With PHP & Symfony2
 

Similar to Symfony2 Reverse Proxy Caches Requests and Speeds Up Websites

Malware analysis
Malware analysisMalware analysis
Malware analysisxabean
 
Dependency injection
Dependency injectionDependency injection
Dependency injectionhousecor
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep DiveAkihiro Suda
 
Welcome to the Symfony2 World - FOSDEM 2013
 Welcome to the Symfony2 World - FOSDEM 2013 Welcome to the Symfony2 World - FOSDEM 2013
Welcome to the Symfony2 World - FOSDEM 2013Lukas Smith
 
CloudNativeTurkey - Lines of Defence.pdf
CloudNativeTurkey - Lines of Defence.pdfCloudNativeTurkey - Lines of Defence.pdf
CloudNativeTurkey - Lines of Defence.pdfKoray Oksay
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapRuslan Meshenberg
 
Metasploit For Beginners
Metasploit For BeginnersMetasploit For Beginners
Metasploit For BeginnersRamnath Shenoy
 
Learning Symfony2 by practice
Learning Symfony2 by practiceLearning Symfony2 by practice
Learning Symfony2 by practiceVytautas Beliunas
 
AFW: Dynamic Firewalls with Chef and Netfilter
AFW: Dynamic Firewalls with Chef and NetfilterAFW: Dynamic Firewalls with Chef and Netfilter
AFW: Dynamic Firewalls with Chef and Netfilterjvehent
 
Repositories as Code
Repositories as CodeRepositories as Code
Repositories as CodeKris Buytaert
 
The use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogThe use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogXavier Hausherr
 
Building A Sensor Network Controller
Building A Sensor Network ControllerBuilding A Sensor Network Controller
Building A Sensor Network Controllermichaelpigg
 
ContextualContinuous Profilng
ContextualContinuous ProfilngContextualContinuous Profilng
ContextualContinuous ProfilngJaroslav Bachorik
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment Systema3sec
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systemssosorry
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Jérôme Petazzoni
 

Similar to Symfony2 Reverse Proxy Caches Requests and Speeds Up Websites (20)

Malware analysis
Malware analysisMalware analysis
Malware analysis
 
Dependency injection
Dependency injectionDependency injection
Dependency injection
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
 
Welcome to the Symfony2 World - FOSDEM 2013
 Welcome to the Symfony2 World - FOSDEM 2013 Welcome to the Symfony2 World - FOSDEM 2013
Welcome to the Symfony2 World - FOSDEM 2013
 
CloudNativeTurkey - Lines of Defence.pdf
CloudNativeTurkey - Lines of Defence.pdfCloudNativeTurkey - Lines of Defence.pdf
CloudNativeTurkey - Lines of Defence.pdf
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmap
 
Metasploit For Beginners
Metasploit For BeginnersMetasploit For Beginners
Metasploit For Beginners
 
Frameworks choice
Frameworks choiceFrameworks choice
Frameworks choice
 
Learning Symfony2 by practice
Learning Symfony2 by practiceLearning Symfony2 by practice
Learning Symfony2 by practice
 
AFW: Dynamic Firewalls with Chef and Netfilter
AFW: Dynamic Firewalls with Chef and NetfilterAFW: Dynamic Firewalls with Chef and Netfilter
AFW: Dynamic Firewalls with Chef and Netfilter
 
Repositories as Code
Repositories as CodeRepositories as Code
Repositories as Code
 
The use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogThe use of Symfony2 @ Overblog
The use of Symfony2 @ Overblog
 
Building A Sensor Network Controller
Building A Sensor Network ControllerBuilding A Sensor Network Controller
Building A Sensor Network Controller
 
ContextualContinuous Profilng
ContextualContinuous ProfilngContextualContinuous Profilng
ContextualContinuous Profilng
 
CFEngine 3
CFEngine 3CFEngine 3
CFEngine 3
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment System
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Symfony2 Reverse Proxy Caches Requests and Speeds Up Websites

  • 2. About Me ● Kevin Bond ● Kitchener, Ontario ● PHP Developer – Symfony2 core/docs contributor kevinbond@gmail.com zenstruck.com @zenstruck
  • 3. What is Symfony2? @zenstruck
  • 4. What is Symfony2? ● Set of stand-alone, decoupled components @zenstruck
  • 5. What is Symfony2? ● Set of stand-alone, decoupled components ● Full-stack framework based on these components @zenstruck
  • 6. What is Symfony2? ● Set of stand-alone, decoupled components ● Full-stack framework based on these components ● Community ● Forum/Mailing List/IRC (#symfony on Freenode) ● 3rd party bundles (knpbundles.com) ● 5000+ watchers / 1300+ forks ● 560+ unique contributors @zenstruck
  • 7. Symfony2 Components DependencyInjection EventDispatcher HttpFoundation DomCrawler ClassLoader CssSelector HttpKernel BrowserKit Templating Translation Serializer Validator Security Routing Console Process Config Finder Locale Yaml Form @zenstruck
  • 8. Projects using Symfony2 ● Assetic (Process) ● Doctrine2 (Console) ● PHPUnit (Yaml) ● Behat ● Silex ● Drupal 8 ● Propel @zenstruck
  • 9. Why use Symfony2? ● Fast ● PHP 5.3 ● Well engineered (no singletons) ● Forces* best practices ● Extensible and flexible ● Stable and established ● Testable @zenstruck
  • 10. What Symfony2 is not @zenstruck
  • 11. What Symfony2 is not MVC Framework @zenstruck
  • 12. What Symfony2 is not MVC Framework @zenstruck
  • 13. HTTP Framework Request Response @zenstruck
  • 14. HTTP Framework Request Response I don't like MVC because that's not how the web works. Symfony2 is an HTTP framework; it is a Request/Response framework. That's the big deal. The fundamental principles of Symfony2 are centered around the HTTP specification. - Fabien Potencier @zenstruck
  • 15. Bundles ● Everything is a bundle (even the framework is a collection of core bundles) ● Bundles contain: ● Configuration/Translations/Documentation ● Routes/Controllers/Views ● Public resources (js/css/images) ● Services/Events/Models/Forms etc (* don't make your bundle a library) ● Tests ● NOT VENDOR LIBS ● Override with child bundle ● 690+ bundles on knpbundles.com @zenstruck
  • 16. Useful Bundles ● FOSUserBundle ● FOSFacebookBundle ● KnpMenuBundle ● SonataAdminBundle ● FOSJsRoutingBundle ● OAuthBundle ● JMSI18nRoutingBundle @zenstruck
  • 17. Anatomy of a Request @zenstruck
  • 18. Anatomy of a Request ● Request @zenstruck
  • 19. Anatomy of a Request ● Request ● Kernel @zenstruck
  • 20. Anatomy of a Request ● Request ● Kernel ● Controller @zenstruck
  • 21. Anatomy of a Request ● Request ● Kernel ● Controller ● Response (html, json, xml, etc...) @zenstruck
  • 22. Anatomy of a Request ● Request ● Kernel ● Controller ● Exception? ● Response (html, json, xml, etc...) @zenstruck
  • 24. Get Started curl -s http://getcomposer.org/installer | php composer.phar create-project symfony/framework-standard-edition path/to/install @zenstruck
  • 25. Demo
  • 26. “Killer” Feature @zenstruck
  • 27. “Killer” Feature Symfony2 Reverse Proxy @zenstruck
  • 28. 3 Types of HTTP Cache ● From the docs: ● Browser caches: Every browser comes with its own local cache that is mainly useful for when you hit "back" or for images and other assets. The browser cache is a private cache as cached resources aren't shared with anyone else. ● Proxy caches: A proxy is a shared cache as many people can be behind a single one. It's usually installed by large corporations and ISPs to reduce latency and network traffic. ● Gateway caches: Like a proxy, it's also a shared cache but on the server side. Installed by network administrators, it makes websites more scalable, reliable and performant. @zenstruck
  • 29. Symfony2 Reverse Proxy ● Request ● Kernel ● Controller ● Response (html, json, xml, etc...) @zenstruck
  • 30. Symfony2 Reverse Proxy ● Request ● Reverse Proxy ● Kernel ● Controller ● Response (html, json, xml, etc...) @zenstruck
  • 31. Symfony2 Reverse Proxy ● Request ● Reverse Proxy ● Kernel ● Controller ● Response (html, json, xml, etc...) ● Set s-maxage header @zenstruck
  • 32. Symfony2 Reverse Proxy ● Request ● Reverse Proxy ● Cached version? ● Kernel ● Controller ● Response (html, json, xml, etc...) ● Set s-maxage header @zenstruck
  • 34. Caching Dynamic Content ● Sub-requests @zenstruck
  • 35. Caching Dynamic Content ● Sub-requests ● ESI – Edge Side Includes – Server side sub-requests @zenstruck
  • 36. Caching Dynamic Content ● Sub-requests ● ESI – Edge Side Includes – Server side sub-requests ● CSI – Client Side Includes (new in 2.1) – Uses javascript (hinclude.js) – Client side sub-requests @zenstruck
  • 37. Resources ● github.com/kbond/gpug-symfony2 ● symfony.com (docs/cookbook) ● fabien.potencier.org ● knpbundles.com ● richardmiller.co.uk ● knpuniversity.com ● connect.sensiolabs.com ● live.symfony.com ● mnot.github.com/hinclude @zenstruck