GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing wikitech.wikimedia.org — CDN - Wikitech This article is about the Traffic team's CDN. For the Toolforge CDN, see Help:Toolforge/Web#External assets.
The Wikimedia Content delivery network (CDN) handles traffic routing and HTTP caching for all Wikimedia projects. It is maintained by the SRE Traffic team. This page documents what our CDN exposes for downstream services to predictably consume. The main components of the CDN, (collectively known as cache-proxy, or cp) servers are:
The frontend layer is effectively equally distributed and is responsible for traffic capacity. Each server at this layer is effectively identical and is statistically very likely to hold a copy of the same HTTP responses in-memory. The backend layer is distributed by request hash (e.g. the URL and other metadata), and it is responsible for content capacity. Each server is assigned a subset of URLs, and thus together is able to hold a diverse and long-tail of HTTP responses. As a single server cannot handle all end-user traffic for a single peak-popularity page, the frontend layer serves an important role ahead of the backend. The frontend is responsible for absorbing and coalescing concurrent requests for the same URL when it is absent from the cache, so that it only places minimal demand on the (one) backend assigned for that URL. HTTPSFor more on Wikimedia HTTPS policies/requirements, see HTTPS.
TLS protocolsWhen older standards are dropped, this is done gradually. Clients with deprecated protocols are served https://www.wikipedia.org/sec-warning giving information about why their browser will not be supported in the future. https://www.wikipedia.org/sec-warning is not a regular webpage; This page is deployed on-demand and served directly through Varnish as a response to any deprecated functionality. In other words, the link will 404 unless requested under specific circumstances.
CiphersTLS 1.2 ciphers, in order of preference, are:
TLS 1.3 cipher suites, in order of preference, are:
DeploymentHTTPS certificates are deployed to cache hosts via Acme-chief on a mounted tmpfs volume ( Rate-limitingOnce an IP reaches a limit of over 2000 concurrent requests, all traffic to that IP is dropped for 300 seconds (five minutes). Connections/sockets are immediately freed to prevent any saturation-based outage. This has a nice side-effect of giving the appearance of their attack succeeding since the attackers will experience endless loading. Requests that have reached other components behind this portion of the stack will not be canceled. More fine-grained control over rate-limiting/blocking is achieved with requestctl. Request NormalizationQuery sortingMain article: Query string normalization
Query parameters are alphabetically sorted to improve cache hitrate. Without sorting, Example: This very same sorting strategy is implemented in purged, the daemon responsible for fetching purge events from the application layer and injecting them in both the front-end and back-end caching layer. Path normalizationMain article: URL path normalization
Pages with parentheses or certain other special characters in their titles have more than one correct URL. For example the two following URLs are both correct:
One with literal parentheses, one with parentheses URL-encoded, or one with a mix of the two are all valid. However, when a page changes, purges are sent only for the URL-encoded URL: if the encoded URL is cached, it does not get purged. CachingCurrent cache clusters in all data centers:
Any other cache clusters one might find in the wild are likely historical and decommissioned. Text clusterThe front-end caching layer hides non-session cookies (those that don't match By default, Varnish doesn't cache requests with cookies. In order to cache responses with cookies, Varnish replaces session cookies with the fixed string LogicThe backend caching layer avoids caching responses that meet any of the following requirements:
Additionally the backend caching layer will skip cache lookup for any request that meet any of the following requirements:
RetentionWeb browsers first hit the LVS load balancers. LVS distributes traffic to the edge frontend cluster. As of June 2022, the frontend cache is capped to 1 day with a 7-day keep for benefit of HTTP-304 via IMS/INM (wikimedia-frontend.vcl). Misses from the frontend are hashed to the edge backend cluster. As of April 2020, the ATS backend TTL is capped to 24 hours (T249627, trafficserver/backend.pp). Misses and HTTP-304 renewals from the ATS backend are routed to the MediaWiki app servers. Since July 2016, the As of Dec 2023, the wikitext parser cache retains entries for 30 days (T280604, wgParserCacheExpireTime, wmf-config). See also mw:Manual:Parser cache#Incident response. Invalidating contentFor Varnish:
For ParserCache:
OptimizationsThe backend caching layer strips all cookies (except MediaWiki/CentralAuth sessions) when performing cache lookups. It is thus assumed that all other cookies are either for client-side usage only (and safe to ignore for caching), or are used by low-traffic features that explicitly opt-out from caching. This significantly improves hitrate and reduces cache writes (change 828002). If MediaWiki or other applications make use of a non-session cookie (e.g. GeoIP), it must produce a non-cacheable response (via Cache-Control).
ManagementSite deployment orderingTypically, changes are deployed from a smallest-impact to largest-impact sites: More specifically, the order follows as:
Updates/rebootsWhen applying potentially risky updates to servers (e.g. Kernel updates, OS point-releases), err on the side of caution and practice a slower, incremental approach. For each individual service in each individual site:
See also
Retrieved from "https://wikitech.wikimedia.org/w/index.php?title=CDN&oldid=2474847" |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |