Top Banner
Fastly takes Drupal.org to extremes Faster, more secure, costs under control +
24

Webcast: Fastly takes drupal.org to extremes

Apr 14, 2017

Download

Internet

Joshua Mitchell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Webcast: Fastly takes drupal.org to extremes

Fastly takes Drupal.org to extremesFaster, more secure, costs under control

+

Page 2: Webcast: Fastly takes drupal.org to extremes

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

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

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

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

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

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

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

Origin shieldFirst request

Subsequent requests

Page 10: Webcast: Fastly takes drupal.org to extremes

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

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

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

● 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

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

But what about Drupal?

Page 16: Webcast: Fastly takes drupal.org to extremes

● 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

Drupal 8

Page 18: Webcast: Fastly takes drupal.org to extremes

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

● 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
Page 21: Webcast: Fastly takes drupal.org to extremes

Drupal 8

● Very good caching support● Fastly plugin synergizes incredibly well

Page 22: Webcast: Fastly takes drupal.org to extremes

● Supporting Cache Contexts○ Accept-Language○ Geo-targeting○ Phase of the moon

The future

Page 24: Webcast: Fastly takes drupal.org to extremes

Kvestions?