webcast: fastly takes drupal.org to extremes
TRANSCRIPT
![Page 1: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/1.jpg)
Fastly takes Drupal.org to extremesFaster, more secure, costs under control
+
![Page 2: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/2.jpg)
Drupal.org and Fastly
It started with a "Hey, you should talk with Ed"
fastly.com/open-source
The story so far...
![Page 3: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/3.jpg)
Topics for today's webcastVarnish config / VCL
TLS/SSL security benefits
Logs/data streams
Purge speed
Origin shield
Load balancers no more
Latency Improvements
What's next...
![Page 4: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/4.jpg)
Varnish config / VCL
● We were already running and loved Varnish before adding Fastly.
● We were able to quickly deploy our existing VCL configuration to Fastly.
● With Fastly we can quickly push and revert VCL changes.
![Page 5: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/5.jpg)
TLS/SSL security benefits
Supporting HTTPS and HSTS
● Fastly caches and prevents most of the Drupal.org requests from reaching our Origin servers.
● We know Fastly can handle our raw traffic; one less scaling issue to be concerned with.
![Page 6: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/6.jpg)
Logs/data streams
Every Drupal site in the world can call "home" to Drupal.org to check for updates. We use this data to calculate usage statistics.
Fastly sends logs directly to our rsyslog endpoint in real time.
We get a lot of requests for updates
![Page 7: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/7.jpg)
Purging
150 milliseconds to purge means we can publish new releases in an instant.
Soft purge means we can serve stale objects from Fastly caches while background fetching the newest content from origin.
![Page 8: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/8.jpg)
Request Collapsing
When objects are not in cache, request collapsing in combination with Origin Shield avoids the “Stampeding Herd” and results in a single request to origin from the CDN for a single object.
![Page 9: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/9.jpg)
Origin shieldFirst request
Subsequent requests
![Page 10: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/10.jpg)
What does it mean?
Combining Origin Shield and Soft Purges:
March
62015
March
62016
5,714,472 requests to origin (old CDN)
59,751 requests to origin (Fastly)
1% of the requests with new config means huge savings compared to our previous CDN
![Page 11: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/11.jpg)
Fastly replaced our load balancers
Since Feb. 25th, Drupal.org no longer has load balancers - Fastly performs health checks and routes directly to our web servers.
Lower TCO; less complexity and improved latency.
![Page 12: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/12.jpg)
Latency improvements
Fastly is connected to NERO, NERO is connected to OSL, OSL is connected to Drupal.org.
…everybody wins.
Fastly peering with NERO
![Page 13: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/13.jpg)
● Tag responses with keys● Purge all cached objects associated with a key
in one command
Surrogate Keys
![Page 14: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/14.jpg)
HTTP/1.1 200 OK
Surrogate-Key: tmpl3 artcl938
Content-Type: text/html
Content-Length: 28407
HTTP/1.1 200 OK
Surrogate-Key: tmpl5 artcl938
Content-Type: text/html
Content-Length: 21034
Surrogate Keys
![Page 15: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/15.jpg)
But what about Drupal?
![Page 16: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/16.jpg)
● Basic caching support● Fastly plugin available
● Drupal7’s caching support is very basic● Fastly plugin works, but is even more basic
Drupal 7
![Page 17: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/17.jpg)
Drupal 8
![Page 18: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/18.jpg)
Cache tags
X-Drupal-Cache-Tags: node_view node_view_article node:5 user:1 filter_format:basic_html taxonomy_term:1 taxonomy_term:2 taxonomy_term_view menu:tools menu:footer menu:main menu:account
![Page 19: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/19.jpg)
● Cache tags are surrogate keys● Fastly does have a size limit● Hash the keys & truncate to 3 characters● Purge both variations
Cache tags
![Page 20: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/20.jpg)
![Page 21: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/21.jpg)
Drupal 8
● Very good caching support● Fastly plugin synergizes incredibly well
![Page 22: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/22.jpg)
● Supporting Cache Contexts○ Accept-Language○ Geo-targeting○ Phase of the moon
The future
![Page 23: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/23.jpg)
https://www.fastly.com/
http://buytaert.net/making-drupal-8-fly
http://wimleers.com/talk/caching-at-the-edge-cdns-for-everyone
https://www.drupal.org/project/fastly
Links
![Page 24: Webcast: Fastly takes drupal.org to extremes](https://reader030.vdocuments.site/reader030/viewer/2022021422/58efd6fd1a28abfe2e8b4583/html5/thumbnails/24.jpg)
Kvestions?