Iterative CDNI Request Redirection is defined in
Section 1.1 of
RFC 7336 and elaborated by examples in Sections
3.2 and
3.4 of [
RFC 7336]. A Redirection Target (RT) is defined in
Section 2 of
RFC 7975 for Recursive Request Redirection as:
The endpoint to which the User Agent is redirected. In CDNI, an RT may point to a number of different components, some examples include a surrogate in the same CDN as the request router, a request router in a dCDN, or a surrogate in a dCDN.
In this document, we adopt the same definition of the RT for the Iterative Request Redirect use case. This use case requires the provisioning of the RT address to be used by the uCDN in order to redirect to the dCDN. RT addresses can vary between different footprints (for example, between different regions), and they may also change over time (for example, as a result of network problems). Given this variable and dynamic nature of the redirect target address, it may not be suitable to advertise it during bootstrap. A more dynamic and footprint-oriented interface is required.
Section 4.3 of
RFC 7336 suggests that it could be one of the roles of the FCI [
RFC 8008]. Following this suggestion, we have therefore chosen to use the CDNI Footprint & Capabilities Advertisement interface for redirect target address advertisement.
Use cases:
-
Footprint: The dCDN may want to have a different target per footprint. Note that a dCDN may spread across multiple geographies. This makes it easier to route client requests to a nearby request router. Though this can be achieved using a single canonical name and "Geo DNS", such that in different geographies the same hostname is resolved to different IP address, that approach has limitations; for example, a client may be using a third-party DNS resolver, making it impossible for the redirector to detect where the client is located, or Geo DNS granularity may be too rough for the requirement of the application.
-
Scaling: The dCDN may choose to scale its Request Routing service by deploying more request routers in new locations and advertise them via an updatable interface like the FCI.
The Redirect Target capability object is used to indicate the target address the uCDN should use in order to redirect a client to the dCDN. A target may be attached to a specific uCDN host, attached to a list of uCDN hosts, or used globally for all the hosts of the uCDN.
When a dCDN is attaching the redirect target to a specific uCDN host or a list of uCDN hosts, the dCDN
MUST advertise the hosts within the Redirect Target capability object as "redirecting-hosts". In this case, the uCDN can redirect to that dCDN address, only if the User Agent request was to one of these uCDN hosts.
If the Redirect Target capability object does not contain a target or the target is empty, the uCDN
MUST interpret it as "no target available for these uCDN hosts for the specified footprint". In case such a target was already advertised in a previous FCI object, the uCDN
MUST interpret it as an update that deletes the previous redirect target.
A redirect target for DNS redirection is an FQDN used as an alias in a CNAME record response (see [
RFC 1034]) of the uCDN DNS router. Note that DNS routers make routing decisions based on either the DNS resolver's IP address or the client IP subnet when EDNS0 client-subnet (ECS) is used (see [
RFC 7871]). The dCDN may choose to advertise redirect targets and footprints to cover both cases, such that the uCDN resolution would route the DNS query to different dCDN CNAMEs according to client subnet or dCDN resolver IP address. This method further allows the dCDN DNS to optimize the resolution by localizing the target CNAMEs. A uCDN implementation
SHOULD prefer routing based on client IP subnet when the ECS option is present. A dCDN implementation using the ECS option
MUST be aware of the privacy drawbacks listed in
Section 2 of
RFC 7871 and
SHOULD follow the guidelines provided in
Section 11.1 of
RFC 7871.
A redirect target for HTTP redirection is the URI to be used as the value for the Location header of an HTTP redirect 3xx response, typically a 302 (Found) (see
Section 7.1.2 of
RFC 7231 and
Section 6.4 of
RFC 7231).
The Redirect Target capability object consists of the following properties:
-
Property:
-
redirecting-hosts
-
Description:
-
One or more uCDN hosts to which this redirect target is attached. A redirecting host SHOULD be a host that was published in a HostMatch object by the uCDN as defined in Section 4.1.2 of RFC 8006.
-
Type:
-
A list of Endpoint objects (see Section 4.3.3 of RFC 8006)
-
Mandatory-to-Specify:
-
No. If absent or empty, the redirect target applies to all hosts of the redirecting uCDN.
-
Property:
-
dns-target
-
Description:
-
Target CNAME record for DNS redirection.
-
Type:
-
DnsTarget object (see Section 2.4)
-
Mandatory-to-Specify:
-
No. If the dns-target is absent or empty, the uCDN MUST interpret it as "no dns-target available".
-
Property:
-
http-target
-
Description:
-
Target URI for an HTTP redirect.
-
Type:
-
HttpTarget object (see Section 2.5)
-
Mandatory-to-Specify:
-
No. If the http-target is absent or empty, the uCDN MUST interpret it as "no http-target available".
The following is an example of a Redirect Target capability object serialization that advertises a dCDN target address that is attached to a specific list of uCDN "redirecting-hosts". A uCDN host that is included in that list can redirect to the advertised dCDN redirect target. The capabilities object is serialized as a JSON object as defined in
Section 5.1 of
RFC 8008.
{
"capabilities": [
{
"capability-type": "FCI.RedirectTarget",
"capability-value": {
"redirecting-hosts": [
"a.service123.ucdn.example.com",
"b.service123.ucdn.example.com"
],
"dns-target": {
"host": "service123.ucdn.dcdn.example.com"
},
"http-target": {
"host": "us-east1.dcdn.example.com",
"path-prefix": "/cache/1/",
"include-redirecting-host": true
}
},
"footprints": [
<Footprint objects>
]
}
]
}
The DnsTarget object gives the target address for the DNS response to delegate from the uCDN to the dCDN.
-
Property:
-
host
-
Description:
-
The host property is a hostname or an IP address, without a port number.
-
Type:
-
Endpoint object as defined in Section 4.3.3 of RFC 8006, with the limitation that it SHOULD NOT include a port number and, in case a port number is present, the uCDN MUST ignore it.
-
Mandatory-to-Specify:
-
Yes.
The following is an example of the DnsTarget object:
{
"host": "service123.ucdn.dcdn.example.com"
}
The following is an example of a DNS query for uCDN address "a.service123.ucdn.example.com" and the corresponding CNAME redirection response:
Query:
a.service123.ucdn.example.com:
type A, class IN
Response:
NAME: a.service123.ucdn.example.com, TYPE: CNAME, CLASS: IN,
TTL: 120, RDATA: service123.ucdn.dcdn.example.com
The HttpTarget object gives the necessary information to construct the target Location URI for HTTP redirection.
-
Property:
-
host
-
Description:
-
Hostname or IP address and an optional port, i.e., the host and port of the authority component of the URI as described in Section 3.2 of RFC 3986.
-
Type:
-
Endpoint object as defined in Section 4.3.3 of RFC 8006.
-
Mandatory-to-Specify:
-
Yes.
-
Property:
-
scheme
-
Description:
-
A URI scheme to be used in the redirect response location construction. When present, the uCDN MUST use the provided scheme in for HTTP redirection to the dCDN.
-
Type:
-
A URI scheme as defined in Section 3.1 of RFC 3986, represented as a JSON string. The scheme MUST be either "http" or "https".
-
Mandatory-to-Specify:
-
No. If this property is absent or empty, the uCDN request router MUST use the same scheme as was used in the original request before redirection.
-
Property:
-
path-prefix
-
Description:
-
A path prefix for the HTTP redirect Location header. The original path is appended after this prefix.
-
Type:
-
A prefix of a path-absolute as defined in Section 3.3 of RFC 3986. The prefix MUST end with a trailing slash to indicate the end of the last path segment in the prefix.
-
Mandatory-to-Specify:
-
No. If this property is absent or empty, the uCDN MUST NOT prepend a path-prefix to the original content path, i.e., the original path MUST appear in the Location URI right after the authority component.
-
Property:
-
include-redirecting-host
-
Description:
-
A flag indicating whether or not to include the redirecting host as the first path segment after the path-prefix. If set to true and a "path-prefix" is used, the uCDN redirecting host MUST be added as a separate path segment after the path-prefix and before the original URL path. If set to true and there is no path-prefix, the uCDN redirecting host MUST be prepended as the first path segment in the redirect URL.
-
Type:
-
Boolean.
-
Mandatory-to-Specify:
-
No. Default value is False.
The following is an example of the HttpTarget object with a "scheme", a "path-prefix", and "include-redirecting-host" properties:
{
"host": "us-east1.dcdn.example.com",
"scheme": "https",
"path-prefix": "/cache/1/",
"include-redirecting-host": true
}
The following is an example of an HTTP request for content at uCDN host "a.service123.ucdn.example.com" and the corresponding HTTP response with a Location header, used for redirecting the client to the dCDN, constructed according to the HttpTarget object from the above example:
Request:
GET /vod/1/movie.mp4 HTTP/1.1
Host: a.service123.ucdn.example.com
Response:
HTTP/1.1 302 Found
Location: https://us-east1.dcdn.example.com/cache/1/
a.service123.ucdn.example.com/vod/1/movie.mp4
Before requests can be routed from the uCDN to the dCDN, the CDNs must exchange service configurations between them. Using the MI, the uCDN advertises out-of-band its hosts to the dCDN; each host is designated by a hostname and has its own specific metadata (see
Section 4.1.2 of
RFC 8006). Using the FCI, the dCDN advertises (also out-of-band) the redirect target address defined in
Section 2.3 for the relevant uCDN hosts. The following is a generalized example of the message flow between a uCDN and a dCDN. For simplicity, we focus on the sequence of messages between the uCDN and dCDN and not on how they are passed.
dCDN uCDN
+ +
| |
(1) | MI: host: s123.ucdn.example.com |
| host-metadata: < metadata > |
<-------------------------------------------------------+
| |
(2) | FCI: capability-type: FCI.RedirectTarget |
| redirecting-hosts: s123.ucdn.example.com |
| target host: us-east1.dcdn.example.com |
+------------------------------------------------------->
| |
| |
+ +
Explanation:
- (1)
- The uCDN advertises a host (s123.ucdn.example.com) with the host metadata.
- (2)
- The dCDN advertises its FCI objects to the uCDN, including a Redirect Target capability object that contains the redirect target address (us-east1.dcdn.example.com) specified for that uCDN host.
Once the redirect target has been set, the uCDN can start redirecting user requests to the dCDN. The following is a generic sequence of redirection using the host and redirect target that were advertised in
Figure 1.
End User dCDN uCDN RR
+ + +
| | |
(1) | Request sent s123.ucdn.example.com |
+-----------------------+----------------------->
| | |
(2) | Redirect to us-east1.dcdn.example.com |
<-----------------------+-----------------------+
| | |
(3) | Request us-east1.dcdn.example.com |
+-----------------------> |
| | |
(4) | Response | |
<-----------------------+ |
| | |
+ + +
Explanation:
- (1)
- The End User sends a request (DNS or HTTP) to the uCDN Request Router (RR).
- (2)
- Using the previously advertised Redirect Target, the uCDN redirects the request to the dCDN.
- (3)
- The End User sends a request to the dCDN.
- (4)
- The dCDN either sends a response or reroutes it, for example, to a dCDN surrogate.