--- 1/draft-ietf-cdni-control-triggers-13.txt 2016-05-16 09:15:58.697647998 -0700 +++ 2/draft-ietf-cdni-control-triggers-14.txt 2016-05-16 09:15:58.773649892 -0700 @@ -1,18 +1,18 @@ Network Working Group R. Murray Internet-Draft B. Niven-Jenkins Intended status: Standards Track Nokia -Expires: October 19, 2016 April 17, 2016 +Expires: November 17, 2016 May 16, 2016 CDNI Control Interface / Triggers - draft-ietf-cdni-control-triggers-13 + draft-ietf-cdni-control-triggers-14 Abstract This document describes the part of the CDN Interconnection Control Interface that allows a CDN to trigger activity in an interconnected CDN that is configured to deliver content on its behalf. The upstream CDN can use this mechanism to request that the downstream CDN pre-positions metadata or content, or that it invalidates or purges metadata or content. The upstream CDN can monitor the status of activity that it has triggered in the downstream CDN. @@ -31,21 +31,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on October 19, 2016. + This Internet-Draft will expire on November 17, 2016. Copyright Notice Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -55,72 +55,74 @@ the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 2. Model for CDNI Triggers . . . . . . . . . . . . . . . . . . . 4 2.1. Timing of Triggered Activity . . . . . . . . . . . . . . 6 2.2. Scope of Triggered Activity . . . . . . . . . . . . . . . 6 - 2.2.1. Multiple Interconnected CDNs . . . . . . . . . . . . 6 + 2.2.1. Multiple Interconnected CDNs . . . . . . . . . . . . 7 2.3. Trigger Results . . . . . . . . . . . . . . . . . . . . . 8 3. Collections of Trigger Status Resources . . . . . . . . . . . 8 4. CDNI Trigger Interface . . . . . . . . . . . . . . . . . . . 9 4.1. Creating Triggers . . . . . . . . . . . . . . . . . . . . 10 4.2. Checking Status . . . . . . . . . . . . . . . . . . . . . 11 - 4.2.1. Polling Trigger Status Resource collections . . . . . 11 + 4.2.1. Polling Trigger Status Resource collections . . . . . 12 4.2.2. Polling Trigger Status Resources . . . . . . . . . . 12 4.3. Cancelling Triggers . . . . . . . . . . . . . . . . . . . 12 4.4. Deleting Triggers . . . . . . . . . . . . . . . . . . . . 13 - 4.5. Expiry of Trigger Status Resources . . . . . . . . . . . 13 + 4.5. Expiry of Trigger Status Resources . . . . . . . . . . . 14 4.6. Loop Detection and Prevention . . . . . . . . . . . . . . 14 - 4.7. Error Handling . . . . . . . . . . . . . . . . . . . . . 14 - 4.8. Content URLs . . . . . . . . . . . . . . . . . . . . . . 15 + 4.7. Error Handling . . . . . . . . . . . . . . . . . . . . . 15 + 4.8. Content URLs . . . . . . . . . . . . . . . . . . . . . . 16 5. CI/T Object Properties and Encoding . . . . . . . . . . . . . 16 5.1. CI/T Objects . . . . . . . . . . . . . . . . . . . . . . 16 5.1.1. CI/T Commands . . . . . . . . . . . . . . . . . . . . 16 5.1.2. Trigger Status Resource . . . . . . . . . . . . . . . 17 - 5.1.3. Trigger Collection . . . . . . . . . . . . . . . . . 18 + 5.1.3. Trigger Collection . . . . . . . . . . . . . . . . . 19 5.2. Properties of CI/T Objects . . . . . . . . . . . . . . . 20 5.2.1. Trigger Specification . . . . . . . . . . . . . . . . 20 5.2.2. Trigger Type . . . . . . . . . . . . . . . . . . . . 21 5.2.3. Trigger Status . . . . . . . . . . . . . . . . . . . 22 - 5.2.4. PatternMatch . . . . . . . . . . . . . . . . . . . . 22 - 5.2.5. Absolute Time . . . . . . . . . . . . . . . . . . . . 23 + 5.2.4. PatternMatch . . . . . . . . . . . . . . . . . . . . 23 + 5.2.5. Absolute Time . . . . . . . . . . . . . . . . . . . . 24 5.2.6. Error Description . . . . . . . . . . . . . . . . . . 24 - 5.2.7. Error Code . . . . . . . . . . . . . . . . . . . . . 24 - 6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 25 - 6.1. Creating Triggers . . . . . . . . . . . . . . . . . . . . 25 - 6.1.1. Preposition . . . . . . . . . . . . . . . . . . . . . 25 - 6.1.2. Invalidate . . . . . . . . . . . . . . . . . . . . . 27 + 5.2.7. Error Code . . . . . . . . . . . . . . . . . . . . . 25 + 6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 26 + 6.1. Creating Triggers . . . . . . . . . . . . . . . . . . . . 26 + 6.1.1. Preposition . . . . . . . . . . . . . . . . . . . . . 26 + 6.1.2. Invalidate . . . . . . . . . . . . . . . . . . . . . 28 - 6.2. Examining Trigger Status . . . . . . . . . . . . . . . . 28 - 6.2.1. Collection of All Triggers . . . . . . . . . . . . . 28 - 6.2.2. Filtered Collections of Trigger Status Resources . . 29 - 6.2.3. Individual Trigger Status Resources . . . . . . . . . 31 - 6.2.4. Polling for Change . . . . . . . . . . . . . . . . . 33 - 6.2.5. Deleting Trigger Status Resources . . . . . . . . . . 36 - 6.2.6. Error Reporting . . . . . . . . . . . . . . . . . . . 37 - 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38 - 7.1. CDNI Payload Type Parameter Registrations . . . . . . . . 38 - 8. Security Considerations . . . . . . . . . . . . . . . . . . . 39 + 6.2. Examining Trigger Status . . . . . . . . . . . . . . . . 29 + 6.2.1. Collection of All Triggers . . . . . . . . . . . . . 29 + 6.2.2. Filtered Collections of Trigger Status Resources . . 30 + 6.2.3. Individual Trigger Status Resources . . . . . . . . . 32 + 6.2.4. Polling for Change . . . . . . . . . . . . . . . . . 34 + 6.2.5. Deleting Trigger Status Resources . . . . . . . . . . 37 + 6.2.6. Error Reporting . . . . . . . . . . . . . . . . . . . 38 + 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 39 + 7.1. CDNI Payload Type Parameter Registrations . . . . . . . . 40 + 7.2. CDNI CI/T Trigger Types Registry . . . . . . . . . . . . 40 + 7.3. CDNI CI/T Error Codes Registry . . . . . . . . . . . . . 40 + 8. Security Considerations . . . . . . . . . . . . . . . . . . . 41 8.1. Authentication, Authorization, Confidentiality, Integrity - Protection . . . . . . . . . . . . . . . . . . . . . . . 40 - 8.2. Denial of Service . . . . . . . . . . . . . . . . . . . . 41 - 8.3. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 41 - 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 41 - 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 41 - 10.1. Normative References . . . . . . . . . . . . . . . . . . 41 - 10.2. Informative References . . . . . . . . . . . . . . . . . 42 - Appendix A. Formalization of the JSON Data . . . . . . . . . . . 43 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44 + Protection . . . . . . . . . . . . . . . . . . . . . . . 41 + 8.2. Denial of Service . . . . . . . . . . . . . . . . . . . . 42 + 8.3. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 43 + 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 43 + 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 + 10.1. Normative References . . . . . . . . . . . . . . . . . . 43 + 10.2. Informative References . . . . . . . . . . . . . . . . . 44 + Appendix A. Formalization of the JSON Data . . . . . . . . . . . 45 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 46 1. Introduction [RFC6707] introduces the problem scope for CDN Interconnection (CDNI) and lists the four categories of interfaces that may be used to compose a CDNI solution (Control, Metadata, Request Routing, Logging). [RFC7336] expands on the information provided in [RFC6707] and describes each of the interfaces and the relationships between them @@ -165,20 +167,24 @@ uCDN, or content from any origin including the uCDN. o invalidate - used to instruct the dCDN to revalidate specific metadata or content before re-using it. o purge - used to instruct the dCDN to delete specific metadata or content. The CI/T interface is a web service offered by the dCDN. It allows CI/T commands to be issued, and triggered activity to be tracked. + The CI/T interface builds on top of HTTP/1.1 [RFC7230]. References + to URL in this document relate to http/https URIs, as defined in + [RFC7230] section 2.7. + When the dCDN accepts a CI/T Command it creates a resource describing status of the triggered activity, a Trigger Status Resource. The uCDN can poll Trigger Status Resources to monitor progress. The dCDN maintains at least one collection of Trigger Status Resources for each uCDN. Each uCDN only has access to its own collections, the locations of which are shared when CDN interconnection is established. To trigger activity in the dCDN, the uCDN POSTs a CI/T Command to the @@ -460,31 +466,32 @@ have status code 201 and MUST convey the URI of the Trigger Status Resource in the Location header field. The HTTP response SHOULD include the content of the newly created Trigger Status Resource. This is particularly important in cases where the CI/T Trigger Command has completed immediately. Once a Trigger Status Resource has been created the dCDN MUST NOT re- use its URI, even after that Trigger Status Resource has been removed. - The dCDN SHOULD track and report on progress of CI/T Trigger - Commands. If the dCDN is not able to do that, it MUST indicate that - it has accepted the request but will not be providing further status - updates. To do this, it sets the status of the Trigger Status - Resource to "processed". In this case, CI/T processing should - continue as for a "complete" request, so the Trigger Status Resource - MUST be added to the dCDN's collection of Complete Trigger Status - Resources. The dCDN SHOULD also provide an estimated completion time - for the request, by using the "etime" property of the Trigger Status - Resource. This will allow the uCDN to schedule prepositioning after - an earlier delete of the same URLs is expected to have finished. + The dCDN SHOULD track and report on progress of CI/T Trigger Commands + using a Trigger Status Resource, Section 5.1.2. If the dCDN is not + able to do that, it MUST indicate that it has accepted the request + but will not be providing further status updates. To do this, it + sets the status of the Trigger Status Resource to "processed". In + this case, CI/T processing should continue as for a "complete" + request, so the Trigger Status Resource MUST be added to the dCDN's + collection of Complete Trigger Status Resources. The dCDN SHOULD + also provide an estimated completion time for the request, by using + the "etime" property of the Trigger Status Resource. This will allow + the uCDN to schedule prepositioning after an earlier delete of the + same URLs is expected to have finished. If the dCDN is able to track the execution of CI/T Commands and a CI/ T Command is queued by the dCDN for later action, the status property of the Trigger Status Resource MUST be "pending". Once processing has started the "status" MUST be "active". Finally, once the CI/T Command is complete, the status MUST be set to "complete" or "failed". A CI/T Trigger Command may result in no activity in the dCDN if, for example, it is an invalidate or purge request for data the dCDN has @@ -643,24 +650,24 @@ Provider ID to uniquely identify itself. In every CI/T Command it originates or cascades, each CDN MUST append an array element containing its CDN Provider ID to a JSON array under an entry named "cdn-path". When receiving CI/T Commands a dCDN MUST check the cdn- path and reject any CI/T Command which already contains its own CDN Provider ID in the cdn-path. Transit CDNs MUST check the cdn-path and not cascade the CI/T Command to dCDNs that are already listed in cdn-path. The CDN Provider Id consists of the two characters "AS" followed by - the CDN Provider's Autonomous System number, then a colon (':') and - an additional qualifier that is used to guarantee uniqueness in case - a particular AS has multiple independent CDNs deployed. For example - "AS64496:0". + the CDN Provider's Autonomous System number [RFC1930], then a colon + (':') and an additional qualifier that is used to guarantee + uniqueness in case a particular AS has multiple independent CDNs + deployed. For example "AS64496:0". If the CDN provider has multiple Autonomous Systems, the same AS number SHOULD be used in all messages from that CDN provider, unless there are multiple distinct CDNs. If the RI interface described in [I-D.ietf-cdni-redirection] is implemented by the dCDN, the CI/T and RI interfaces SHOULD use the same CDN Provider Id. 4.7. Error Handling @@ -710,25 +717,26 @@ that intermediate CDN MUST similarly transform URLs in CI/T Commands it passes to its dCDN. When processing Trigger Specifications, CDNs MUST ignore the URL scheme (http or https) in comparing URLs. For example, for a CI/T invalidate or purge command, content MUST be invalidated or purged regardless of the protocol clients use to request it. 5. CI/T Object Properties and Encoding - CI/T Commands, Trigger Status Resources and Trigger Collections and - their properties are encoded using JSON, as defined in sections - Section 5.1.1, Section 5.2.1, and Section 5.1.2. They MUST use the - MIME Media Type 'application/cdni', with parameter 'ptype' values as - defined below and in Section 7.1. + The CI/T Commands, Trigger Status Resources and Trigger Collections + and their properties defined in this document are encoded using JSON, + as defined in sections Section 5.1.1, Section 5.2.1, and + Section 5.1.2. They MUST use the MIME Media Type 'application/ + cdni+json', with parameter 'ptype' values as defined below and in + Section 7.1. Names in JSON are case sensitive. The names and literal values specified in the present document MUST always use lower-case. JSON types, including 'object', 'array', 'number' and 'string' are defined in [RFC7159]. Unrecognised name/value pairs in JSON objects SHOULD NOT be treated as an error by either the uCDN or dCDN. They SHOULD be ignored in the processing, and passed on by dCDN to any further dCDNs in a @@ -980,21 +987,31 @@ Value: A JSON array of Pattern Match, as defined in Section 5.2.4. Mandatory: No, but at least one of 'metadata.*' or 'content.*' MUST be present and non-empty, and content.patterns MUST NOT be present if the TriggerType is Preposition. 5.2.2. Trigger Type Trigger Type is used in a Trigger Specification to describe trigger - action. It MUST be one of the JSON strings in the following table: + action. + + All trigger types MUST be registered in the IANA CI/T Trigger Types + registry (see Section 7.2). + + A dCDN receiving a request containing a trigger type it does not + recognise or does not support MUST reject the request by creating a + Trigger Status Resource with status to "failed" and the "errors" + array containing an Error Description with error "eunsupported". + + The following trigger types are defined by this document: +-------------+-----------------------------------------------------+ | JSON String | Description | +-------------+-----------------------------------------------------+ | preposition | A request for the dCDN to acquire metadata or | | | content. | | invalidate | A request for the dCDN to invalidate metadata or | | | content. After servicing this request the dCDN will | | | not use the specified data without first re- | | | validating it using, for example, an "If-None- | @@ -1122,40 +1139,50 @@ Description: A human-readable description of the error. Value: A JSON string, the human-readable description. Mandatory: No. 5.2.7. Error Code This type is used by the dCDN to report failures in trigger - processing. + processing. All error codes MUST be registered in the IANA CI/T + Error Codes registry (see Section 7.3). Unknown error codes MUST be + treated as fatal errors, and the request MUST NOT be automatically + retried without modification. - +------------+------------------------------------------------------+ + The following error codes are defined by this document, and MUST be + supported by an implementation of the CI/T interface. + + +--------------+----------------------------------------------------+ | Error Code | Description | - +------------+------------------------------------------------------+ - | emeta | The dCDN was unable to acquire metadata required to | - | | fulfil the request. | + +--------------+----------------------------------------------------+ + | emeta | The dCDN was unable to acquire metadata required | + | | to fulfil the request. | | econtent | The dCDN was unable to acquire content (CT/T | | | preposition commands only). | - | eperm | The uCDN does not have permission to issue the CI/T | - | | Command (for example, the data is owned by another | - | | CDN). | + | eperm | The uCDN does not have permission to issue the | + | | CI/T Command (for example, the data is owned by | + | | another CDN). | | ereject | The dCDN is not willing to fulfil the CI/T Command | - | | (for example, a preposition request for content at a | - | | time when the dCDN would not accept Request Routing | - | | requests from the uCDN). | + | | (for example, a preposition request for content at | + | | a time when the dCDN would not accept Request | + | | Routing requests from the uCDN). | | ecdn | An internal error in the dCDN or one of its | | | downstream CDNs. | | ecancelled | The uCDN cancelled the request. | - +------------+------------------------------------------------------+ + | eunsupported | The Trigger Specification contained a "type" that | + | | is not supported by the dCDN. No action was taken | + | | bythe dCDN other than to create a Trigger Status | + | | Resource in state "failed". | + +--------------+----------------------------------------------------+ 6. Examples The following sections provide examples of different CI/T objects encoded as JSON. Discovery of the triggers interface is out of scope of this document. In an implementation, all CI/T URLs are under the control of the dCDN. The uCDN MUST NOT attempt to ascribe any meaning to individual elements of the path. @@ -1175,51 +1202,51 @@ Note that "metadata.patterns" and "content.patterns" are not allowed in a preposition Trigger Specification. REQUEST: POST /triggers HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* - Content-Type: application/cdni; ptype=ci-trigger-command + Content-Type: application/cdni+json; ptype=ci-trigger-command Content-Length: 352 { "trigger" : { "type": "preposition", "metadata.urls" : [ "https://metadata.example.com/a/b/c" ], "content.urls" : [ "https://www.example.com/a/b/c/1", "https://www.example.com/a/b/c/2", "https://www.example.com/a/b/c/3", "https://www.example.com/a/b/c/4" ] }, "cdn-path" : [ "AS64496:1" ] } RESPONSE: HTTP/1.1 201 Created - Date: Thu, 17 Mar 2016 18:56:38 GMT + Date: Wed, 04 May 2016 08:48:10 GMT Content-Length: 467 - Content-Type: application/cdni; ptype=ci-trigger-status + Content-Type: application/cdni+json; ptype=ci-trigger-status Location: https://dcdn.example.com/triggers/0 Server: example-server/0.1 { - "ctime": 1458240998, - "etime": 1458241006, - "mtime": 1458240998, + "ctime": 1462351690, + "etime": 1462351698, + "mtime": 1462351690, "status": "pending", "trigger": { "content.urls": [ "https://www.example.com/a/b/c/1", "https://www.example.com/a/b/c/2", "https://www.example.com/a/b/c/3", "https://www.example.com/a/b/c/4" ], "metadata.urls": [ "https://metadata.example.com/a/b/c" @@ -1237,21 +1264,21 @@ "https://metadata.example.com/a/b/" using case-insensitive matching, and "https://www.example.com/a/b/" respectively, using case-sensitive matching. REQUEST: POST /triggers HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* - Content-Type: application/cdni; ptype=ci-trigger-command + Content-Type: application/cdni+json; ptype=ci-trigger-command Content-Length: 387 { "trigger" : { "type": "invalidate", "metadata.patterns" : [ { "pattern" : "https://metadata.example.com/a/b/*" } ], @@ -1261,30 +1288,30 @@ "case-sensitive" : true } ] }, "cdn-path" : [ "AS64496:1" ] } RESPONSE: HTTP/1.1 201 Created - Date: Thu, 17 Mar 2016 18:56:39 GMT + Date: Wed, 04 May 2016 08:48:11 GMT Content-Length: 545 - Content-Type: application/cdni; ptype=ci-trigger-status + Content-Type: application/cdni+json; ptype=ci-trigger-status Location: https://dcdn.example.com/triggers/1 Server: example-server/0.1 { - "ctime": 1458240999, - "etime": 1458241007, - "mtime": 1458240999, + "ctime": 1462351691, + "etime": 1462351699, + "mtime": 1462351691, "status": "pending", "trigger": { "content.patterns": [ { "case-sensitive": true, "pattern": "https://www.example.com/a/b/*" } ], "content.urls": [ "https://www.example.com/a/index.html" @@ -1314,26 +1341,26 @@ GET /triggers HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 341 - Expires: Thu, 17 Mar 2016 18:57:39 GMT + Expires: Wed, 04 May 2016 08:49:11 GMT Server: example-server/0.1 ETag: "-936094426920308378" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:39 GMT - Content-Type: application/cdni; ptype=ci-trigger-collection + Date: Wed, 04 May 2016 08:48:11 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-collection { "cdn-id": "AS64496:0", "coll-active": "/triggers/active", "coll-complete": "/triggers/complete", "coll-failed": "/triggers/failed", "coll-pending": "/triggers/pending", "staleresourcetime": 86400, "triggers": [ "https://dcdn.example.com/triggers/0", @@ -1351,26 +1378,26 @@ GET /triggers/pending HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 152 - Expires: Thu, 17 Mar 2016 18:57:39 GMT + Expires: Wed, 04 May 2016 08:49:11 GMT Server: example-server/0.1 ETag: "4331492443626270781" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:39 GMT - Content-Type: application/cdni; ptype=ci-trigger-collection + Date: Wed, 04 May 2016 08:48:11 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-collection { "staleresourcetime": 86400, "triggers": [ "https://dcdn.example.com/triggers/0", "https://dcdn.example.com/triggers/1" ] } At this point, if no other Trigger Status Resources had been created, @@ -1380,26 +1407,26 @@ GET /triggers/complete HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 54 - Expires: Thu, 17 Mar 2016 18:57:39 GMT + Expires: Wed, 04 May 2016 08:49:11 GMT Server: example-server/0.1 ETag: "7958041393922269003" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:39 GMT - Content-Type: application/cdni; ptype=ci-trigger-collection + Date: Wed, 04 May 2016 08:48:11 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-collection { "staleresourcetime": 86400, "triggers": [] } 6.2.3. Individual Trigger Status Resources The Trigger Status Resources can also be examined for detail about individual CI/T Trigger Commands. For example, for the CI/T @@ -1409,31 +1436,31 @@ GET /triggers/0 HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 467 - Expires: Thu, 17 Mar 2016 18:57:38 GMT + Expires: Wed, 04 May 2016 08:49:10 GMT Server: example-server/0.1 - ETag: "-4577812884843999747" + ETag: "6990548174277557683" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:38 GMT - Content-Type: application/cdni; ptype=ci-trigger-status + Date: Wed, 04 May 2016 08:48:10 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-status { - "ctime": 1458240998, - "etime": 1458241006, - "mtime": 1458240998, + "ctime": 1462351690, + "etime": 1462351698, + "mtime": 1462351690, "status": "pending", "trigger": { "content.urls": [ "https://www.example.com/a/b/c/1", "https://www.example.com/a/b/c/2", "https://www.example.com/a/b/c/3", "https://www.example.com/a/b/c/4" ], "metadata.urls": [ "https://metadata.example.com/a/b/c" @@ -1446,31 +1473,31 @@ GET /triggers/1 HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 545 - Expires: Thu, 17 Mar 2016 18:57:39 GMT + Expires: Wed, 04 May 2016 08:49:11 GMT Server: example-server/0.1 - ETag: "7076408296782046945" + ETag: "-554385204989405469" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:39 GMT - Content-Type: application/cdni; ptype=ci-trigger-status + Date: Wed, 04 May 2016 08:48:11 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-status { - "ctime": 1458240999, - "etime": 1458241007, - "mtime": 1458240999, + "ctime": 1462351691, + "etime": 1462351699, + "mtime": 1462351691, "status": "pending", "trigger": { "content.patterns": [ { "case-sensitive": true, "pattern": "https://www.example.com/a/b/*" } ], "content.urls": [ "https://www.example.com/a/index.html" @@ -1495,142 +1522,142 @@ GET /triggers/pending HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* If-None-Match: "4331492443626270781" RESPONSE: HTTP/1.1 304 Not Modified Content-Length: 0 - Expires: Thu, 17 Mar 2016 18:57:39 GMT + Expires: Wed, 04 May 2016 08:49:11 GMT Server: example-server/0.1 ETag: "4331492443626270781" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:39 GMT - Content-Type: application/cdni; ptype=ci-trigger-collection + Date: Wed, 04 May 2016 08:48:11 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-collection REQUEST: GET /triggers/0 HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* - If-None-Match: "-4577812884843999747" + If-None-Match: "6990548174277557683" RESPONSE: HTTP/1.1 304 Not Modified Content-Length: 0 - Expires: Thu, 17 Mar 2016 18:57:38 GMT + Expires: Wed, 04 May 2016 08:49:10 GMT Server: example-server/0.1 - ETag: "-4577812884843999747" + ETag: "6990548174277557683" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:38 GMT - Content-Type: application/cdni; ptype=ci-trigger-status + Date: Wed, 04 May 2016 08:48:10 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-status When the CI/T Trigger Command is complete, the contents of the filtered collections will be updated along with their Entity Tags. For example, when the two example CI/T Trigger Commands are complete, the collections of pending and complete Trigger Status Resources might look like: REQUEST: - GET /triggers/complete HTTP/1.1 + GET /triggers/pending HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 54 - Expires: Thu, 17 Mar 2016 18:57:39 GMT + Expires: Wed, 04 May 2016 08:49:15 GMT Server: example-server/0.1 - ETag: "7958041393922269003" + ETag: "1337503181677633762" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:39 GMT - Content-Type: application/cdni; ptype=ci-trigger-collection + Date: Wed, 04 May 2016 08:48:15 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-collection { "staleresourcetime": 86400, "triggers": [] } REQUEST: GET /triggers/complete HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 152 - Expires: Thu, 17 Mar 2016 18:57:50 GMT + Expires: Wed, 04 May 2016 08:49:22 GMT Server: example-server/0.1 ETag: "4481489539378529796" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:50 GMT - Content-Type: application/cdni; ptype=ci-trigger-collection + Date: Wed, 04 May 2016 08:48:22 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-collection { "staleresourcetime": 86400, "triggers": [ "https://dcdn.example.com/triggers/0", "https://dcdn.example.com/triggers/1" ] } 6.2.5. Deleting Trigger Status Resources The uCDN can delete completed and failed Trigger Status Resources to - reduce the size of the collections. For example, to delete the - "preposition" request from earlier examples: + reduce the size of the collections, as described in Section 4.4. For + example, to delete the "preposition" request from earlier examples: REQUEST: DELETE /triggers/0 HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 204 No Content - Date: Thu, 17 Mar 2016 18:56:50 GMT + Date: Wed, 04 May 2016 08:48:22 GMT Content-Length: 0 Content-Type: text/html; charset=UTF-8 Server: example-server/0.1 This would, for example, cause the collection of completed Trigger Status Resources shown in the example above to be updated to: REQUEST: GET /triggers/complete HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 105 - Expires: Thu, 17 Mar 2016 18:57:50 GMT + Expires: Wed, 04 May 2016 08:49:22 GMT Server: example-server/0.1 ETag: "-6938620031669085677" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:50 GMT - Content-Type: application/cdni; ptype=ci-trigger-collection + Date: Wed, 04 May 2016 08:48:22 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-collection { "staleresourcetime": 86400, "triggers": [ "https://dcdn.example.com/triggers/1" ] } 6.2.6. Error Reporting @@ -1642,68 +1669,99 @@ GET /triggers/2 HTTP/1.1 User-Agent: example-user-agent/0.1 Host: dcdn.example.com Accept: */* RESPONSE: HTTP/1.1 200 OK Content-Length: 486 - Expires: Thu, 17 Mar 2016 18:57:54 GMT + Expires: Wed, 04 May 2016 08:49:26 GMT Server: example-server/0.1 - ETag: "-1916002386108948179" + ETag: "5182824839919043757" Cache-Control: max-age=60 - Date: Thu, 17 Mar 2016 18:56:54 GMT - Content-Type: application/cdni; ptype=ci-trigger-status + Date: Wed, 04 May 2016 08:48:26 GMT + Content-Type: application/cdni+json; ptype=ci-trigger-status { - "ctime": 1458241010, + "ctime": 1462351702, "errors": [ { "content.urls": [ "https://newsite.example.com/index.html" ], "description": "newsite.example.com not in HostIndex", "error": "emeta" } ], - "etime": 1458241018, - "mtime": 1458241014, + "etime": 1462351710, + "mtime": 1462351706, "status": "active", "trigger": { "content.urls": [ "https://newsite.example.com/index.html" ], "type": "preposition" } } 7. IANA Considerations + [RFC Editor Note: Please replace references to [RFCthis] in this + section with this document's RFC number before publication.] + 7.1. CDNI Payload Type Parameter Registrations The IANA is requested to register the following new Payload Types in the CDNI Payload Type Parameter registry defined by [RFC7736], for use with the 'application/cdni' MIME media type. - RFC Editor Note: Please replace references to [RFCthis] below with - this document's RFC number before publication. - +-----------------------+---------------+ | Payload Type | Specification | +-----------------------+---------------+ | ci-trigger-command | [RFCthis] | | ci-trigger-status | [RFCthis] | | ci-trigger-collection | [RFCthis] | +-----------------------+---------------+ +7.2. CDNI CI/T Trigger Types Registry + + The IANA is requested to create a new "CDNI CI/T Trigger Types" + subregistry under the "Content Delivery Networks Interconnection + (CDNI) Parameters" registry. + + Additions to the CDNI CI/T Error Code Registry will be made via "RFC + Required" as defined in [RFC5226]. + + The initial contents of the CDNI CI/T Trigger Types Registry comprise + the names and descriptions listed in section Section 5.2.2 of this + document, with this document acting as the specification. + +7.3. CDNI CI/T Error Codes Registry + + The IANA is requested to create a new "CDNI CI/T Error Codes" + subregistry under the "Content Delivery Networks Interconnection + (CDNI) Parameters" registry. + + Additions to the CDNI CI/T Error Codes Registry will be made via + "Specification Required" as defined in [RFC5226]. The Designated + Expert will verify that new error code registrations do not duplicate + existing error code definitions (in name or functionality), prevent + gratuitous additions to the namespace, and prevent any additions to + the namespace that would impair the interoperability of CDNI + implementations. + + The initial contents of the CDNI CI/T Error Codes Registry comprise + the names and descriptions of the Error Codes listed in Section 5.2.7 + of this document, with this document acting as the specification. + 8. Security Considerations The CI/T interface provides a mechanism to allow a uCDN to generate requests into the dCDN and to inspect its own CI/T requests and their current state. The CI/T interface does not allow access to or modification of the uCDN or dCDN metadata relating to content delivery, or to the content itself. It can only control the presence of that metadata in the dCDN, and the processing work and network utilisation involved in ensuring that presence. @@ -1813,27 +1871,37 @@ The authors thank Kevin Ma for his input, and Carsten Bormann for his review and formalization of the JSON data. 10. References 10.1. Normative References [I-D.ietf-cdni-metadata] Niven-Jenkins, B., Murray, R., Caulfield, M., and K. Ma, "CDN Interconnection Metadata", draft-ietf-cdni- - metadata-15 (work in progress), April 2016. + metadata-16 (work in progress), April 2016. + + [RFC1930] Hawkinson, J. and T. Bates, "Guidelines for creation, + selection, and registration of an Autonomous System (AS)", + BCP 6, RFC 1930, DOI 10.17487/RFC1930, March 1996, + . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. + [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an + IANA Considerations Section in RFCs", BCP 26, RFC 5226, + DOI 10.17487/RFC5226, May 2008, + . + [RFC6707] Niven-Jenkins, B., Le Faucheur, F., and N. Bitar, "Content Distribution Network Interconnection (CDNI) Problem Statement", RFC 6707, September 2012. [RFC7159] Bray, T., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, March 2014. [RFC7230] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, June 2014.