The ALTO Protocol relies upon the ALTO information service framework, which consists of multiple services. All ALTO services are "provided through a common transport protocol; messaging structure and encoding; and transaction model" [
RFC 7285]. The ALTO Protocol specification defines multiple initial services, e.g., the ALTO Network Map Service and Cost Map Service.
This document defines a new ALTO service, called "CDNI Advertisement Service", which conveys JSON [
RFC 8259] objects of media type "application/alto-cdni+json". These JSON objects are used to transport BaseAdvertisementObject objects defined in [
RFC 8008]. This document specifies how to transport such BaseAdvertisementObject objects via the ALTO Protocol with the ALTO CDNI Advertisement Service. Similar to other ALTO services, this document defines the ALTO information resource for the CDNI Advertisement Service as follows.
Note that the encoding of BaseAdvertisementObject reuses the one defined in [
RFC 8008] and therefore also follows the recommendations of I-JSON (Internet JSON) [
RFC 7493], which is required by [
RFC 8008].
The media type of the CDNI Advertisement resource is "application/alto-cdni+json" (see
Section 7).
A CDNI Advertisement resource is requested using the HTTP GET method.
There are no applicable Accept Input parameters.
There are no applicable capabilities.
The "uses" field
MUST NOT appear unless the CDNI Advertisement resource depends on other ALTO information resources. If the CDNI Advertisement resource has dependent resources, the resource IDs of its dependent resources
MUST be included into the "uses" field. This document only defines one potential dependent resource for the CDNI Advertisement resource. See
Section 4 for details of when and how to use it. Future documents may extend the CDNI Advertisement resource and allow other dependent resources.
The "meta" field of a CDNI Advertisement response
MUST include the "vtag" field defined in
Section 10.3 of
RFC 7285. This field provides the version of the retrieved CDNI FCI resource.
If a CDNI Advertisement response depends on other ALTO information resources, it
MUST include the "dependent-vtags" field, whose value is an array to indicate the version tags of the resources used, where each resource is specified in "uses" of its Information Resource Directory (IRD) entry.
The data component of an ALTO CDNI Advertisement response is named "cdni-advertisement", which is a JSON object of type CDNIAdvertisementData:
object {
CDNIAdvertisementData cdni-advertisement;
} InfoResourceCDNIAdvertisement : ResponseEntityBase;
object {
BaseAdvertisementObject capabilities-with-footprints<0..*>;
} CDNIAdvertisementData;
Specifically, a CDNIAdvertisementData object is a JSON object that includes only one property named "capabilities-with-footprints", whose value is an array of BaseAdvertisementObject objects. It provides capabilities with footprint restrictions for the uCDN to decide the dCDN selection. If the value of this property is an empty array, it means the corresponding dCDN cannot provide any mandatory-to-implement CDNI capabilities for any footprints.
The syntax and semantics of BaseAdvertisementObject are well defined in
Section 5.1 of
RFC 8008. A BaseAdvertisementObject object includes multiple properties, including "capability-type", "capability-value", and "footprints", where "footprints" are defined in
Section 4.2.2.2 of
RFC 8006.
An equivalent specification in the ALTO-style notation (see
Section 8.2 of
RFC 7285) creates a self-contained description of the BaseAdvertisementObject. As mentioned above, the normative specification of BaseAdvertisementObject is in [
RFC 8008].
object {
JSONString capability-type;
JSONValue capability-value;
Footprint footprints<0..*>;
} BaseAdvertisementObject;
object {
JSONString footprint-type;
JSONString footprint-value<1..*>;
} Footprint;
For each BaseAdvertisementObject, the ALTO client
MUST interpret "footprints" appearing multiple times as if they appeared only once. If "footprints" in a BaseAdvertisementObject is null or empty or does not appear, the ALTO client
MUST understand that the capabilities in this BaseAdvertisementObject have the "global" coverage, i.e., the corresponding dCDN can provide them for any Request Routing source.
Note: Further optimization of BaseAdvertisementObjects to effectively provide the advertisement of capabilities with footprint restrictions is certainly possible. For example, these two examples below both describe that the dCDN can provide capabilities ["http/1.1", "https/1.1"] for the same footprints. However, the latter one is smaller in its size.
EXAMPLE 1
{
"meta": {...},
"cdni-advertisement": {
"capabilities-with-footprints": [
{
"capability-type": "FCI.DeliveryProtocol",
"capability-value": {
"delivery-protocols": [
"http/1.1"
]
},
"footprints": [
<Footprint objects>
]
},
{
"capability-type": "FCI.DeliveryProtocol",
"capability-value": {
"delivery-protocols": [
"https/1.1"
]
},
"footprints": [
<Footprint objects>
]
}
]
}
}
EXAMPLE 2
{
"meta": {...},
"cdni-advertisement": {
"capabilities-with-footprints": [
{
"capability-type": "FCI.DeliveryProtocol",
"capability-value": {
"delivery-protocols": [
"https/1.1",
"http/1.1"
]
},
"footprints": [
<Footprint objects>
]
}
]
}
}
Since such optimizations are not required for the basic interconnection of CDNs, the specifics of such mechanisms are outside the scope of this document.
This document only requires the ALTO server to provide the initial FCI-specific CDNI Payload Types defined in [
RFC 8008] as the mandatory-to-implement CDNI capabilities.
Below is the IRD of a simple, example ALTO server. The server provides both base ALTO information resources (e.g., network maps) and CDNI FCI-related information resources (e.g., CDNI Advertisement resources), demonstrating a single, integrated environment.
Specifically, the IRD announces nine information resources as follows:
-
two network maps,
-
one CDNI Advertisement resource without dependency,
-
one CDNI Advertisement resource depending on a network map,
-
one filtered CDNI Advertisement resource to be defined in Section 5,
-
one property map including "cdni-capabilities" as its entity property,
-
one filtered property map including "cdni-capabilities" and "pid" as its entity properties, and
-
two update stream services:
-
one for updating CDNI Advertisement resources,
-
one for updating property maps
GET /directory HTTP/1.1
Host: alto.example.com
Accept: application/alto-directory+json,application/alto-error+json
HTTP/1.1 200 OK
Content-Length: 3531
Content-Type: application/alto-directory+json
{
"meta": {
"default-alto-network-map": "my-default-network-map"
},
"resources": {
"my-default-network-map": {
"uri": "https://alto.example.com/networkmap",
"media-type": "application/alto-networkmap+json"
},
"my-eu-netmap": {
"uri": "https://alto.example.com/myeunetmap",
"media-type": "application/alto-networkmap+json"
},
"my-default-cdnifci": {
"uri": "https://alto.example.com/cdnifci",
"media-type": "application/alto-cdni+json"
},
"my-cdnifci-with-pid-footprints": {
"uri": "https://alto.example.com/networkcdnifci",
"media-type": "application/alto-cdni+json",
"uses": [ "my-eu-netmap" ]
},
"my-filtered-cdnifci": {
"uri": "https://alto.example.com/cdnifci/filtered",
"media-type": "application/alto-cdni+json",
"accepts": "application/alto-cdnifilter+json"
},
"cdnifci-property-map": {
"uri": "https://alto.example.com/propmap/full/cdnifci",
"media-type": "application/alto-propmap+json",
"uses": [ "my-default-cdni" ],
"capabilities": {
"mappings": {
"ipv4": [ "my-default-cdni.cdni-capabilities" ],
"ipv6": [ "my-default-cdni.cdni-capabilities" ],
"countrycode": [
"my-default-cdni.cdni-capabilities" ],
"asn": [ "my-default-cdni.cdni-capabilities" ]
}
}
},
"filtered-cdnifci-property-map": {
"uri": "https://alto.example.com/propmap/lookup/cdnifci-pid",
"media-type": "application/alto-propmap+json",
"accepts": "application/alto-propmapparams+json",
"uses": [ "my-default-cdni", "my-default-network-map" ],
"capabilities": {
"mappings": {
"ipv4": [ "my-default-cdni.cdni-capabilities",
"my-default-network-map.pid" ],
"ipv6": [ "my-default-cdni.cdni-capabilities",
"my-default-network-map.pid" ],
"countrycode": [
"my-default-cdni.cdni-capabilities" ],
"asn": [ "my-default-cdni.cdni-capabilities" ]
}
}
},
"update-my-cdni-fci": {
"uri": "https://alto.example.com/updates/cdnifci",
"media-type": "text/event-stream",
"accepts": "application/alto-updatestreamparams+json",
"uses": [
"my-default-network-map",
"my-eu-netmap",
"my-default-cdnifci",
"my-filtered-cdnifci",
"my-cdnifci-with-pid-footprints"
],
"capabilities": {
"incremental-change-media-types": {
"my-default-network-map": "application/json-patch+json",
"my-eu-netmap": "application/json-patch+json",
"my-default-cdnifci":
"application/merge-patch+json,application/json-patch+json",
"my-filtered-cdnifci":
"application/merge-patch+json,application/json-patch+json",
"my-cdnifci-with-pid-footprints":
"application/merge-patch+json,application/json-patch+json"
}
}
},
"update-my-props": {
"uri": "https://alto.example.com/updates/properties",
"media-type": "text/event-stream",
"uses": [
"cdnifci-property-map",
"filtered-cdnifci-property-map"
],
"capabilities": {
"incremental-change-media-types": {
"cdnifci-property-map":
"application/merge-patch+json,application/json-patch+json",
"filtered-cdnifci-property-map":
"application/merge-patch+json,application/json-patch+json"
}
}
}
}
}
This basic example demonstrates a simple CDNI Advertisement resource, which does not depend on other resources. There are three BaseAdvertisementObjects in this resource and these objects' capabilities are "http/1.1" delivery protocol, ["http/1.1", "https/1.1"] delivery protocol, and "https/1.1" acquisition protocol, respectively.
GET /cdnifci HTTP/1.1
Host: alto.example.com
Accept: application/alto-cdni+json,application/alto-error+json
HTTP/1.1 200 OK
Content-Length: 1411
Content-Type: application/alto-cdni+json
{
"meta": {
"vtag": {
"resource-id": "my-default-cdnifci",
"tag": "da65eca2eb7a10ce8b059740b0b2e3f8eb1d4785"
}
},
"cdni-advertisement": {
"capabilities-with-footprints": [
{
"capability-type": "FCI.DeliveryProtocol",
"capability-value": {
"delivery-protocols": [
"http/1.1"
]
},
"footprints": [
{
"footprint-type": "ipv4cidr",
"footprint-value": [ "192.0.2.0/24" ]
},
{
"footprint-type": "ipv6cidr",
"footprint-value": [ "2001:db8::/32" ]
}
]
},
{
"capability-type": "FCI.DeliveryProtocol",
"capability-value": {
"delivery-protocols": [
"https/1.1",
"http/1.1"
]
},
"footprints": [
{
"footprint-type": "ipv4cidr",
"footprint-value": [ "198.51.100.0/24" ]
}
]
},
{
"capability-type": "FCI.AcquisitionProtocol",
"capability-value": {
"acquisition-protocols": [
"https/1.1"
]
},
"footprints": [
{
"footprint-type": "ipv4cidr",
"footprint-value": [ "203.0.113.0/24" ]
}
]
}
]
}
}
A benefit of using ALTO to provide CDNI Advertisement resources is that such resources can be updated using ALTO incremental updates [
RFC 8895]. Below is an example that also shows the benefit of having both JSON merge patch and JSON patch to encode updates.
At first, an ALTO client requests updates for "my-default-cdnifci", and the ALTO server returns the "control-uri" followed by the full CDNI Advertisement response. Then when there is a change in the "delivery-protocols" in that "http/1.1" is removed (from ["http/1.1", "https/1.1"] to only "https/1.1") due to maintenance of the "http/1.1" clusters, the ALTO server regenerates the new CDNI Advertisement resource and pushes the full replacement to the ALTO client. Later on, the ALTO server notifies the ALTO client that "192.0.2.0/24" is added into the "ipv4" footprint object for delivery protocol "https/1.1" by sending the change encoded by JSON patch to the ALTO client.
POST /updates/cdnifci HTTP/1.1
Host: alto.example.com
Accept: text/event-stream,application/alto-error+json
Content-Type: application/alto-updatestreamparams+json
Content-Length: 94
{
"add": {
"my-cdnifci-stream": {
"resource-id": "my-default-cdnifci"
}
}
}
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: text/event-stream
event: application/alto-updatestreamcontrol+json
data: {"control-uri":
data: "https://alto.example.com/updates/streams/3141592653589"}
event: application/alto-cdni+json,my-cdnifci-stream
data: { ... full CDNI Advertisement resource ... }
event: application/alto-cdni+json,my-cdnifci-stream
data: {
data: "meta": {
data: "vtag": {
data: "tag": "dasdfa10ce8b059740bddsfasd8eb1d47853716"
data: }
data: },
data: "cdni-advertisement": {
data: "capabilities-with-footprints": [
data: {
data: "capability-type": "FCI.DeliveryProtocol",
data: "capability-value": {
data: "delivery-protocols": [
data: "https/1.1"
data: ]
data: },
data: "footprints": [
data: { "footprint-type": "ipv4cidr",
data: "footprint-value": [ "203.0.113.0/24" ]
data: }
data: ]
data: },
data: { ... other CDNI advertisement object ... }
data: ]
data: }
data: }
event: application/json-patch+json,my-cdnifci-stream
data: [
data: { "op": "replace",
data: "path": "/meta/vtag/tag",
data: "value": "a10ce8b059740b0b2e3f8eb1d4785acd42231bfe"
data: },
data: { "op": "add",
data: "path": "/cdni-advertisement/capabilities-with-footprints
/0/footprints/0/footprint-value/-",
data: "value": "192.0.2.0/24"
data: }
data: ]