US-12627748-B1 - Content delivery network caching rules update validator
Abstract
A cache validation system receives Content Delivery Network (CDN) caching rules and a request log, such as a log of HTTP requests received by a CDN. The cache validation system generates test requests from the CDN caching rules and the request log. In a testing environment, the cache validation system determines one or more cache validation indicators, such as, but not limited to, a hit-to-miss value, from the test requests and the CDN caching rules before application of a proposed change to a CDN caching rule. The cache validation system applies the proposed change to the CDN caching rules in the testing environment. The cache validation system determines one or more updated cache validation indicators from the test requests for the CDN caching rules after application of the proposed change. If the initial and updated cache validation indicator(s) satisfy a threshold, then the cache validation system can provide a notification.
Inventors
- Abhijit Prakash Bhatnagar
- Eric VILLIERS
- Yusof Ganji
- Yuchao Bai
- Jay Shah
- Ming Luo
- Evan Corriere
- Navid Oskouipour
Assignees
- AMAZON TECHNOLOGIES, INC.
Dates
- Publication Date
- 20260512
- Application Date
- 20240325
Claims (20)
- 1 . A computer-implemented method comprising: receiving a first Content Delivery Network (CDN) caching rule and a proposed change to a second CDN caching rule; receiving a request log associated with a plurality of requests received by a CDN; generating a plurality of test requests based at least in part on the first CDN caching rule and the request log; determining a first hit-to-miss ratio based at least in part on the plurality of test requests, the first CDN caching rule, and a first test CDN cache; applying the proposed change to the second CDN caching rule; determining a second hit-to-miss ratio based at least in part on the plurality of test requests, the second CDN caching rule, and a second test CDN cache; determining that a threshold is satisfied based at least in part on the first hit-to-miss ratio and the second hit-to-miss ratio; and providing, to a user computing device, a notification associated with the proposed change to the second CDN caching rule.
- 2 . The computer-implemented method of claim 1 , wherein the first CDN caching rule comprises at least one of: a path, a query string parameter, a header parameter, a security parameter, or a cookie parameter.
- 3 . The computer-implemented method of claim 1 , wherein determining the first hit-to-miss ratio further comprises: determining a match between the first CDN caching rule and a first test request from the plurality of test requests; determining a cache key from the first CDN caching rule and the first test request; and identifying a cached response for the cache key in the first test CDN cache.
- 4 . The computer-implemented method of claim 1 , wherein determining the first hit-to-miss ratio further comprises: applying, from a plurality of CDN caching rules, individual CDN caching rules to a first test request until there is a match; determining a cache key from a matching CDN caching rule and the first test request; and identifying a cache miss for the cache key in the first test CDN cache.
- 5 . The computer-implemented method of claim 1 , wherein determining the first hit-to-miss ratio further comprises: calculating cache hits associated with the first CDN caching rule; calculating cache misses associated with the first CDN caching rule; and calculating the first hit-to-miss ratio from the cache hits and the cache misses.
- 6 . The computer-implemented method of claim 1 , wherein determining the first hit-to-miss ratio further comprises: calculating cache hits associated with a plurality of CDN caching rules; calculating cache misses associated with the plurality of CDN caching rules; and calculating the first hit-to-miss ratio from the cache hits and the cache misses.
- 7 . A system comprising: a data storage medium; and one or more computer hardware processors in communication with the data storage medium, wherein the one or more computer hardware processors are configured to execute computer-executable instructions to at least: receive a first Content Delivery Network (CDN) caching rule and a proposed change to a second CDN caching rule; receive a request log associated with a plurality of requests received by a CDN; generate a plurality of test requests based at least in part on the first CDN caching rule and the request log; determine a first cache validation indicator based at least in part on the plurality of test requests, the first CDN caching rule, and a first test CDN cache; apply the proposed change to the second CDN caching rule; determine a second cache validation indicator based at least in part on the plurality of test requests, the second CDN caching rule, and a second test CDN cache; determine that a threshold is satisfied based at least in part on the first cache validation indicator and the second cache validation indicator; and provide, to a user computing device, a notification associated with the proposed change to the second CDN caching rule.
- 8 . The system of claim 7 , wherein the request log comprises a first log entry comprising a redacted parameter value, wherein to generate the plurality of test requests, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: generate a test request from the first log entry; and replace, in the test request, the redacted parameter value with a placeholder value.
- 9 . The system of claim 7 , wherein the first CDN caching rule comprises at least one of: a query string parameter, a header parameter, a security parameter, or a cookie parameter.
- 10 . The system of claim 9 , wherein the request log comprises a first log entry, wherein to generate the plurality of test requests, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: generate a test request from the first log entry; and add, to the test request, the at least one of the query string parameter, the header parameter, the security parameter, or the cookie parameter.
- 11 . The system of claim 9 , wherein the request log comprises a first log entry, wherein to generate the plurality of test requests, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: receive a test request configuration setting associated with the at least one of the query string parameter, the header parameter, the security parameter, or the cookie parameter; and generate, based at least in part on the test request configuration setting, a set of test requests with different permutations for the at least one of the query string parameter, the header parameter, the security parameter, or the cookie parameter.
- 12 . The system of claim 7 , wherein to determine the first cache validation indicator, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: determine a first hit-to-miss ratio based at least in part on a first time series of the plurality of test requests; and determine a second hit-to-miss ratio based at least in part on a second time series of the plurality of test requests.
- 13 . The system of claim 7 , wherein to determine the first cache validation indicator, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: determine a first hit-to-miss ratio based at least in part on the plurality of test requests in a first order; and determine a second hit-to-miss ratio based at least in part on the plurality of test requests in a second order.
- 14 . A system comprising: a data storage medium; and one or more computer hardware processors in communication with the data storage medium, wherein the one or more computer hardware processors are configured to execute computer-executable instructions to at least: receive a first Content Delivery Network (CDN) caching rule and a proposed change to a second CDN caching rule; receive a request log associated with a plurality of requests received by a CDN; generate a plurality of test requests based at least in part on the first CDN caching rule and the request log; determine a first cache validation indicator based at least in part on the plurality of test requests, the first CDN caching rule, and a first test CDN cache; apply the proposed change to the second CDN caching rule; determine a second cache validation indicator based at least in part on the plurality of test requests, the second CDN caching rule, and a second test CDN cache; and provide, to a user computing device, a test result based at least in part on the first cache validation indicator and the second cache validation indicator.
- 15 . The system of claim 14 , wherein the test result comprises the first cache validation indicator and the second cache validation indicator.
- 16 . The system of claim 14 , wherein the request log comprises a first log entry, wherein to generate the plurality of test requests, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: determine a plurality of features from at least the first CDN caching rule; generate a first tree of test requests from the first log entry and a first pseudo-random subset of the plurality of features; and generate a second tree of test requests from the first log entry and a second pseudo-random subset of the plurality of features.
- 17 . The system of claim 16 , wherein to determine the first cache validation indicator, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: determine a first hit-to-miss ratio based at least in part on the first tree of test requests; determine a second hit-to-miss ratio based at least in part on the second tree of test requests; and combine the first hit-to-miss ratio and the second hit-to-miss ratio into the first cache validation indicator.
- 18 . The system of claim 14 , wherein the first CDN caching rule comprises at least one of: a query string parameter, a header parameter, a security parameter, or a cookie parameter.
- 19 . The system of claim 18 , wherein the request log comprises a first log entry, wherein to generate the plurality of test requests, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: generate a test request from the first log entry; and add, to the test request, the at least one of the query string parameter, the header parameter, the security parameter, or the cookie parameter.
- 20 . The system of claim 18 , wherein the request log comprises a first log entry, wherein to generate the plurality of test requests, the one or more computer hardware processors are configured to execute further computer-executable instructions to at least: receive a test request configuration setting associated with the at least one of the query string parameter, the header parameter, the security parameter, or the cookie parameter; and generate, based at least in part on the test request configuration setting, a set of test requests with different permutations for the at least one of the query string parameter, the header parameter, the security parameter, or the cookie parameter.
Description
BACKGROUND A content delivery network (CDN) can refer to a geographically distributed group of computing devices that work together to deliver network content. Points of presence (PoPs) in a CDN refers to servers that are strategically located near client devices, such as being placed near high-density network exchange points. The servers in a CDN can provide content using the Hypertext Transfer Protocol (HTTP), an application layer protocol. A CDN cache can refer to data storage that stores content (such as network responses) to reduce response latency and/or reduce load on an origin server. CDNs can store redacted logs that record portions of requests and responses. CDN caching rules can define matching conditions for a cache hit. An error in the CDN caching rules can cause incorrect content to be served to clients. BRIEF DESCRIPTION OF THE DRAWINGS These and other features, aspects, and advantages are described below with reference to the drawings, which are intended for illustrative purposes and should in no way be interpreted as limiting the scope of the embodiments. Furthermore, various features of different disclosed embodiments can be combined to form additional embodiments, which are part of this disclosure. In the drawings, like reference characters can denote corresponding features throughout similar embodiments. The following is a brief description of each of the drawings. FIG. 1 is a schematic block diagram depicting an environment including a cache validation system 110 that can validate proposed updates to CDN caching rules for a CDN cache. FIG. 2 is a schematic block diagram depicting network messages and state between a client computing device, a control plane, and an origin server referenced in the environment depicted in FIG. 1. FIG. 3 is a schematic block diagram depicting an illustrative general architecture of the cache validation system referenced in the environment depicted in FIG. 1. FIGS. 4A-4B are schematic block diagrams depicting a method for validating a proposed CDN caching rules change. FIG. 5 is a flow chart depicting a method implemented by the cache validation system for validating proposed updates to CDN caching rules for a CDN cache. DETAILED DESCRIPTION As described above, CDN caches apply CDN caching rules to incoming requests. CDN caches can match incoming requests to cache keys in the CDN cache. If there is a hit, a cached response exists and has not expired, then the CDN cache and the CDN can return the cached response. CDN caching rules can be updated over time. For example, a CDN operator can push an update to a caching rule. As described herein, if there is an error in the CDN caching rules, then incorrect content can be served to clients. Such errors may be deployed and can be difficult to detect before deployment with existing approaches. A service can store logs that record portions of requests and responses received by the CDN. The logs are typically redacted (such as by not recording all the request parameters) to preserve confidentiality. From reviewing the redacted CDN logs, it can be technically challenging (or even impossible) for a CDN operator to determine if a change to CDN caching rules resulted in an undesirable change in how responses are being cached. Generally described, aspects of the present disclosure are directed to systems and methods for testing proposed updates to CDN caching rules before such changes are deployed. As described herein, a CDN caching rule can define matching conditions (such as matching on headers, cookies, query strings, etc.) for a cache hit. A cache validation system can receive CDN caching rules and/or request logs. The cache validation system can generate test requests from the retrieved CDN caching rules and the request logs. The cache validation system can determine one or more cache validation indicators, such as, but not limited to, a hit-to-miss value, from the test requests and the CDN caching rules before application of a proposed change to a CDN caching rule. The cache validation system can apply the proposed change to the CDN caching rules in a testing environment. The cache validation system can determine one or more updated cache validation indicators, such as, but not limited to, a hit-to-miss value, from the test requests for the CDN caching rules after application of the proposed change. If the initial and updated cache validation indicator(s) satisfy a threshold, then the cache validation system can provide a notification. For example, a CDN operator can receive the notification and be warned that a proposed change may result in an undesirable change in how requests are cached. The CDN operator can review the notification and decide whether to approve or reject the proposed CDN caching rules change. The approval or rejection can cause the CDN caching rules change to be deployed or to not be deployed, respectively, to a CDN. As used herein, the term “CDN caching rule” can refer to a cache configuration th