Skip to content

Transition jQuery CDN from StackPath to Fastly #30

Closed
@Krinkle

Description

@Krinkle

General

  • Document recent traffic profile. https://github.com/jquery/infrastructure-puppet/blob/be7518e07a/doc/cdn.md#latest-statistics
  • Document current CDN settings at StackPath (from Highwinds StrikeTracker). https://github.com/jquery/infrastructure-puppet/blob/be7518e07a/doc/cdn.md#highwinds-configuration
  • Create Fastly account, set up delegate access to 2+ admins with 2FA enabled.
  • TLS: Upload custom *.jquery.com certificate.
  • DNS: We prefer CNAME flattening to reduce lookups. Okay?
  • DNS We generally prefer 24h TTL to reduce lookups (shorter during switchover). Okay?
  • DNS: Figure out the correct entrypoint that satisfies out TLS and Networking preferences:
    • Dual stack IPv4 + IPv6.
    • HTTPS with HTTP2 and HTTP1.1
    • HTTP with HTTP1.1 (no redirects).
    • TLS 1.2+ configured such that it is compatible with at least IE9/Win7 for compat with current setup and customer expectations. Ref Renew star.jquery.com cert (expires 14 July 2023) #21.
  • Service: Gzip enabled with strongest settings.
  • Service: Ignore URL query parameters for caching, to reduce origin load.
  • Service: Treat URLs as case-insensitive such that /jQuery-foo.js is able to match /jquery-foo.js.
  • Final confirmation that account is ready to handle 2.2 PB bandwidth per month with peaks of 30K req/s and 8.9Gbps (see traffic profile). E.g. no relevant limitations, quotas, or trial modes in place.

Testing

  • Compression don't poison the cache (either split, or shared and decompressed by edge).
  • Case insensitive URLs don't poison the cache.
  • Various desktop and mobile browsers on real devices.
  • Use curl to try every combination of -4, -6, --http1.1, --http2, --tls-max 1.2, --tls-max 1.3, http+https URLs (except http2 over HTTP) and confirm HTTP 200 OK (esp no redirect). Use --connect-to ::SOMETHING.global.fastly.net to test prior to deploying any DNS changes.

Deployment

Three services overall: code, content, releases.

  1. code: Switch low-traffic alias codeorigin.jquery.com for functional testing.
  2. content: Switch completely, including aliases.
  3. releases: Switch stage.releases.jquery.com for functional testing.
  4. releases: Switch releases.jquery.com. First significant exposure. This is aimed at developers during development, not in production, not in critical path.
  5. code: Update our high-traffic doc sites https://jquery.com and https://api.jquery.com to use codeorigin.jquery.com instead of code.jquery.com. This significantly increases exposure to learn of any connectivity issues that may be specific to uncommon browsers, geography/ISPs, firewalls.
  6. code: The big one Switch code.jquery.com.
  7. code: Switch our high-traffic doc sites back to using the "code.jquery.com" canonical name.

Examples of past issues:

Post-deployment

  • Update sponsorship message on the jQuery CDN homepage, and in the footer of content sites. Ref https://github.com/jquery/jquery-wp-content
  • Update technical docs to remove or update procedures and references to CDN providers.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions