SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Improving Site Response Time
                          Part 1: Front-End Optimization (FEO)




Kim Stefan Lindholm                        1                     26.1.2012
SETUP
•   Server: CloudControl (Dublin, Ireland) with local Varnish HTTP accelerator

•   CMS (Content Management System): Joomla 1.5

•   WAF (Web Application Firewall): Incapsula

•   CDN (Content Delivery Network): Akamai (Rackspace) & Amazon CloudFront

•   Anycast DNS: DNS Made Easy



    NB: Incapsula and Akamai automatically serve compressed (gzip) files
                                              2
RESULTS
                                                                   Proxy servers may take some time
                                                                    to refresh their cache, which can
                                                                    delay performance improvement.


               Browser & server
             cache + compression
                                       Minify images,
                                         CSS & JS       Combine
Gzip HTML,                                              CSS & JS
                                                                     Inline images,
No caching
                                                                    Pre-gzip, CDN




               Main page, average response time (ms)
                                                3                                 Pingdom Panel, global average
LOAD TIME
18 s


14 s

                                                              Original
 9s                                                           Caching
                                                              CloudFront, inline, gzip

 5s



       Amsterdam   Dallas, TX   Dulles, VA   Jiangsu, China



                                   4
LOAD TIME

         Amsterdam        Dallas, TX
Chrome                                 Chrome
             -87%             -69%

         Dulles, VA       Jiangsu
 IE 8                                   IE 7
             -51%             -64%


                      5
How much were we able to decrease
     costly HTTP requests?



                6
CACHED VS. FINAL

               HTTP Requests
                   -83%

               Total Weight
                   -30%

                   Original total weight
                          was 206K


       7           Yahoo YSlow add-on for Chrome
Did Incapsula web proxy/firewall
   contribute to the results?



               8
INCAPSULA




Incapsula caching seemed to be affected by incoming traffic (site popularity)
     and not so much by changes in the website itself (cacheability etc.)


                                     9
Speed difference between Incapsula
proxy and global CDN (measured in
             Europe)?


                10
PROXY VS. CDN
   Average load speed (real) tested with 10 iterations: time curl [--compressed] <url> > /dev/null


2,500 ms


1,875 ms
                                                                                               No proxy
                                                                                               Incapsula
                                                                                               Incapsula, gzip
1,250 ms                         Compressed                                                    Akamai
                                  size: 34k
                                                         Compressed                            Akamai, gzip
                                                           size: 3k        Slowest 1st load:
                                                                               1400 ms
 625 ms



            mootools.js (116k)          template.css (11k)     template_ie7.css (2k)

                                                        11
PROXY VS. CDN

• Standarddeviation with Akamai CDN was notable. At worst, fetching a 2k
 file was 3x slower than with the original unproxied connection.

• Withcompression on, first loads seemed very slow. This is acceptable, of
 course, if gzipping and pushing to cache only happens infrequently.

• Given the additional overhead of compression and DNS lookups, small files
 (<10k) are not automatically perfect candidates for CDN. Combine images
 using sprites instead.

                                     12
Speed difference between Akamai and
        Amazon CloudFront?



                 13
CDN COMPARISON




Akamai, gzip        CloudFront, gzip



               14              Pingdom Panel, Response time report
CDN COMPARISON
        Main page first load speed, CDN allowed to propagate for one day


9s


7s
                                                                          Akamai, gzip
                                                                          CloudFront
                                                                          CloudFront, gzip
5s


2s



     Amsterdam    Dallas    Los Angeles        Singapore   Tokyo

                                          15
CDN COMPARISON
      Main page second load speed, CDN allowed to propagate for one day


9s


7s
                                                                          Akamai, gzip
                                                                          CloudFront
                                                                          CloudFront, gzip
5s


2s

                                                                    CDNs seem quite equal
                                                                          in performance.
     Amsterdam   Dallas    Los Angeles        Singapore   Tokyo

                                         16
RE
                                                                                 VIS
                                PROXY VS. CDN                                          ITE
                                                                                          D

Average load speed (real) tested with 3 iterations: time curl --compressed <url> > /dev/null

       File: css-main-data.gz.css (73k)             Transparent bar denotes 1st load
13 s

10 s
                                                                                              Incapsula, gzip
 8s                                                                                           Akamai, gzip
                                                                                              CloudFront, gzip

 5s

 3s
                                                                                              Akamai was the
                                                                                          steadiest performer
              Norway                      UK   US                    Japan                       globally.


                                               17
LEARNINGS
• CDN    for large files and gzipping are always good for performance

• CDN    for small files can actually slow down performance

• Parallelizing   across hosts works fine (2-4 hosts recommended by Yahoo)

• Options  for gzipping CSS & JS: (1) Pre-compress and serve the right
 version (fastest), (2) done by server on the fly (easiest), (3) done by
 application (can be slow)

• Realistic   comparison of CDNs would require weeks of monitoring
                                        18
CHECKLIST
✓ Minify and combine CSS & JavaScript (load JS asynchronously when possible)
✓ Compress images and use web/tablet/smartphone resolutions
✓ Combine small images into sprites or use inline images with data URIs (IE7 requires
   MHTML: http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/)

✓ Gzip HTML, CSS & JS. Pre-compress files when possible.
✓ Load large resources from CDN, possibly using multiple hosts
✓ Long cache TTL for static assets + invalidate with versioning (main-xyz.css / main.css?xyz)
✓ Advanced: lazy loading, async CSS, HTML5 cache, JS pre-execution, response prediction
                                              19
APPENDIX



   20
Start     Repeat
                               Requests Load time Page size First byte
                                                                       render    view
Original
   Amsterdam, Netherlands         43     3.9 s   206 kB
   Dallas, TX, USA                43     7.8 s   206 kB
   Dulles, VA, USA                44     4.7 s   227 kB        1.5 s     2.8 s     4.0 s
   Jiangsu, China                 45    17.3 s   228 kB        2.9 s     8.0 s    13.8 s
Caching
   Amsterdam, Netherlands         43     1.3 s   161 kB
   Dallas, TX, USA                43     3.1 s   161 kB
   Dulles, VA, USA                44     3.3 s   180 kB        1.0 s     2.0 s     2.7 s
   Jiangsu, China                 44    11.2 s   178 kB        2.1 s     6.2 s     9.5 s
Parallel CDNs (CloudFront), Combined images, Pre-gzip
   Amsterdam, Netherlands         37     0.5 s   113 kB
   Dallas, TX, USA                37     2.4 s   113 kB
   Dulles, VA, USA                 6     2.3 s   114 kB        0.9 s     2.1 s     0.8 s
   Jiangsu, China                 26     6.2 s   145 kB        2.1 s     3.9 s     1.3 s

                                        21
JOOMLA SETTINGS
• JotCache   plugin               • CDN   for Joomla plugin



                                                      NB: images must be
                                                      present in CDN if
                                                       locally referenced
                                                           from CSS




                             22
RESOURCES - ANALYTICS
• Pingdom    Full Page Test, http://tools.pingdom.com/fpt/

• WebPageTest, http://www.webpagetest.org/

• REDbot    (cache testing), http://redbot.org/

• Loads   In, http://loads.in/

• Cloud   Speed Test (CDN comparison), http://cloudharmony.com/speedtest

• DNS   Check, http://www.webdnstools.com/dnstools/domain_check
                                         23
RESOURCES - COMPRESSION
• Smush.it, http://www.smushit.com/ysmush.it/

• YUI   Compressor, http://yuilibrary.com/download/yuicompressor/
          java -jar yuicompressor-2.4.7.jar -o '.css$:-min.css' *.css
          java -jar yuicompressor-2.4.7.jar -o '.js$:-min.js' *.js

• In   case you need to manually copy all assets to CDN:
          tar c $(find <source_dir> ( -name "*.bmp" -o -name "*.gif" -o -name "*.jpg" -o -name
          "*.jpeg" -o -name "*.png" -o -name "*.css*" -o -name "*.js*" )) | tar xv -C <dest_dir>


• SmartSprites, http://csssprites.org/, SpriteMe, http://spriteme.org/
                                                         24

Weitere ähnliche Inhalte

Was ist angesagt?

004 architecture andadvanceduse
004 architecture andadvanceduse004 architecture andadvanceduse
004 architecture andadvanceduseScott Miao
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기OnGameServer
 
AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...
AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...
AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...Amazon Web Services
 
Accelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheAccelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheDavid Grier
 
Postgres in Amazon RDS
Postgres in Amazon RDSPostgres in Amazon RDS
Postgres in Amazon RDSDenish Patel
 
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.Takatoshi Matsuo
 
TechTalk v2.0 - Performance tuning Cassandra + AWS
TechTalk v2.0 - Performance tuning Cassandra + AWSTechTalk v2.0 - Performance tuning Cassandra + AWS
TechTalk v2.0 - Performance tuning Cassandra + AWSPythian
 
Faster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based AllocationFaster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based AllocationIgalia
 
Mysql story in poi dedup
Mysql story in poi dedupMysql story in poi dedup
Mysql story in poi dedupfeng lee
 
Cassandra in Operation
Cassandra in OperationCassandra in Operation
Cassandra in Operationniallmilton
 
Cassandra Operations at Netflix
Cassandra Operations at NetflixCassandra Operations at Netflix
Cassandra Operations at Netflixgreggulrich
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephRongze Zhu
 
Spark / Mesos Cluster Optimization
Spark / Mesos Cluster OptimizationSpark / Mesos Cluster Optimization
Spark / Mesos Cluster Optimizationebiznext
 

Was ist angesagt? (20)

004 architecture andadvanceduse
004 architecture andadvanceduse004 architecture andadvanceduse
004 architecture andadvanceduse
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기
 
cosbench-openstack.pdf
cosbench-openstack.pdfcosbench-openstack.pdf
cosbench-openstack.pdf
 
Cosbench apac
Cosbench apacCosbench apac
Cosbench apac
 
AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...
AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...
AWS Webcast - Achieving consistent high performance with Postgres on Amazon W...
 
Accelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cacheAccelerating hbase with nvme and bucket cache
Accelerating hbase with nvme and bucket cache
 
PostgreSQL Query Cache - "pqc"
PostgreSQL Query Cache - "pqc"PostgreSQL Query Cache - "pqc"
PostgreSQL Query Cache - "pqc"
 
Postgres in Amazon RDS
Postgres in Amazon RDSPostgres in Amazon RDS
Postgres in Amazon RDS
 
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
 
TechTalk v2.0 - Performance tuning Cassandra + AWS
TechTalk v2.0 - Performance tuning Cassandra + AWSTechTalk v2.0 - Performance tuning Cassandra + AWS
TechTalk v2.0 - Performance tuning Cassandra + AWS
 
Faster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based AllocationFaster and Smaller qcow2 Files with Subcluster-based Allocation
Faster and Smaller qcow2 Files with Subcluster-based Allocation
 
Mysql story in poi dedup
Mysql story in poi dedupMysql story in poi dedup
Mysql story in poi dedup
 
Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
 
Cassandra in Operation
Cassandra in OperationCassandra in Operation
Cassandra in Operation
 
92 grand prix_2013
92 grand prix_201392 grand prix_2013
92 grand prix_2013
 
How swift is your Swift - SD.pptx
How swift is your Swift - SD.pptxHow swift is your Swift - SD.pptx
How swift is your Swift - SD.pptx
 
optimizing_ceph_flash
optimizing_ceph_flashoptimizing_ceph_flash
optimizing_ceph_flash
 
Cassandra Operations at Netflix
Cassandra Operations at NetflixCassandra Operations at Netflix
Cassandra Operations at Netflix
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
 
Spark / Mesos Cluster Optimization
Spark / Mesos Cluster OptimizationSpark / Mesos Cluster Optimization
Spark / Mesos Cluster Optimization
 

Andere mochten auch

Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by StepKim Stefan Lindholm
 
Front end performance optimization
Front end performance optimizationFront end performance optimization
Front end performance optimizationStevie T
 
Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...
Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...
Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...Strangeloop
 
Front end optimization
Front end optimizationFront end optimization
Front end optimizationAbhishek Anand
 
Front-End Performance Optimization in WordPress
Front-End Performance Optimization in WordPressFront-End Performance Optimization in WordPress
Front-End Performance Optimization in WordPressdrywallbmb
 
Marrying CDNs with Front-End Optimization
Marrying CDNs with Front-End Optimization Marrying CDNs with Front-End Optimization
Marrying CDNs with Front-End Optimization Strangeloop
 
Heavy Web Optimization: Frontend
Heavy Web Optimization: FrontendHeavy Web Optimization: Frontend
Heavy Web Optimization: FrontendVõ Duy Tuấn
 
Vasona Networks @ Telco Vision 2013
Vasona Networks @ Telco Vision 2013Vasona Networks @ Telco Vision 2013
Vasona Networks @ Telco Vision 2013vasonanetworks
 

Andere mochten auch (10)

Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by Step
 
IPv6 Measurements
IPv6 MeasurementsIPv6 Measurements
IPv6 Measurements
 
Front end performance optimization
Front end performance optimizationFront end performance optimization
Front end performance optimization
 
Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...
Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...
Cloud Connect Santa Clara 2013: Web Acceleration and Front-End Optimization (...
 
Front end optimization
Front end optimizationFront end optimization
Front end optimization
 
Front-End Performance Optimization in WordPress
Front-End Performance Optimization in WordPressFront-End Performance Optimization in WordPress
Front-End Performance Optimization in WordPress
 
Marrying CDNs with Front-End Optimization
Marrying CDNs with Front-End Optimization Marrying CDNs with Front-End Optimization
Marrying CDNs with Front-End Optimization
 
Heavy Web Optimization: Frontend
Heavy Web Optimization: FrontendHeavy Web Optimization: Frontend
Heavy Web Optimization: Frontend
 
Vasona Networks @ Telco Vision 2013
Vasona Networks @ Telco Vision 2013Vasona Networks @ Telco Vision 2013
Vasona Networks @ Telco Vision 2013
 
Image processing ppt
Image processing pptImage processing ppt
Image processing ppt
 

Ähnlich wie Improve Site Response Time with FEO

WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningWordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningTimothy Wood
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfcodearachnid_test
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfcodearachnid_test
 
Considerations for building your private cloud folsom update
Considerations for building your private cloud   folsom updateConsiderations for building your private cloud   folsom update
Considerations for building your private cloud folsom updateRyan Richard
 
PGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various cloudsPGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various cloudsPGConf APAC
 
Mongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availabilityMongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availabilityagiamas
 
LCA13: Hadoop DFS Performance
LCA13: Hadoop DFS PerformanceLCA13: Hadoop DFS Performance
LCA13: Hadoop DFS PerformanceLinaro
 
Practical learnings from running thousands of Flink jobs
Practical learnings from running thousands of Flink jobsPractical learnings from running thousands of Flink jobs
Practical learnings from running thousands of Flink jobsFlink Forward
 
Scaling Django for X Factor - DJUGL Oct 2012
Scaling Django for X Factor - DJUGL Oct 2012Scaling Django for X Factor - DJUGL Oct 2012
Scaling Django for X Factor - DJUGL Oct 2012Malcolm Box
 
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...Amazon Web Services
 
Voldemort on Solid State Drives
Voldemort on Solid State DrivesVoldemort on Solid State Drives
Voldemort on Solid State DrivesVinoth Chandar
 
Voldemort on Solid State Drives
Voldemort on Solid State DrivesVoldemort on Solid State Drives
Voldemort on Solid State DrivesAmy W. Tang
 
LCA13: Web Server and Caching Technologies
LCA13: Web Server and Caching TechnologiesLCA13: Web Server and Caching Technologies
LCA13: Web Server and Caching TechnologiesLinaro
 
Boyan Ivanov - latency, the #1 metric of your cloud
Boyan Ivanov - latency, the #1 metric of your cloudBoyan Ivanov - latency, the #1 metric of your cloud
Boyan Ivanov - latency, the #1 metric of your cloudShapeBlue
 
Page Performance
Page PerformancePage Performance
Page Performancestk_jj
 

Ähnlich wie Improve Site Response Time with FEO (20)

WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningWordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & Tuning
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
Considerations for building your private cloud folsom update
Considerations for building your private cloud   folsom updateConsiderations for building your private cloud   folsom update
Considerations for building your private cloud folsom update
 
PGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various cloudsPGConf APAC 2018 - PostgreSQL performance comparison in various clouds
PGConf APAC 2018 - PostgreSQL performance comparison in various clouds
 
Mongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availabilityMongo DB Athens user group replication and high availability
Mongo DB Athens user group replication and high availability
 
NVMe over Fabric
NVMe over FabricNVMe over Fabric
NVMe over Fabric
 
LCA13: Hadoop DFS Performance
LCA13: Hadoop DFS PerformanceLCA13: Hadoop DFS Performance
LCA13: Hadoop DFS Performance
 
Practical learnings from running thousands of Flink jobs
Practical learnings from running thousands of Flink jobsPractical learnings from running thousands of Flink jobs
Practical learnings from running thousands of Flink jobs
 
Scaling Django for X Factor - DJUGL Oct 2012
Scaling Django for X Factor - DJUGL Oct 2012Scaling Django for X Factor - DJUGL Oct 2012
Scaling Django for X Factor - DJUGL Oct 2012
 
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
 
Voldemort on Solid State Drives
Voldemort on Solid State DrivesVoldemort on Solid State Drives
Voldemort on Solid State Drives
 
Voldemort on Solid State Drives
Voldemort on Solid State DrivesVoldemort on Solid State Drives
Voldemort on Solid State Drives
 
Caching for Cash - Part 4
Caching for Cash - Part 4Caching for Cash - Part 4
Caching for Cash - Part 4
 
A faster web
A faster webA faster web
A faster web
 
LCA13: Web Server and Caching Technologies
LCA13: Web Server and Caching TechnologiesLCA13: Web Server and Caching Technologies
LCA13: Web Server and Caching Technologies
 
Boyan Ivanov - latency, the #1 metric of your cloud
Boyan Ivanov - latency, the #1 metric of your cloudBoyan Ivanov - latency, the #1 metric of your cloud
Boyan Ivanov - latency, the #1 metric of your cloud
 
Page Performance
Page PerformancePage Performance
Page Performance
 

Kürzlich hochgeladen

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Improve Site Response Time with FEO

  • 1. Improving Site Response Time Part 1: Front-End Optimization (FEO) Kim Stefan Lindholm 1 26.1.2012
  • 2. SETUP • Server: CloudControl (Dublin, Ireland) with local Varnish HTTP accelerator • CMS (Content Management System): Joomla 1.5 • WAF (Web Application Firewall): Incapsula • CDN (Content Delivery Network): Akamai (Rackspace) & Amazon CloudFront • Anycast DNS: DNS Made Easy NB: Incapsula and Akamai automatically serve compressed (gzip) files 2
  • 3. RESULTS Proxy servers may take some time to refresh their cache, which can delay performance improvement. Browser & server cache + compression Minify images, CSS & JS Combine Gzip HTML, CSS & JS Inline images, No caching Pre-gzip, CDN Main page, average response time (ms) 3 Pingdom Panel, global average
  • 4. LOAD TIME 18 s 14 s Original 9s Caching CloudFront, inline, gzip 5s Amsterdam Dallas, TX Dulles, VA Jiangsu, China 4
  • 5. LOAD TIME Amsterdam Dallas, TX Chrome Chrome -87% -69% Dulles, VA Jiangsu IE 8 IE 7 -51% -64% 5
  • 6. How much were we able to decrease costly HTTP requests? 6
  • 7. CACHED VS. FINAL HTTP Requests -83% Total Weight -30% Original total weight was 206K 7 Yahoo YSlow add-on for Chrome
  • 8. Did Incapsula web proxy/firewall contribute to the results? 8
  • 9. INCAPSULA Incapsula caching seemed to be affected by incoming traffic (site popularity) and not so much by changes in the website itself (cacheability etc.) 9
  • 10. Speed difference between Incapsula proxy and global CDN (measured in Europe)? 10
  • 11. PROXY VS. CDN Average load speed (real) tested with 10 iterations: time curl [--compressed] <url> > /dev/null 2,500 ms 1,875 ms No proxy Incapsula Incapsula, gzip 1,250 ms Compressed Akamai size: 34k Compressed Akamai, gzip size: 3k Slowest 1st load: 1400 ms 625 ms mootools.js (116k) template.css (11k) template_ie7.css (2k) 11
  • 12. PROXY VS. CDN • Standarddeviation with Akamai CDN was notable. At worst, fetching a 2k file was 3x slower than with the original unproxied connection. • Withcompression on, first loads seemed very slow. This is acceptable, of course, if gzipping and pushing to cache only happens infrequently. • Given the additional overhead of compression and DNS lookups, small files (<10k) are not automatically perfect candidates for CDN. Combine images using sprites instead. 12
  • 13. Speed difference between Akamai and Amazon CloudFront? 13
  • 14. CDN COMPARISON Akamai, gzip CloudFront, gzip 14 Pingdom Panel, Response time report
  • 15. CDN COMPARISON Main page first load speed, CDN allowed to propagate for one day 9s 7s Akamai, gzip CloudFront CloudFront, gzip 5s 2s Amsterdam Dallas Los Angeles Singapore Tokyo 15
  • 16. CDN COMPARISON Main page second load speed, CDN allowed to propagate for one day 9s 7s Akamai, gzip CloudFront CloudFront, gzip 5s 2s CDNs seem quite equal in performance. Amsterdam Dallas Los Angeles Singapore Tokyo 16
  • 17. RE VIS PROXY VS. CDN ITE D Average load speed (real) tested with 3 iterations: time curl --compressed <url> > /dev/null File: css-main-data.gz.css (73k) Transparent bar denotes 1st load 13 s 10 s Incapsula, gzip 8s Akamai, gzip CloudFront, gzip 5s 3s Akamai was the steadiest performer Norway UK US Japan globally. 17
  • 18. LEARNINGS • CDN for large files and gzipping are always good for performance • CDN for small files can actually slow down performance • Parallelizing across hosts works fine (2-4 hosts recommended by Yahoo) • Options for gzipping CSS & JS: (1) Pre-compress and serve the right version (fastest), (2) done by server on the fly (easiest), (3) done by application (can be slow) • Realistic comparison of CDNs would require weeks of monitoring 18
  • 19. CHECKLIST ✓ Minify and combine CSS & JavaScript (load JS asynchronously when possible) ✓ Compress images and use web/tablet/smartphone resolutions ✓ Combine small images into sprites or use inline images with data URIs (IE7 requires MHTML: http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/) ✓ Gzip HTML, CSS & JS. Pre-compress files when possible. ✓ Load large resources from CDN, possibly using multiple hosts ✓ Long cache TTL for static assets + invalidate with versioning (main-xyz.css / main.css?xyz) ✓ Advanced: lazy loading, async CSS, HTML5 cache, JS pre-execution, response prediction 19
  • 20. APPENDIX 20
  • 21. Start Repeat Requests Load time Page size First byte render view Original Amsterdam, Netherlands 43 3.9 s 206 kB Dallas, TX, USA 43 7.8 s 206 kB Dulles, VA, USA 44 4.7 s 227 kB 1.5 s 2.8 s 4.0 s Jiangsu, China 45 17.3 s 228 kB 2.9 s 8.0 s 13.8 s Caching Amsterdam, Netherlands 43 1.3 s 161 kB Dallas, TX, USA 43 3.1 s 161 kB Dulles, VA, USA 44 3.3 s 180 kB 1.0 s 2.0 s 2.7 s Jiangsu, China 44 11.2 s 178 kB 2.1 s 6.2 s 9.5 s Parallel CDNs (CloudFront), Combined images, Pre-gzip Amsterdam, Netherlands 37 0.5 s 113 kB Dallas, TX, USA 37 2.4 s 113 kB Dulles, VA, USA 6 2.3 s 114 kB 0.9 s 2.1 s 0.8 s Jiangsu, China 26 6.2 s 145 kB 2.1 s 3.9 s 1.3 s 21
  • 22. JOOMLA SETTINGS • JotCache plugin • CDN for Joomla plugin NB: images must be present in CDN if locally referenced from CSS 22
  • 23. RESOURCES - ANALYTICS • Pingdom Full Page Test, http://tools.pingdom.com/fpt/ • WebPageTest, http://www.webpagetest.org/ • REDbot (cache testing), http://redbot.org/ • Loads In, http://loads.in/ • Cloud Speed Test (CDN comparison), http://cloudharmony.com/speedtest • DNS Check, http://www.webdnstools.com/dnstools/domain_check 23
  • 24. RESOURCES - COMPRESSION • Smush.it, http://www.smushit.com/ysmush.it/ • YUI Compressor, http://yuilibrary.com/download/yuicompressor/ java -jar yuicompressor-2.4.7.jar -o '.css$:-min.css' *.css java -jar yuicompressor-2.4.7.jar -o '.js$:-min.js' *.js • In case you need to manually copy all assets to CDN: tar c $(find <source_dir> ( -name "*.bmp" -o -name "*.gif" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.css*" -o -name "*.js*" )) | tar xv -C <dest_dir> • SmartSprites, http://csssprites.org/, SpriteMe, http://spriteme.org/ 24