SlideShare a Scribd company logo
1 of 30
Run your TYPO3 with a CDN in 5 Minutes
... if you know how
@bennimack


Aug 4, 2022
Agenda
• Who is this guy?


• What is a CDN? Do I need one?


• How much does a CDN cost?


• What can a CDN cache from TYPO3?


• How do I configure TYPO3 to use a CDN?


• Dealing with Edge-Cases
@bennimack


Aug 4, 2022
Who is this guy?
• Benni Mack


• CTO at b13.com


• Made in Germany


• Works with TYPO3 since 2003


• Core Development but also agency customer work @ b13.com


• Focus on larger enterprises reaching out worldwide
Photo by NASA on Unsplash
What is a CDN? And do I need one?
@bennimack


Aug 4, 2022
Browser Reverse Proxy Web Server
@bennimack


Aug 4, 2022
Graphic by cloudflare.com
@bennimack


Aug 4, 2022
Browser Reverse Proxy Web Server
@bennimack


Aug 4, 2022
Browser Reverse Proxy Web Server
@bennimack


Aug 4, 2022
What is a CDN?
• Hundreds of servers in various regions that act as a cache
("reverse proxy")


to deliver content faster depending on the users' location


• Loads content from an origin server


• Keeps the content on the regional server
Photo by NASA on Unsplash
Do I need a CDN?
@bennimack


Aug 4, 2022
My website is slow


I run an intranet for


a german government


TYPO3's Backend is slow


My friend says everyone


has one these days


Nobody can touch my


... data
I want to reach


my visitors globally


I have a large


infrastructure to handle


my traffic


I have a lot of money


but not a lot of IT people
@bennimack


Aug 4, 2022
What does a CDN cost?
• Usually a lot of extras to it


• SSL certificates


• DDOS / Firewall / Security measurements


• DNS Management
0 € to 5.000€


/ month


/ domain
@bennimack


Aug 4, 2022
Do I get a CDN off of Amazon?
Amazon AWS CloudFront
Cloudflare
Microsoft Azure CDN
Google Cloud
Fastly
Akamai
Myra Cloud
What can a CDN cache from TYPO3?
Photo by NASA on Unsplash
@bennimack


Aug 4, 2022
What can a CDN cache from your website?
• Static Assets


• Images, JavaScript + StyleSheets


• Make up 80% of your website traffic


• Check your .htaccess file for details


• What about HTML Rendering?


• Only if you allow caching?


• TYPO3 Backend?


• Dynamic Content?
@bennimack


Aug 4, 2022
Under the hood
HTTP Response Headers


✗ curl -I https://b13.com


....


Cache-Control: max-age=231


Content-Language: de


Content-Length: 7855


Date: Mon, 01 Aug 2022 14:15:36 GMT


Expires: Mon, 01 Aug 2022 14:19:27 GMT


Pragma: public
How do I configure TYPO3 to use a CDN?
@bennimack


Aug 4, 2022
TypoScript magic
config.sendCacheHeaders = 1
@bennimack


Aug 4, 2022
Tune Cache Lifetime
• config.cache_timeout = 60


• config.cache_clearAtMidnight = 1
@bennimack


Aug 4, 2022
Some more functionality
Do not cache when


- no_cache=1 is set


- A backend user is logged in (cookie)


- A frontend user is logged in (cookie)


- Workspace Preview happens


- A "non-Cacheable" (USER_INT) element is found


- A 400+ HTTP Response code is sent


- A POST Request is sent (Form submission)
config.sendCacheHeaders = 1
@bennimack


Aug 4, 2022
Graphic by cloudflare.com
@bennimack


Aug 4, 2022
Make some TYPO3-internals work
$GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'] = '12.23.34.45';
Needs to be set to the IP of the Edge Server
@bennimack


Aug 4, 2022
Additional Configuration - CloudFlare
// use Cloudflare when active


if ($_SERVER['HTTP_CF_CONNECTING_IP'] ?? false) {


$GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxySSL'] = '*';


$GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'] = '*';


$GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyHeaderMultiValue'] = 'first';


}
@bennimack


Aug 4, 2022
Additional Configuration - AWS CloudFront
$cloudFrontToken = getenv('CLOUDFRONT_TOKEN');


if (array_key_exists('HTTP_CLOUDFRONT_TOKEN', $_SERVER) && strtolower($_SERVER['HTTP_CLOUDFRONT_TOKEN']) ==
$cloudFrontToken) {


if (array_key_exists('HTTP_VIA', $_SERVER) && stripos($_SERVER['HTTP_VIA'], 'cloudfront') !== false) {


if (array_key_exists('HTTP_CLOUDFRONT_FORWARDED_PROTO', $_SERVER) &&
strtolower($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO']) == 'https') {


$GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'] = $_SERVER['REMOTE_ADDR'];


$GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxySSL'] = '*';


$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '^.*example.com$';


}


}


}
@bennimack


Aug 4, 2022
How to find out the details
• cURL -I https://url-behind-a-cdn.com/


• benni.php
@bennimack


Aug 4, 2022
Advanced Tools
Flush CDN Caches when content is changed


->
EXT:proxycachemanager


Various adapters


->
EXT:akamai, EXT:cloudflare_cdn, EXT:azure_purge


Cache Parts of a Page


->
Edge Workers


Optimize with Cache Tags


->
TCEMAIN.clearCacheCmd = 12,cacheTag:news
Edge-Cases
@bennimack


Aug 4, 2022
Check if your site is ready
• What about GDPR?


• Do you have USER_INT plugins?


• How to deal with login forms or forms in general?


• Disable no_cache=1 forever via


$GLOBALS['TYPO3_CONF_VARS']['FE']['disableNoCacheParameter'] = 1;


• Be creative when building solutions


• Do you have variants for different regions?
@bennimack


Aug 4, 2022
Summary
Understand TYPO3:


* config.sendCacheHeaders = 1


* $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'];


* cache_tags


Configure CDN, htaccess


Learn to read HTTP Headers
Thanks for listening
Questions? @bennimack

More Related Content

Similar to Run your TYPO3 with a CDN in 5 Minutes

GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingSimon Su
 
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...Cloudflare
 
"Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20...
"Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20..."Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20...
"Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20...AWS Chicago
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...Docker, Inc.
 
Solving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute finalSolving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute finalAvere Systems
 
Apache Airflow Introduction
Apache Airflow IntroductionApache Airflow Introduction
Apache Airflow IntroductionLiangjun Jiang
 
Building a Cross Cloud Data Protection Engine
Building a Cross Cloud Data Protection EngineBuilding a Cross Cloud Data Protection Engine
Building a Cross Cloud Data Protection EngineDatabricks
 
Website & Internet + Performance testing
Website & Internet + Performance testingWebsite & Internet + Performance testing
Website & Internet + Performance testingRoman Ananev
 
Openstack Summit Vancouver 2018 - Multicloud Networking
Openstack Summit Vancouver 2018 - Multicloud NetworkingOpenstack Summit Vancouver 2018 - Multicloud Networking
Openstack Summit Vancouver 2018 - Multicloud NetworkingShannon McFarland
 
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxConfidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxCarlo Sacchi
 
Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Fastly
 
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCPSimpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCPDaniel Zivkovic
 
Microsoft Azure News - December 2019
Microsoft Azure News - December 2019Microsoft Azure News - December 2019
Microsoft Azure News - December 2019Daniel Toomey
 
Common questions for Windows Azure and Kentico CMS
Common questions for Windows Azure and Kentico CMSCommon questions for Windows Azure and Kentico CMS
Common questions for Windows Azure and Kentico CMSThomas Robbins
 
Migrating Large Scale Data Sets to the Cloud
Migrating Large Scale Data Sets to the CloudMigrating Large Scale Data Sets to the Cloud
Migrating Large Scale Data Sets to the CloudAmazon Web Services
 
Deploying a Java Application on Azure Kubernetes Service with Cosmos DB
Deploying a Java Application on Azure Kubernetes Service with Cosmos DBDeploying a Java Application on Azure Kubernetes Service with Cosmos DB
Deploying a Java Application on Azure Kubernetes Service with Cosmos DBBitnami
 
Microsoft Azure News - 2019 May
Microsoft Azure News - 2019 MayMicrosoft Azure News - 2019 May
Microsoft Azure News - 2019 MayDaniel Toomey
 
Frontier Technology: Demystifying 5 Myths of Cloud Storage
Frontier Technology: Demystifying 5 Myths of Cloud StorageFrontier Technology: Demystifying 5 Myths of Cloud Storage
Frontier Technology: Demystifying 5 Myths of Cloud StorageFrontier Technology
 

Similar to Run your TYPO3 with a CDN in 5 Minutes (20)

GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
 
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
65% Performance Gains at Cryptocurrency Platform CoinGecko: An Argo Smart Rou...
 
"Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20...
"Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20..."Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20...
"Cars.com Journey to AWS Cloud" by Naresh Chintalcheru at Cars.com July 11 20...
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
 
Solving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute finalSolving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute final
 
1z0-997-21 (4).pdf
1z0-997-21 (4).pdf1z0-997-21 (4).pdf
1z0-997-21 (4).pdf
 
Cars.com Journey to AWS Cloud
Cars.com Journey to AWS CloudCars.com Journey to AWS Cloud
Cars.com Journey to AWS Cloud
 
Apache Airflow Introduction
Apache Airflow IntroductionApache Airflow Introduction
Apache Airflow Introduction
 
Building a Cross Cloud Data Protection Engine
Building a Cross Cloud Data Protection EngineBuilding a Cross Cloud Data Protection Engine
Building a Cross Cloud Data Protection Engine
 
Website & Internet + Performance testing
Website & Internet + Performance testingWebsite & Internet + Performance testing
Website & Internet + Performance testing
 
Openstack Summit Vancouver 2018 - Multicloud Networking
Openstack Summit Vancouver 2018 - Multicloud NetworkingOpenstack Summit Vancouver 2018 - Multicloud Networking
Openstack Summit Vancouver 2018 - Multicloud Networking
 
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptxConfidential Computing in Azure - SlideShare Ed Dec 2022.pptx
Confidential Computing in Azure - SlideShare Ed Dec 2022.pptx
 
Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]
 
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCPSimpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
Simpler, faster, cheaper Enterprise Apps using only Spring Boot on GCP
 
Microsoft Azure News - December 2019
Microsoft Azure News - December 2019Microsoft Azure News - December 2019
Microsoft Azure News - December 2019
 
Common questions for Windows Azure and Kentico CMS
Common questions for Windows Azure and Kentico CMSCommon questions for Windows Azure and Kentico CMS
Common questions for Windows Azure and Kentico CMS
 
Migrating Large Scale Data Sets to the Cloud
Migrating Large Scale Data Sets to the CloudMigrating Large Scale Data Sets to the Cloud
Migrating Large Scale Data Sets to the Cloud
 
Deploying a Java Application on Azure Kubernetes Service with Cosmos DB
Deploying a Java Application on Azure Kubernetes Service with Cosmos DBDeploying a Java Application on Azure Kubernetes Service with Cosmos DB
Deploying a Java Application on Azure Kubernetes Service with Cosmos DB
 
Microsoft Azure News - 2019 May
Microsoft Azure News - 2019 MayMicrosoft Azure News - 2019 May
Microsoft Azure News - 2019 May
 
Frontier Technology: Demystifying 5 Myths of Cloud Storage
Frontier Technology: Demystifying 5 Myths of Cloud StorageFrontier Technology: Demystifying 5 Myths of Cloud Storage
Frontier Technology: Demystifying 5 Myths of Cloud Storage
 

Recently uploaded

Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 

Recently uploaded (20)

Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 

Run your TYPO3 with a CDN in 5 Minutes

  • 1. Run your TYPO3 with a CDN in 5 Minutes ... if you know how
  • 2. @bennimack 
 Aug 4, 2022 Agenda • Who is this guy? • What is a CDN? Do I need one? • How much does a CDN cost? • What can a CDN cache from TYPO3? • How do I configure TYPO3 to use a CDN? • Dealing with Edge-Cases
  • 3. @bennimack 
 Aug 4, 2022 Who is this guy? • Benni Mack • CTO at b13.com • Made in Germany • Works with TYPO3 since 2003 • Core Development but also agency customer work @ b13.com • Focus on larger enterprises reaching out worldwide
  • 4. Photo by NASA on Unsplash What is a CDN? And do I need one?
  • 5. @bennimack 
 Aug 4, 2022 Browser Reverse Proxy Web Server
  • 7. @bennimack 
 Aug 4, 2022 Browser Reverse Proxy Web Server
  • 8. @bennimack 
 Aug 4, 2022 Browser Reverse Proxy Web Server
  • 9. @bennimack 
 Aug 4, 2022 What is a CDN? • Hundreds of servers in various regions that act as a cache ("reverse proxy") 
 to deliver content faster depending on the users' location • Loads content from an origin server • Keeps the content on the regional server
  • 10. Photo by NASA on Unsplash Do I need a CDN?
  • 11. @bennimack 
 Aug 4, 2022 My website is slow I run an intranet for 
 a german government TYPO3's Backend is slow My friend says everyone 
 has one these days Nobody can touch my 
 ... data I want to reach 
 my visitors globally I have a large 
 infrastructure to handle 
 my traffic I have a lot of money 
 but not a lot of IT people
  • 12. @bennimack 
 Aug 4, 2022 What does a CDN cost? • Usually a lot of extras to it • SSL certificates • DDOS / Firewall / Security measurements • DNS Management 0 € to 5.000€ 
 / month 
 / domain
  • 13. @bennimack 
 Aug 4, 2022 Do I get a CDN off of Amazon? Amazon AWS CloudFront Cloudflare Microsoft Azure CDN Google Cloud Fastly Akamai Myra Cloud
  • 14. What can a CDN cache from TYPO3? Photo by NASA on Unsplash
  • 15. @bennimack 
 Aug 4, 2022 What can a CDN cache from your website? • Static Assets • Images, JavaScript + StyleSheets • Make up 80% of your website traffic • Check your .htaccess file for details • What about HTML Rendering? • Only if you allow caching? • TYPO3 Backend? • Dynamic Content?
  • 16. @bennimack 
 Aug 4, 2022 Under the hood HTTP Response Headers ✗ curl -I https://b13.com 
 .... Cache-Control: max-age=231 Content-Language: de Content-Length: 7855 Date: Mon, 01 Aug 2022 14:15:36 GMT Expires: Mon, 01 Aug 2022 14:19:27 GMT Pragma: public
  • 17. How do I configure TYPO3 to use a CDN?
  • 18. @bennimack 
 Aug 4, 2022 TypoScript magic config.sendCacheHeaders = 1
  • 19. @bennimack 
 Aug 4, 2022 Tune Cache Lifetime • config.cache_timeout = 60 • config.cache_clearAtMidnight = 1
  • 20. @bennimack 
 Aug 4, 2022 Some more functionality Do not cache when - no_cache=1 is set - A backend user is logged in (cookie) - A frontend user is logged in (cookie) - Workspace Preview happens - A "non-Cacheable" (USER_INT) element is found - A 400+ HTTP Response code is sent - A POST Request is sent (Form submission) config.sendCacheHeaders = 1
  • 22. @bennimack 
 Aug 4, 2022 Make some TYPO3-internals work $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'] = '12.23.34.45'; Needs to be set to the IP of the Edge Server
  • 23. @bennimack 
 Aug 4, 2022 Additional Configuration - CloudFlare // use Cloudflare when active if ($_SERVER['HTTP_CF_CONNECTING_IP'] ?? false) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxySSL'] = '*'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'] = '*'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyHeaderMultiValue'] = 'first'; }
  • 24. @bennimack 
 Aug 4, 2022 Additional Configuration - AWS CloudFront $cloudFrontToken = getenv('CLOUDFRONT_TOKEN'); if (array_key_exists('HTTP_CLOUDFRONT_TOKEN', $_SERVER) && strtolower($_SERVER['HTTP_CLOUDFRONT_TOKEN']) == $cloudFrontToken) { if (array_key_exists('HTTP_VIA', $_SERVER) && stripos($_SERVER['HTTP_VIA'], 'cloudfront') !== false) { if (array_key_exists('HTTP_CLOUDFRONT_FORWARDED_PROTO', $_SERVER) && strtolower($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO']) == 'https') { $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'] = $_SERVER['REMOTE_ADDR']; $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxySSL'] = '*'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '^.*example.com$'; } } }
  • 25. @bennimack 
 Aug 4, 2022 How to find out the details • cURL -I https://url-behind-a-cdn.com/ • benni.php
  • 26. @bennimack 
 Aug 4, 2022 Advanced Tools Flush CDN Caches when content is changed -> EXT:proxycachemanager Various adapters -> EXT:akamai, EXT:cloudflare_cdn, EXT:azure_purge 
 Cache Parts of a Page -> Edge Workers Optimize with Cache Tags -> TCEMAIN.clearCacheCmd = 12,cacheTag:news
  • 28. @bennimack 
 Aug 4, 2022 Check if your site is ready • What about GDPR? • Do you have USER_INT plugins? • How to deal with login forms or forms in general? • Disable no_cache=1 forever via 
 $GLOBALS['TYPO3_CONF_VARS']['FE']['disableNoCacheParameter'] = 1; • Be creative when building solutions • Do you have variants for different regions?
  • 29. @bennimack 
 Aug 4, 2022 Summary Understand TYPO3: * config.sendCacheHeaders = 1 * $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP']; * cache_tags Configure CDN, htaccess Learn to read HTTP Headers