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

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 

Recently uploaded (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
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)
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 

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