idnits 2.17.1 draft-ietf-alto-cost-calendar-21.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 17, 2020) is 1502 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'I-D.xiang-alto-multidomain-analytics' is defined on line 1593, but no explicit reference was found in the text ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) == Outdated reference: A later version (-22) exists of draft-ietf-alto-incr-update-sse-20 -- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE.754.2008' -- Obsolete informational reference (is this intentional?): RFC 2818 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7159 (Obsoleted by RFC 8259) == Outdated reference: A later version (-28) exists of draft-ietf-alto-performance-metrics-09 == Outdated reference: A later version (-06) exists of draft-xiang-alto-multidomain-analytics-03 Summary: 2 errors (**), 0 flaws (~~), 5 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group S. Randriamasy 3 Internet-Draft Nokia Bell Labs 4 Intended status: Standards Track R. Yang 5 Expires: September 18, 2020 Yale University 6 Q. Wu 7 Huawei 8 L. Deng 9 China Mobile 10 N. Schwan 11 Thales Deutschland 12 March 17, 2020 14 Application-Layer Traffic Optimization (ALTO) Cost Calendar 15 draft-ietf-alto-cost-calendar-21 17 Abstract 19 This document is an extension to the base Application-Layer Traffic 20 Optimization (ALTO) protocol. It extends the ALTO cost information 21 service so that applications decide not only 'where' to connect, but 22 also 'when'. This is useful for applications that need to perform 23 bulk data transfer and would like to schedule these transfers during 24 an off-peak hour, for example. This extension introduces ALTO Cost 25 Calendar, with which an ALTO Server exposes ALTO cost values in JSON 26 arrays where each value corresponds to a given time interval. The 27 time intervals as well as other Calendar attributes, are specified in 28 the Information Resources Directory and ALTO Server responses. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at https://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on September 18, 2020. 47 Copyright Notice 49 Copyright (c) 2020 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (https://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 65 1.1. Some recent known uses . . . . . . . . . . . . . . . . . 4 66 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 67 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 5 68 3. Overview of ALTO Cost Calendars and terminology . . . . . . . 5 69 3.1. ALTO Cost Calendar overview . . . . . . . . . . . . . . . 6 70 3.2. ALTO Cost Calendar information features . . . . . . . . . 6 71 3.3. ALTO Calendar design characteristics . . . . . . . . . . 7 72 3.3.1. ALTO Cost Calendar for all cost modes . . . . . . . . 9 73 3.3.2. Compatibility with legacy ALTO Clients . . . . . . . 10 74 4. ALTO Calendar specification: IRD extensions . . . . . . . . . 10 75 4.1. Calendar attributes in the IRD resource capabilities . . 11 76 4.2. Calendars in a delegate IRD . . . . . . . . . . . . . . . 12 77 4.3. Example IRD with ALTO Cost Calendars . . . . . . . . . . 13 78 5. ALTO Calendar specification: Service Information Resources . 17 79 5.1. Calendar extensions for Filtered Cost Maps (FCM) . . . . 17 80 5.1.1. Calendar extensions in Filtered Cost Map requests . . 17 81 5.1.2. Calendar extensions in Filtered Cost Map responses . 18 82 5.1.3. Use case and example: FCM with a bandwidth Calendar . 21 83 5.2. Calendar extensions in the Endpoint Cost Service . . . . 23 84 5.2.1. Calendar specific input in Endpoint Cost requests . . 23 85 5.2.2. Calendar attributes in the Endpoint Cost response . . 24 86 5.2.3. Use case and example: ECS with a routingcost Calendar 25 87 5.2.4. Use case and example: ECS with a multi-cost Calendar 88 for routingcost and owdelay . . . . . . . . . . . . . 27 89 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 90 7. Security Considerations . . . . . . . . . . . . . . . . . . . 29 91 8. Operational Considerations . . . . . . . . . . . . . . . . . 31 92 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 32 93 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 94 10.1. Normative References . . . . . . . . . . . . . . . . . . 32 95 10.2. Informative References . . . . . . . . . . . . . . . . . 33 96 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 98 1. Introduction 100 The base Application-Layer Traffic Optimization (ALTO) protocol 101 specified in [RFC7285] provides guidance to overlay applications that 102 need to select one or several hosts from a set of candidates able to 103 provide a desired resource. This guidance is based on parameters 104 that affect performance and efficiency of the data transmission 105 between the hosts such as the topological distance. The goal of ALTO 106 is to improve the Quality of Experience (QoE) in the application 107 while optimizing resource usage in the underlying network 108 infrastructure. 110 The ALTO protocol in [RFC7285] specifies a network map which defines 111 groupings of endpoints in provider-defined network regions identified 112 by Provider-defined Identifiers (PIDs). The Cost Map Service, 113 Endpoint Cost Service (ECS) and Endpoint Ranking Service then provide 114 ISP-defined costs and rankings for connections among the specified 115 endpoints and PIDs and thus incentives for application clients to 116 connect to ISP preferred locations, for instance, to reduce their 117 costs. For the reasons outlined in the ALTO problem statement 118 [RFC5693] and requirement AR-14 of [RFC6708], ALTO does not 119 disseminate network metrics that change frequently. In a network, 120 the costs can fluctuate for many reasons having to do with 121 instantaneous traffic load or due to diurnal patterns of traffic 122 demand or planned events such as network maintenance, holidays or 123 highly publicized events. Thus, an ALTO application wishing to use 124 the Cost Map and Endpoint Cost Service at some future time will have 125 to estimate the state of the network at that time, a process that is, 126 at best, fragile and brittle since the application does not have any 127 visibility into the state of the network. Providing network costs 128 for only the current time thus may not be sufficient, in particular 129 for applications that can schedule their traffic in a span of time, 130 for example by deferring backups or other background traffic to off- 131 peak hours. 133 In case the ALTO Cost value changes are predictable over a certain 134 period of time and the application does not require immediate data 135 transfer, it can save time to get the whole set of cost values over 136 this period in one single ALTO response. Using this set to schedule 137 data transfers allows optimizing the network resources usage and QoE. 138 ALTO Clients and Servers can also minimize their workload by reducing 139 and accordingly scheduling their data exchanges. 141 This document extends [RFC7285] to allow an ALTO Server to provide 142 network costs for a given duration of time. A sequence of network 143 costs across a time span for a given pair of network locations is 144 named an "ALTO Cost Calendar". The Filtered Cost Map Service and 145 Endpoint Cost Service are extended to provide Cost Calendars. In 146 addition to this functional ALTO enhancement, we expect to further 147 save network and storage resources by gathering multiple Cost Values 148 for one cost type into one single ALTO Server response. 150 In this document, an "ALTO Cost Calendar" is specified in terms of 151 information resource capabilities that are applicable to time- 152 sensitive ALTO metrics. An ALTO Cost Calendar exposes ALTO Cost 153 Values in JSON arrays, see [RFC8259], where each value corresponds to 154 a given time interval. The time intervals as well as other Calendar 155 attributes are specified in the Information Resources Directory (IRD) 156 and in the Server response to allow the ALTO Client to interpret the 157 received ALTO values. Last, the extensions for ALTO Calendars are 158 applicable to any Cost Mode and they ensure backwards compatibility 159 with legacy ALTO Clients - those that only support [RFC7285]. 161 In the rest of this document, Section 3 provides the design 162 characteristics. Sections Section 4 and Section 5 define the formal 163 specifications for the IRD and the information resources. IANA, 164 security and operational considerations are addressed respectively in 165 sections Section 6, Section 7 and Section 8. 167 1.1. Some recent known uses 169 A potential use case is implementing smart network services that 170 allow applications to dynamically build end-to-end, virtual networks, 171 to satisfy given demands, with no manual intervention. For example, 172 data-transfer automation applications may need a network service to 173 determine on the availability of bandwidth resources, to decide when 174 to transfer their data sets. The SENSE project [SENSE-sdn-e2e-net] 175 supports such applications by requiring that a network provides 176 services such as the Time-Bandwidth-Product (TBP) service, which 177 informs applications of bandwidth availability during a specific time 178 period. ALTO Calendars can support this service if the Calendar 179 start date and duration cover the period of interest of the 180 requesting application. 182 The need of future scheduling of large scale traffic that can be 183 addressed by the ALTO protocol is also motivated by Unicorn, a 184 unified resource orchestration framework for multi-domain, geo- 185 distributed data analytics, see [Unicorn-fgcs]. 187 1.2. Terminology 189 o ALTO transaction: A request/response exchange between an ALTO 190 Client and an ALTO Server. 192 o Client: When used with a capital "C", this term refers to an ALTO 193 Client. 195 o Calendar, Cost Calendar: When used with capitalized words, these 196 terms refer to an ALTO Cost Calendar. 198 o Calendared: this adjective qualifies information resources 199 providing Cost Calendars and information on costs that are 200 provided in the form of a Cost Calendar. 202 o Endpoint (EP): An endpoint is defined as in Section 2.1 of 203 [RFC7285]. It can be, for example, a peer, a CDN storage 204 location, a physical server involved in a virtual server-supported 205 application, a party in a resource-sharing swarm such as a 206 computation grid, or an online multi-party game. 208 o ECM: Is an abbreviation for Endpoint Cost Map. 210 o FCM: Is an abbreviation for Filtered Cost Map. 212 o Server: When used with a capital "S", this term refers to an ALTO 213 Server. 215 2. Requirements Language 217 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 218 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 219 "OPTIONAL" in this document are to be interpreted as described in BCP 220 14 [RFC2119] [RFC8174] when, and only when, they appear in all 221 capitals, as shown here. 223 When the words appear in lower case, they are to be interpreted with 224 their natural language meanings. 226 3. Overview of ALTO Cost Calendars and terminology 228 This section gives a high-level overview of the design. It assumes 229 the reader is familiar with the ALTO protocol [RFC7285] and its 230 Multi-Cost ALTO extension [RFC8189]. 232 3.1. ALTO Cost Calendar overview 234 An ALTO Cost Calendar provided by the ALTO Server provides 2 235 information items: 237 o an array of values for a given metric, where each value specifies 238 the metric corresponding to a time interval, where the value array 239 can sometimes be a cyclic pattern that repeats a certain number of 240 times. 242 o attributes describing the time scope of the Calendar, including 243 the size and number of the intervals and the date of the starting 244 point of the Calendar, allowing an ALTO Client to interpret the 245 values properly. 247 An ALTO Cost Calendar can be used like a "time table" to figure out 248 the best time to schedule data transfers and also to proactively 249 manage application traffic given predictable events such as expected 250 spike in traffic due to crowd gathering (concerts, sports, etc.), 251 traffic-intensive holidays and network maintenance. A Calendar may 252 be viewed as a synthetic abstraction of, for example, real 253 measurements gathered over previous periods on which statistics have 254 been computed. However, like for any schedule, unexpected network 255 incidents may require the current ALTO Calendar to be updated and re- 256 sent to the ALTO Clients needing it. The "ALTO Incremental Updates 257 Using Server-Sent Events (SSE)" Service 258 [I-D.ietf-alto-incr-update-sse] can be used to directly update the 259 Calendar upon value changes, if supported by both the Server and the 260 Client. 262 Most likely, the ALTO Cost Calendar would be used for the Endpoint 263 Cost Service, assuming that a limited set of feasible Endpoints for a 264 non-real time application is already identified, that they do not 265 need to be accessed immediately and that their access can be 266 scheduled within a given time period. The Filtered Cost Map Service 267 is also applicable as long as the size of the Map allows it. 269 3.2. ALTO Cost Calendar information features 271 The Calendar attributes are provided in the Information Resources 272 Directory (IRD) and in ALTO Server responses. The IRD announces 273 attributes without date values in its information resources 274 capabilities, whereas attributes with time dependent values are 275 provided in the "meta" section of Server responses. The ALTO Cost 276 Calendar attributes provide the following information: 278 o attributes to describe the time scope of the Calendar value array: 280 * "time-interval-size": the applicable time interval size for 281 each Calendar value, defined in seconds, that can cover a wide 282 range of values. 284 * "number-of-intervals": the number of intervals provided in the 285 Calendar. 287 o "calendar-start-time": specifying when the Calendar starts, that 288 is to which date the first value of the Cost Calendar is 289 applicable. 291 o "repeated": an optional attribute indicating how many iterations 292 of the provided Calendar will have the same values. The Server 293 may use it to allow the Client to schedule its next request and 294 thus save its own workload by reducing processing of similar 295 requests. 297 Attribute "repeated" may take a very high value if a Calendar 298 represents a cyclic value pattern that the Server considers valid for 299 a long period. In this case, the Server will only update the 300 Calendar values once this period has elapsed or if an unexpected 301 event occurs on the network. See Section 8 for more discussion. 303 3.3. ALTO Calendar design characteristics 305 The present document uses the notations defined in Section "8.2 306 Notation" of [RFC7285]. 308 The extensions in this document encode requests and responses using 309 JSON [RFC8259]. 311 In the base protocol [RFC7285] section 11.2.3.6, an ALTO cost is 312 specified as a generic JSONValue [RFC8259], to allow extensions. 313 However, that section 11.2.3.6 states: "An implementation of the 314 protocol in this document ([RFC7285]) SHOULD assume that the cost is 315 a JSONNumber and fail to parse if it is not, unless the 316 implementation is using an extension to this document that indicates 317 when and how costs of other data types are signaled". 319 The present document extends the definition of a legacy cost map 320 given in [RFC7285] to allow a cost entry to be an array of values, 321 with one value per time interval, instead of being just one number, 322 when the Cost Calendar functionality is activated on this cost. 323 Therefore the implementor of this extension MUST consider that a cost 324 entry is an array of values if this cost has been queried as a 325 Calendar. 327 Specifically, an implementation of this extension MUST parse the 328 "number-of-intervals" attribute of the Calendar attributes in an IRD 329 entry announcing a service providing a Cost Calendar for a given cost 330 type. The implementation then will know that a cost entry of the 331 service will be an array of values, and the expected size of the 332 array is that specified by the "number-of-intervals" attribute. The 333 following rules attempt to ensure consistency between the array size 334 announced by the Server and the actual size of the array received by 335 the Client: 337 o The size of the array of values conveyed in a Cost Calendar and 338 received by the Client MUST be equal to the value of attribute 339 "number-of-intervals" indicated in the IRD for the requested cost 340 type. 342 o When the size of the array received by the Client is different 343 from the expected size, the Client SHOULD ignore the received 344 array. 346 To realize an ALTO Calendar, this document extends the IRD and the 347 ALTO requests and responses for Cost Calendars. 349 This extension is designed to be lightweight and to ensure backwards 350 compatibility with base protocol ALTO Clients and with other 351 extensions. It relies on section 8.3.7 "Parsing of Unknown Fields" 352 of [RFC7285] that writes: "Extensions may include additional fields 353 within JSON objects defined in this document. ALTO implementations 354 MUST ignore unknown fields when processing ALTO messages." 356 The Calendar-specific capabilities are integrated in the information 357 resources of the IRD and in the "meta" member of ALTO responses to 358 Cost Calendars requests. A Calendar and its capabilities are 359 associated with a given information resource and within this 360 information resource, with a given cost type. This design has 361 several advantages: 363 o it does not introduce a new mode, 365 o it does not introduce new media types, 367 o it allows an ALTO Server to offer, for a cost type, different 368 Calendars with attributes that are specific to the information 369 resources providing a Calendar for this cost type, instead of 370 being globally specific to the cost type. 372 The applicable Calendared information resources are: 374 o the Filtered Cost Map, 375 o the Endpoint Cost Map. 377 The ALTO Server can choose in which frequency it provides cost 378 Calendars to ALTO Clients. It may either provide Calendar updates 379 starting at the request date, or carefully schedule its updates so as 380 to take profit from a potential repetition/periodicity of Calendar 381 values. 383 Since Calendar attributes are specific to an information resource, a 384 Server may adapt the granularity of the calendared information so as 385 to moderate the volume of exchanged data. For example: suppose a 386 Server provides a Calendar for cost type name "routingcost". The 387 Server may offer a Calendar in a Cost Map resource, which may be a 388 voluminous resource, as an array of 6 intervals lasting each 4 hours. 389 It may also offer a Calendar in an Endpoint Cost Map resource, which 390 is potentially less voluminous, as a finer-grained array of 24 391 intervals lasting 1 hour each. 393 The ALTO Server does not support constraints on Calendars, provided 394 Calendars are requested for numerical values, for two main reasons: 396 o constraints on an array of values may be various: for instance, 397 some Clients may refuse Calendars with one single value violating 398 a constraint, where as other ones may tolerate Calendars with 399 values violating constraints for example at given times. 400 Therefore, expressing constraints in a way that covers all 401 possible Client preferences is challenging, 403 o if constraints were to be supported, the processing overhead would 404 be substantial for the Server as it would have to parse alle the 405 values of the Calendar array before returning a response. 407 As providing the constraint functionality in conjunction with the 408 Calendar functionality is not feasible for the reasons described 409 above, the two features are mutually exclusive. The absence of 410 constraints on Filtered Cost Map and Endpoint Cost Map Calendars 411 reflects a divergence from the non-calendared information resources 412 defined in [RFC7285] and extended in [RFC8189], that support optional 413 constraints. 415 3.3.1. ALTO Cost Calendar for all cost modes 417 An ALTO Cost Calendar is well-suited for values encoded in the 418 "numerical" mode. Actually, a Calendar can also represent metrics in 419 other modes considered as compatible with time-varying values. For 420 example, types of Cost values such as JSONBool can also be 421 calendared, as their value may be 'true' or 'false' depending on 422 given time periods or likewise, values represented by strings, such 423 as "medium", "high", "low", "blue", "open". 425 Note also that a Calendar is suitable as well for time-varying 426 metrics provided in the "ordinal" mode, if these values are time- 427 varying and the ALTO Server provides updates of cost value based 428 preferences. 430 3.3.2. Compatibility with legacy ALTO Clients 432 The ALTO protocol extensions for Cost Calendars have been defined so 433 as to ensure that Calendar-capable ALTO Servers can provide legacy 434 ALTO Clients with legacy information resources as well. That is, a 435 legacy ALTO Client can request resources and receive responses as 436 specified in [RFC7285]. 438 A Calendar-aware ALTO Server MUST implement the base protocol 439 specified in [RFC7285]. 441 A Calendar-aware ALTO Client MUST implement the base protocol 442 specified in [RFC7285]. 444 As a consequence, when a metric is available as a Calendar array, it 445 also MUST be available as a single value as required by [RFC7285]. 446 The Server, in this case, provides the current value of the metric to 447 either Calendar-aware Clients not interested in future or time-based 448 values, or Clients implementing [RFC7285] only. 450 For compatibility with legacy ALTO Clients specified in [RFC7285], 451 calendared information resources are not applicable for full cost 452 maps for the following reason: a legacy ALTO Client would receive a 453 calendared cost map via an HTTP 'GET' command. As specified in 454 section 8.3.7 of [RFC7285], it will ignore the Calendar Attributes 455 indicated in the "meta" of the responses. Therefore, lacking 456 information on Calendar attributes, it will not be able to correctly 457 interpret and process the values of the received array of Calendar 458 cost values. 460 Therefore, calendared information resources MUST be requested via the 461 Filtered Cost Map Service or the Endpoint Cost Service, using a POST 462 method. 464 4. ALTO Calendar specification: IRD extensions 466 The Calendar attributes in the IRD information resources capabilities 467 carry dateless values. A Calendar is associated with an information 468 resource rather than a cost type. For example, a Server can provide 469 a "routingcost" Calendar for the Filtered Cost Map Service at a 470 granularity of one day and a "routingcost" Calendar for the Endpoint 471 Cost Service at a finer granularity but for a limited number of 472 endpoints. An example IRD with Calendar specific features is 473 provided in Section 4.3. 475 4.1. Calendar attributes in the IRD resource capabilities 477 A Cost Calendar for a given cost type MUST be indicated in the IRD by 478 an object of type CalendarAttributes. A CalendarAttributes object is 479 represented by the "calendar-attributes" member of a resource entry. 480 Member "calendar-attributes" is an array of CalendarAttributes 481 objects. Each CalendarAttributes object lists a set of one or more 482 cost types it applies to. A cost type name MUST NOT appear more than 483 once in the "calendar-attributes" member of a resource entry; 484 multiple appearances of a cost type name in the CalendarAttributes 485 object of the "calendar-attributes" member MUST cause the ALTO Client 486 to ignore any occurrences of this name beyond the first encountered 487 occurrence. The Client SHOULD consider the CalendarAttributes object 488 in the array containing the first encountered occurrence of a cost 489 type as the valid one for this cost type. As an alternative, the 490 Client may want to avoid the risks of erroneous guidance associated 491 to the use of potentially invalid Calendar values. In this case, the 492 Client MAY ignore the totality of occurences of CalendarAttributes 493 objects containing the cost type name and query the cost type using 494 [RFC7285]. 496 The encoding format for object CalendarAttributes, using JSON 497 [RFC8259], is as follows: 499 CalendarAttributes calendar-attributes <1..*>; 501 object{ 502 JSONString cost-type-names <1..*>; 503 JSONNumber time-interval-size; 504 JSONNumber number-of-intervals; 505 } CalendarAttributes; 507 o "cost-type-names": 509 * An array of one or more elements indicating the cost type names 510 in the IRD entry to which the values of "time-interval-size" 511 and "number-of-intervals" apply. 513 o "time-interval-size": 515 * is the duration of an ALTO Calendar time interval in a unit of 516 seconds. A "time-interval-size" value contains a non-negative 517 JSONNumber. Example values are: 300 and 7200, meaning that 518 each Calendar value applies on a time interval that lasts 5 519 minutes and 2 hours, respectively. Since an interval size 520 (e.g., 100 ms) can be smaller than the unit, the value 521 specified may be a floating point (e.g., 0.1). Both ALTO 522 Clients and Servers should be aware of potential precision 523 issues caused by using floating point numbers; for example, the 524 floating number 0.1 cannot be represented precisely using a 525 finite number of binary bits. To improve interoperability and 526 be consistent with [RFC7285] on the use of floating point 527 numbers, the Server and the Client SHOULD use IEEE 754 double- 528 precision floating point [IEEE.754.2008] to store this value. 530 o "number-of-intervals": 532 * is a strictly positive integer (greater or equal to 1), that 533 indicates the number of values of the Cost Calendar array. 535 - An ALTO Server SHOULD specify the "time-interval-size" in the IRD 536 as the smallest it is able to provide. A Client that needs a longer 537 interval can aggregate multiple cost values to obtain it. 539 - Attribute "cost-type-names" is associated with "time-interval-size" 540 and "number-of-intervals", because multiple cost types may share the 541 same values for attributes "time-interval-size" and "number-of- 542 intervals". To avoid redundancies, cost type names sharing the same 543 values for "time-interval-size" and "number-of-intervals" are grouped 544 in the "cost-type-names" attribute. In the example IRD provided in 545 Section 4.3, the information resource "filtered-cost-map-calendar" 546 provides a Calendar for cost type names "num-routingcost", "num- 547 throughputrating" and "string-servicestatus". Cost type names "num- 548 routingcost" and "num-throughputrating" are grouped in the "cost- 549 type-names" attribute because they share the same values for "time- 550 interval-size" and "number-of-intervals", which are respectively 7200 551 and 12. 553 - Multiplying "time-interval-size" by "number-of-intervals" provides 554 the duration of the provided Calendar. For example, an ALTO Server 555 may provide a Calendar for ALTO values changing every "time-interval- 556 size" equal to 5 minutes. If "number-of-intervals" has the value 12, 557 then the duration of the provided Calendar is 1 hour. 559 4.2. Calendars in a delegate IRD 561 It may be useful to distinguish IRD resources supported by the base 562 ALTO protocol from resources supported by its extensions. To achieve 563 this, one option, is that a "root" ALTO Server implementing [RFC7285] 564 resources and running at a given domain, delegates "specialized" 565 information resources such as the ones providing Cost Calendars, to 566 another ALTO Server running in a subdomain. The "root" ALTO Server 567 can provide a Calendar-specific resource entry, that has a media-type 568 of "application/alto-directory+json" and that specifies the URI 569 allowing to retrieve the location of a Calendar-aware Server and 570 discover its resources. This option is described in Section 9.2.4 571 "Delegation using IRDs" of [RFC7285]. 573 This document provides an example, where a "root" ALTO Server runs in 574 a domain called "alto.example.com". It delegates the announcement of 575 Calendars capabilities to an ALTO Server running in a subdomain 576 called "custom.alto.example.com". The location of the "delegate 577 Calendar IRD" is assumed to be indicated in the "root" IRD by the 578 resource entry: "custom-calendared-resources". 580 Another benefit of delegation is that some cost types for some 581 resources may be more advantageous as Cost Calendars and it makes 582 little sense to get them as a single value. For example, if a cost 583 type has predictable and frequently changing values, calendared in 584 short time intervals such as a minute, it saves time and network 585 resources to track the cost values via a focused delegate Server 586 rather than the more general "root" Server. 588 4.3. Example IRD with ALTO Cost Calendars 590 This section provides an example ALTO Server IRD that supports 591 various cost metrics and cost modes. In particular, since [RFC7285] 592 makes it mandatory, the Server uses metric "routingcost" in the 593 "numerical" mode. 595 For illustrative purposes, this section introduces 3 other fictitious 596 example metrics and modes that should be understood as examples and 597 should not be used or considered as normative. 599 The cost type names used in the example IRD are as follows: 601 o "num-routingcost": refers to metric "routingcost" in the numerical 602 mode as defined in [RFC7285] and registered with IANA. 604 o "num-owdelay": refers to fictitious performance metric "owdelay" 605 in the "numerical" mode, to reflect the one-way packet 606 transmission delay on a path. A related performance metric is 607 currently under definition in [I-D.ietf-alto-performance-metrics]. 609 o "num-throughputrating": refers to fictitious metric 610 "throughputrating" in the "numerical" mode, to reflect the 611 provider preference in terms of end to end throughput. 613 o "string-servicestatus": refers to fictitious metric 614 "servicestatus" containing a string, to reflect the availability, 615 defined by the provider, of for instance path connectivity. 617 The example IRD includes 2 particular URIs providing Calendars: 619 o "https://custom.alto.example.com/calendar/costmap/filtered": a 620 Filtered Cost Map in which Calendar capabilities are indicated for 621 cost type names: "num-routingcost", "num-throughputrating" and 622 "string-servicestatus", 624 o "https://custom.alto.example.com/calendar/endpointcost/lookup": an 625 Endpoint Cost Map in which Calendar capabilities are indicated for 626 cost type names: "num-routingcost", "num-owdelay", "num- 627 throughputrating", "string-servicestatus". 629 The design of the Calendar capabilities allows some Calendars with 630 the same cost type name to be available in several information 631 resources with different Calendar Attributes. This is the case for 632 Calendars on "num-routingcost", "num-throughputrating" and "string- 633 servicestatus", available in both the Filtered Cost map and Endpoint 634 Cost Service, but with different time interval sizes for "num- 635 throughputrating" and "string-servicestatus". 637 --- Client to Server request for IRD ---------- 639 GET /calendars-directory HTTP/1.1 640 Host: custom.alto.example.com 641 Accept: application/alto-directory+json,application/alto-error+json 643 --- Server response to Client ----------------- 645 HTTP/1.1 200 OK 646 Content-Length: 2622 647 Content-Type: application/alto-directory+json 649 { 650 "meta" : { 651 "default-alto-network-map" : "my-default-network-map", 652 "cost-types": { 653 "num-routingcost": { 654 "cost-mode" : "numerical", 655 "cost-metric" : "routingcost" 656 }, 657 "num-owdelay": { 658 "cost-mode" : "numerical", 659 "cost-metric": "owdelay" 660 }, 661 "num-throughputrating": { 662 "cost-mode" : "numerical", 663 "cost-metric": "throughputrating" 664 }, 665 "string-servicestatus": { 666 "cost-mode" : "string", 667 "cost-metric": "servicestatus" 668 } 669 } 670 }, 671 "resources" : { 672 "filtered-cost-map-calendar" : { 673 "uri" : 674 "https://custom.alto.example.com/calendar/costmap/filtered", 675 "media-type" : "application/alto-costmap+json", 676 "accepts" : "application/alto-costmapfilter+json", 677 "capabilities" : { 678 "cost-constraints" : true, 679 "cost-type-names" : [ "num-routingcost", 680 "num-throughputrating", 681 "string-servicestatus" ], 682 "calendar-attributes" : [ 683 {"cost-type-names" : [ "num-routingcost", 684 "num-throughputrating" ], 685 "time-interval-size" : 7200, 686 "number-of-intervals" : 12 687 }, 688 {"cost-type-names" : [ "string-servicestatus" ], 689 "time-interval-size" : 1800, 690 "number-of-intervals" : 48 691 } 692 ] 693 }, 694 "uses": [ "my-default-network-map" ] 695 }, 696 "endpoint-cost-map-calendar" : { 697 "uri" : 698 "https://custom.alto.example.com/calendar/endpointcost/lookup", 699 "media-type" : "application/alto-endpointcost+json", 700 "accepts" : "application/alto-endpointcostparams+json", 701 "capabilities" : { 702 "cost-constraints" : true, 703 "cost-type-names" : [ "num-routingcost", 704 "num-owdelay", 705 "num-throughputrating", 706 "string-servicestatus" ], 707 "calendar-attributes" : [ 708 {"cost-type-names" : [ "num-routingcost" ], 709 "time-interval-size" : 3600, 710 "number-of-intervals" : 24 711 }, 712 {"cost-type-names" : [ "num-owdelay" ], 713 "time-interval-size" : 300, 714 "number-of-intervals" : 12 715 }, 716 {"cost-type-names" : [ "num-throughputrating" ], 717 "time-interval-size" : 60, 718 "number-of-intervals" : 60 719 }, 720 {"cost-type-names" : [ "string-servicestatus" ], 721 "time-interval-size" : 120, 722 "number-of-intervals" : 30 723 } 724 ] 725 } 726 } 727 } 728 } 730 In this example IRD, for the Filtered Cost Map Service: 732 o the Calendar for "num-routingcost" and "num-throughputrating" is 733 an array of 12 values each provided on a time interval lasting 734 7200 seconds (2 hours). 736 o the Calendar for "string-servicestatus": "is an array of 48 values 737 each provided on a time interval lasting 1800 seconds (30 738 minutes). 740 For the Endpoint Cost Service: 742 o the Calendar for "num-routingcost": is an array of 24 values each 743 provided on a time interval lasting 3600 seconds (1 hour). 745 o the Calendar for "num-owdelay": is an array of 12 values each 746 provided on a time interval lasting 300 seconds (5 minutes). 748 o the Calendar for "num-throughputrating": is an array of 60 values 749 each provided on a time interval lasting 60 seconds (1 minute). 751 o the Calendar for "string-servicestatus": "is an array of 30 values 752 each provided on a time interval lasting 120 seconds (2 minutes). 754 Note that in this example IRD, member "cost-constraints" is present 755 with a value set to "true" in both information resources "filtered- 756 cost-map-calendar" and "endpoint-cost-map-calendar". Although a 757 Calendar-aware ALTO Server does not support constraints for the 758 reasons explained in section Section 3.3, it MUST support constraints 759 on cost types that are not requested as Calendars but are requested 760 as specified in [RFC7285] and [RFC8189]. 762 5. ALTO Calendar specification: Service Information Resources 764 This section documents extensions to two basic ALTO information 765 resources (Filtered Cost Maps and Endpoint Cost Service) to provide 766 calendared information services for them. 768 Both extensions return calendar start time (calendar-start-time, a 769 point in time), which MUST be specified as an HTTP "Date" header 770 field using the IMF-fixdate format specified in Section 7.1.1.1 of 771 [RFC7231]. Note that the IMF-fixdate format uses "GMT", not "UTC", 772 to designate the time zone, as in this example: 774 Date: Tue, 15 Nov 2019 08:12:31 GMT 776 5.1. Calendar extensions for Filtered Cost Maps (FCM) 778 A legacy ALTO Client requests and gets Filtered Cost Map responses as 779 specified in [RFC7285]. 781 5.1.1. Calendar extensions in Filtered Cost Map requests 783 The input parameters of a "legacy" request for a Filtered Cost Map, 784 defined by object ReqFilteredCostMap in section 11.3.2 of [RFC7285], 785 are augmented with one additional member. The same augmentation 786 applies to object ReqFilteredCostMap defined in section 4.1.2 of 787 [RFC8189]. 789 A Calendar-aware ALTO Client requesting a Calendar on a given Cost 790 Type for a Filtered Cost Map resource having Calendar capabilities 791 MUST add the following field to its input parameters: 793 JSONBoolean calendared<1..*>; 795 This field is an array of 1 to N boolean values, where N is the 796 number of requested metrics. N is greater than 1 when the Client and 797 the Server also implement [RFC8189]. 799 Each entry corresponds to the requested metric at the same array 800 position. Each boolean value indicates whether or not the ALTO 801 Server should provide the values for this cost type as a Calendar. 802 The array MUST contain exactly N boolean values, otherwise, the 803 Server returns an error. 805 This field MUST NOT be included if no member "calendar-attributes" is 806 specified in this information resource. 808 If a value of field "calendared" is 'true' for a cost type name for 809 which no Calendar attributes have been specified: an ALTO Server, 810 whether it implements the extensions of this document or only 811 implements [RFC7285], MUST ignore it and return a response with a 812 single cost value as specified in [RFC7285]. 814 If this field is not present, it MUST be assumed to have only values 815 equal to 'false'. 817 A Calendar-aware ALTO Client that supports requests for only one cost 818 type at a time and wants to request a Calendar MUST provide an array 819 of 1 element: 821 "calendared" : [true], 823 A Calendar-aware ALTO Client that supports requests for more than one 824 cost types at a time, as specified in [RFC8189] MUST provide an array 825 of N values set to 'true' or 'false', depending whether it wants the 826 applicable cost type values as a single or calendared value. 828 5.1.2. Calendar extensions in Filtered Cost Map responses 830 In a calendared ALTO Filtered Cost Map, a cost value between a source 831 and a destination is a JSON array of JSON values. An ALTO Calendar 832 values array has a number of values equal to the value of member 833 "number-of-intervals" of the Calendar attributes that are indicated 834 in the IRD. These attributes will be conveyed as metadata in the 835 Filtered Cost Map response. Each element of the array is valid for 836 the time-interval that matches its array position. 838 The FCM response conveys metadata among which: 840 o some are not specific to Calendars and ensure compatibility with 841 [RFC7285] and [RFC8189] 843 o some are specific to Calendars. 845 The non Calendar-specific "meta" fields of a calendared Filtered Cost 846 Map response MUST include at least: 848 o if the ALTO Client requests cost values for one cost type at a 849 time only: the "meta" fields specified in [RFC7285] for these 850 information service responses: 852 * "dependent-vtags ", 853 * "cost-type" field. 855 o if the ALTO Client implements the Multi-Cost ALTO extension 856 specified in [RFC8189] and requests cost values for several cost 857 types at a time: the "meta" fields specified in [RFC8189] for 858 these information service responses: 860 * "dependent-vtags ", 862 * "cost-type" field with value set to '{}', for backwards 863 compatibility with [RFC7285]. 865 * "multi-cost-types" field. 867 If the Client request does not provide member "calendared" or if it 868 provides it with a value equal to 'false', for all the requested cost 869 types, then the ALTO Server response is exactly as specified in 870 [RFC7285] and [RFC8189]. 872 If the value of member "calendared" is equal to 'false' for a given 873 requested cost type, the ALTO Server MUST return, for this cost type, 874 a single cost value as specified in [RFC7285]. 876 If the value of member "calendared" is equal to 'true' for a given 877 requested cost type, the ALTO Server returns, for this cost type, a 878 cost value Calendar as specified above in this section. In addition 879 to the above cited non Calendar specific "meta" members, the Server 880 MUST provide a Calendar specific metadata field. 882 The Calendar-specific "meta" field that a calendared Filtered Cost 883 Map response MUST include is a member called "calendar-response- 884 attributes", that describes properties of the Calendar and where: 886 o member "calendar-response-attributes" is an array of one or more 887 objects of type "CalendarResponseAttributes". 889 o each "CalendarResponseAttributes" object in the array is specified 890 for one or more cost types for which the value of member 891 "calendared", in object ReqFilteredCostMap provided in the Client 892 request, is equal to 'true' and for which a Calendar is provided 893 for the requested information resource. 895 o the "CalendarResponseAttributes" object that applies to a cost 896 type name has a corresponding "CalendarAttributes" object defined 897 for this cost type name in the IRD capabilities of the requested 898 information resource. This object is the entry, in the "calendar- 899 attributes" array member of the IRD resource entry, that includes 900 the name of the requested cost type. This corresponding 901 "CalendarAttributes" object has the same values as object 902 "CalendarResponseAttributes" for members "time-interval-size" and 903 "number-of-intervals". The members of the 904 "CalendarResponseAttributes" object include all the members of the 905 corresponding "CalendarAttributes" object. 907 The format of member "CalendarResponseAttributes is defined as 908 follows: 910 CalendarResponseAttributes calendar-response-attributes <1..*>; 912 object{ 913 [JSONString cost-type-names <1..*>;] 914 JSONString calendar-start-time; 915 JSONNumber time-interval-size; 916 JSONNumber number-of-intervals; 917 [JSONNumber repeated;] 918 } CalendarResponseAttributes; 920 Object CalendarResponseAttributes has the following attributes: 922 o "cost-type-names": is an array of one or more cost-type-names to 923 which the value of the other members of CalendarResponseAttributes 924 apply and for which a Calendar has been requested. The value of 925 this member is a subset of the "cost-type-names" member of the 926 abovementioned corresponding "CalendarAttributes" object in the 927 "calendar-attributes" array member in the IRD. This member MUST 928 be present when Cost Calendars are provided for more than one cost 929 type. 931 o "calendar-start-time": indicates the date at which the first value 932 of the Calendar applies. The value is a string that, as specified 933 in Section 5, contains an HTTP "Date" header field using the IMF- 934 fixdate format specified in Section 7.1.1.1 of [RFC7231]. The 935 value provided for attribute "calendar-start-time" SHOULD NOT be 936 later than the request date. 938 o "time-interval-size": as specified in Section 4.1 and with the 939 same value as in the abovementioned corresponding 940 "CalendarAttributes" object. 942 o "number-of-intervals": as specified in Section 4.1 and with the 943 same value as in the abovementioned corresponding 944 "CalendarAttributes" object. 946 o "repeated": is an optional field provided for Calendars. It is an 947 integer N greater or equal to '1' that indicates how many 948 iterations of the Calendar value array starting at the date 949 indicated by "calendar-start-time" have the same values. The 950 number N includes the iteration provided in the returned response. 952 For example: suppose the "calendar-start-time" member has value "Mon, 953 30 Jun 2019 00:00:00 GMT", the "time-interval-size" member has value 954 '3600', the "number-of-intervals" member has value '24' and the value 955 of member "repeated" is equal to '4'. This means that the Calendar 956 values are the same on Monday, Tuesday, Wednesday and Thursday on a 957 period of 24 hours starting at 00:00:00 GMT. The ALTO Client thus 958 may use the same Calendar for the next 4 days starting at "calendar- 959 start-time" and will only need to request a new one for Friday July 960 4th at 00:00:00 GMT. 962 Attribute "repeated" may take a very high value if a Calendar 963 represents a cyclic value pattern that the Server considers valid for 964 a long period and hence will only update once this period has elapsed 965 or if an unexpected event occurs on the network. In the latter case, 966 the Client will be notified if it uses the "ALTO Incremental Updates 967 Using Server-Sent Events (SSE)" Service, specified in 968 [I-D.ietf-alto-incr-update-sse]. To this end, it is RECOMMENDED that 969 ALTO Servers providing ALTO Calendars also provide the "ALTO 970 Incremental Updates Using Server-Sent Events (SSE)" Service that is 971 specified in [I-D.ietf-alto-incr-update-sse]. Likewise, ALTO Clients 972 capable of using ALTO Calendars SHOULD also use the SSE Service. See 973 also discussion in Section 8 "Operational Considerations". 975 5.1.3. Use case and example: FCM with a bandwidth Calendar 977 An example of non-real-time information that can be provisioned in a 978 Calendar is the expected path throughput. While the transmission 979 rate can be measured in real time by end systems, the operator of a 980 data center is in the position of formulating preferences for given 981 paths, at given time periods to avoid traffic peaks due to diurnal 982 usage patterns. In this example, we assume that an ALTO Client 983 requests a Calendar of network-provider-defined throughput ratings, 984 as specified in the IRD, to schedule its bulk data transfers as 985 described in the use cases. 987 In the example IRD, Calendars for cost type name "num- 988 throughputrating" are available for the information resources: 989 "filtered-cost-calendar-map" and "endpoint-cost-map-calendar". The 990 ALTO Client requests a Calendar for "num-throughputrating" via a POST 991 request for a Filtered Cost Map. 993 We suppose in the present example that the ALTO Client sends its 994 request on Tuesday July 1st 2019 at 13:15. The Server returns 995 Calendars with arrays of 12 numbers for each source and destination 996 pair. The values for metric "throughputrating", in this example, are 997 assumed to be encoded in 2 digits. 999 POST /calendar/costmap/filtered HTTP/1.1 1000 Host: custom.alto.example.com 1001 Content-Length: 217 1002 Content-Type: application/alto-costmapfilter+json 1003 Accept: application/alto-costmap+json,application/alto-error+json 1005 { 1006 "cost-type" : {"cost-mode" : "numerical", 1007 "cost-metric" : "throughputrating"}, 1008 "calendared" : [true], 1009 "pids" : { 1010 "srcs" : [ "PID1", "PID2" ], 1011 "dsts" : [ "PID1", "PID2", "PID3" ] 1012 } 1013 } 1015 HTTP/1.1 200 OK 1016 Content-Length: 1043 1017 Content-Type: application/alto-costmap+json 1019 { 1020 "meta" : { 1021 "dependent-vtags" : [ 1022 {"resource-id": "my-default-network-map", 1023 "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" 1024 } 1025 ], 1026 "cost-type" : {"cost-mode" : "numerical", 1027 "cost-metric" : "throughputrating"}, 1028 "calendar-response-attributes" : [ 1029 {"calendar-start-time" : "Tue, 1 Jul 2019 13:00:00 GMT", 1030 "time-interval-size" : 7200, 1031 "number-of-intervals" : 12} 1032 ] 1033 }, 1034 "cost-map" : { 1035 "PID1": { "PID1": [ 1, 12, 14, 18, 14, 14, 1036 14, 18, 19, 20, 11, 12], 1037 "PID2": [13, 4, 15, 16, 17, 18, 1038 19, 20, 11, 12, 13, 14], 1039 "PID3": [20, 20, 18, 14, 12, 12, 1040 14, 14, 12, 12, 14, 16] }, 1041 "PID2": { "PID1": [17, 18, 19, 10, 11, 12, 1042 13, 14, 15, 16, 17, 18], 1043 "PID2": [20, 20, 18, 16, 14, 14, 1044 14, 16, 16, 16, 14, 16], 1045 "PID3": [20, 20, 18, 14, 12, 12, 1046 14, 14, 12, 12, 14, 16] } 1047 } 1048 } 1050 5.2. Calendar extensions in the Endpoint Cost Service 1052 This document extends the Endpoint Cost Service, as defined in 1053 {11.5.1} of [RFC7285], by adding new input parameters and 1054 capabilities, and by returning JSONArrays instead of JSONNumbers as 1055 the cost values. The media type {11.5.1.1} and HTTP method 1056 {11.5.1.2} are unchanged. 1058 5.2.1. Calendar specific input in Endpoint Cost requests 1060 The extensions to the requests for calendared Endpoint Cost Maps are 1061 the same as for the Filtered Cost Map Service, specified in 1062 Section 5.1.1 of this document. Likewise, the rules defined around 1063 the extensions to ECM requests are the same as those defined in 1064 Section 5.1.1 for FCM requests. 1066 The ReqEndpointCostMap object for a calendared ECM request will have 1067 the following format: 1069 object { 1070 [CostType cost-type;] 1071 [CostType multi-cost-types<1..*>;] 1072 [JSONBoolean calendared<1..*>;] 1073 EndpointFilter endpoints; 1074 } ReqEndpointCostMap; 1076 object { 1077 [TypedEndpointAddr srcs<0..*>;] 1078 [TypedEndpointAddr dsts<0..*>;] 1079 } EndpointFilter; 1081 Member "cost-type" is optional because, in the ReqEndpointCostMap 1082 object definition of this document, it is jointly present with member 1083 "multi-cost-types", to ensure compatibility with RFC 8189. In 1084 RFC8189, members "cost-type" and "multi-cost-types" are both optional 1085 and have to obey the rule specified in section 4.1.2 of 8189 saying 1086 that: "the Client MUST specify either "cost-type" or "multi-cost- 1087 types" but MUST NOT specify both". 1089 The interpretation of member "calendared" is the same as for the 1090 ReqFilteredCostMap object defined in Section 5.1.1 of this document. 1091 The interpretation of the other members is the same as for object 1092 ReqEndpointCostMap is defined in [RFC7285] and [RFC8189]. The type 1093 TypedEndpointAddr is defined in section 10.4.1 of [RFC7285]. 1095 For the reasons explained in section Section 3.3, a Calendar-aware 1096 ALTO Server does not support constraints. Therefore, member 1097 "[constraints]" is not present in the ReqEndpointCostMap object and 1098 member "constraints" MUST NOT be present in the input parameters of a 1099 request for an Endpoint Cost Calendar. If this member is present, 1100 the Server MUST ignore it. 1102 5.2.2. Calendar attributes in the Endpoint Cost response 1104 The "meta" field of a calendared Endpoint Cost response MUST include 1105 at least: 1107 o if the ALTO Client supports cost values for one cost type at a 1108 time only: the "meta" fields specified in {11.5.1.6} of [RFC7285] 1109 for the Endpoint Cost response: 1111 * "cost-type" field. 1113 o if the ALTO Client supports cost values for several cost types at 1114 a time, as specified in [RFC8189] : the "meta" fields specified in 1115 [RFC8189] for the the Endpoint Cost response: 1117 * "cost-type" field with value set to '{}', for backwards 1118 compatibility with [RFC7285]. 1120 * "multi-cost-types" field. 1122 If the Client request does not provide member "calendared" or if it 1123 provides it with a value equal to 'false', for all the requested Cost 1124 Types, then the ALTO Server response is exactly as specified in 1125 [RFC7285] and [RFC8189]. 1127 If the ALTO Client provides member "calendared" in the input 1128 parameters with a value equal to 'true' for given requested Cost 1129 Types, the "meta" member of a calendared Endpoint Cost response MUST 1130 include, for these cost types, an additional member "calendar- 1131 response-attributes", the contents of which obey the same rules as 1132 for the Filtered Cost Map Service, specified in Section 5.1.2. The 1133 Server response is thus changed as follows, with respect to [RFC7285] 1134 and [RFC8189]: 1136 o the "meta" member has one additional field 1137 "CalendarResponseAttributes", as specified for the Filtered Cost 1138 Map Service, 1140 o the calendared costs are JSONArrays instead of the JSONNumbers 1141 format used by legacy ALTO implementations. All arrays have a 1142 number of values equal to 'number-of-intervals'. Each value 1143 corresponds to the cost in that interval. 1145 If the value of member "calendared" is equal to 'false' for a given 1146 requested cost type, the ALTO Server MUST return, for this cost type, 1147 a single cost value as specified in [RFC7285]. 1149 5.2.3. Use case and example: ECS with a routingcost Calendar 1151 Let us assume an Application Client is located in an end system with 1152 limited resources and having access to the network that is either 1153 intermittent or provides an acceptable quality in limited but 1154 predictable time periods. Therefore, it needs to schedule both its 1155 resource-greedy networking activities and its ALTO transactions. 1157 The Application Client has the choice to trade content or resources 1158 with a set of Endpoints and needs to decide with which one it will 1159 connect and at what time. For instance, the Endpoints are spread in 1160 different time-zones, or have intermittent access. In this example, 1161 the 'routingcost' is assumed to be time-varying, with values provided 1162 as ALTO Calendars. 1164 The ALTO Client associated with the Application Client queries an 1165 ALTO Calendar on 'routingcost' and will get the Calendar covering the 1166 24 hours time period "containing" the date and time of the ALTO 1167 Client request. 1169 For cost type "num-routingcost", the solicited ALTO Server has 1170 defined 3 different daily patterns each represented by a Calendar, to 1171 cover the week of Monday June 30th at 00:00 to Sunday July 6th 23:59: 1173 o C1 for Monday, Tuesday, Wednesday, Thursday, (weekdays) 1175 o C2 for Saturday, Sunday, (weekend) 1177 o C3 for Friday (maintenance outage on July 4, 2019 from 02:00:00 1178 GMT to 04:00:00 GMT, or big holiday such as New Year evening). 1180 In the following example, the ALTO Client sends its request on 1181 Tuesday July 1st 2019 at 13:15. 1183 The "routingcost" values are assumed to be encoded in 3 digits. 1185 POST /calendar/endpointcost/lookup HTTP/1.1 1186 Host: custom.alto.example.com 1187 Content-Length: 304 1188 Content-Type: application/alto-endpointcostparams+json 1189 Accept: application/alto-endpointcost+json,application/alto-error+json 1191 { 1192 "cost-type" : {"cost-mode" : "numerical", 1193 "cost-metric" : "routingcost"}, 1194 "calendared" : [true], 1195 "endpoints" : { 1196 "srcs": [ "ipv4:192.0.2.2" ], 1197 "dsts": [ 1198 "ipv4:192.0.2.89", 1199 "ipv4:198.51.100.34", 1200 "ipv4:203.0.113.45", 1201 "ipv6:2001:db8::10" 1202 ] 1203 } 1204 } 1206 HTTP/1.1 200 OK 1208 Content-Length: 1351 1209 Content-Type: application/alto-endpointcost+json 1211 { 1212 "meta" : { 1213 "cost-type" : {"cost-mode" : "numerical", 1214 "cost-metric" : "routingcost"}, 1215 "calendar-response-attributes" : [ 1216 {"calendar-start-time" : "Mon, 30 Jun 2019 00:00:00 GMT", 1217 "time-interval-size" : 3600, 1218 "number-of-intervals" : 24, 1219 "repeated": 4 1220 } 1221 ] 1222 }, 1223 "endpoint-cost-map" : { 1224 "ipv4:192.0.2.2": { 1225 "ipv4:192.0.2.89" : [100, 100, 100, 100, 100, 150, 1226 200, 300, 300, 300, 300, 250, 1227 250, 300, 300, 300, 300, 300, 1228 400, 250, 250, 200, 150, 150], 1229 "ipv4:198.51.100.34" : [ 80, 80, 80, 80, 150, 150, 1230 250, 400, 400, 450, 400, 200, 1231 200, 350, 400, 400, 400, 350, 1232 500, 200, 200, 200, 100, 100], 1233 "ipv4:203.0.113.45" : [300, 400, 250, 250, 200, 150, 1234 150, 100, 100, 100, 100, 100, 1235 100, 100, 100, 100, 100, 150, 1236 200, 300, 300, 300, 300, 250], 1237 "ipv6:2001:db8::10" : [200, 250, 300, 300, 300, 300, 1238 250, 300, 300, 300, 300, 350, 1239 300, 400, 250, 150, 100, 100, 1240 100, 150, 200, 250, 250, 300] 1241 } 1242 } 1243 } 1245 When the Client gets the Calendar for "routingcost", it sees that the 1246 "calendar-start-time" is Monday at 00h00 GMT and member "repeated" is 1247 equal to '4'. It understands that the provided values are valid 1248 until Thursday included and will only need to get a Calendar update 1249 on Friday. 1251 5.2.4. Use case and example: ECS with a multi-cost Calendar for 1252 routingcost and owdelay 1254 In this example, it is assumed that the ALTO Server implements multi- 1255 cost capabilities, as specified in [RFC8189] . That is, an ALTO 1256 Client can request and receive values for several cost types in one 1257 single transaction. An illustrating use case is a path selection 1258 done on the basis of 2 metrics: routing cost and owdelay. 1260 As in the previous example, the IRD indicates that the ALTO Server 1261 provides "routingcost" Calendars in terms of 24 time intervals of 1 1262 hour (3600 seconds) each. 1264 For metric "owdelay", the IRD indicates that the ALTO Server provides 1265 Calendars in terms of 12 time intervals values lasting each 5 minutes 1266 (300 seconds). 1268 In the following example transaction, the ALTO Client sends its 1269 request on Tuesday July 1st 2019 at 13:15. 1271 This example assumes that the values of metric "owdelay" and 1272 "routingcost" are encoded in 3 digits. 1274 POST calendar/endpointcost/lookup HTTP/1.1 1275 Host: custom.alto.example.com 1276 Content-Length: 390 1277 Content-Type: application/alto-endpointcostparams+json 1278 Accept: application/alto-endpointcost+json,application/alto-error+json 1280 { 1281 "cost-type" : {}, 1282 "multi-cost-types" : [ 1283 {"cost-mode" : "numerical", "cost-metric" : "routingcost"}, 1284 {"cost-mode" : "numerical", "cost-metric" : "owdelay"} 1285 ], 1286 "calendared" : [true, true], 1287 "endpoints" : { 1288 "srcs": [ "ipv4:192.0.2.2" ], 1289 "dsts": [ 1290 "ipv4:192.0.2.89", 1291 "ipv4:198.51.100.34", 1292 "ipv4:203.0.113.45", 1293 "ipv6:2001:db8::10" 1294 ] 1295 } 1296 } 1298 HTTP/1.1 200 OK 1299 Content-Length: 2165 1300 Content-Type: application/alto-endpointcost+json 1302 { 1303 "meta" : { 1304 "multi-cost-types" : [ 1305 {"cost-mode" : "numerical", "cost-metric" : "routingcost"}, 1306 {"cost-mode" : "numerical", "cost-metric" : "owdelay"} 1307 ], 1308 "calendar-response-attributes" : [ 1309 {"cost-type-names" : [ "num-routingcost" ], 1310 "calendar-start-time" : "Mon, 30 Jun 2019 00:00:00 GMT", 1311 "time-interval-size" : 3600, 1312 "number-of-intervals" : 24, 1313 "repeated": 4 }, 1314 {"cost-type-names" : [ "num-owdelay" ], 1315 "calendar-start-time" : "Tue, 1 Jul 2019 13:00:00 GMT", 1316 "time-interval-size" : 300, 1317 "number-of-intervals" : 12} 1318 ] 1319 }, 1320 "endpoint-cost-map" : { 1321 "ipv4:192.0.2.2": { 1322 "ipv4:192.0.2.89" : [[100, 100, 100, 100, 100, 150, 1323 200, 300, 300, 300, 300, 250, 1324 250, 300, 300, 300, 300, 300, 1325 400, 250, 250, 200, 150, 150], 1326 [ 20, 400, 20, 80, 80, 90, 1327 100, 90, 60, 40, 30, 20]], 1328 "ipv4:198.51.100.34" : [[ 80, 80, 80, 80, 150, 150, 1329 250, 400, 400, 450, 400, 200, 1330 200, 350, 400, 400, 400, 350, 1331 500, 200, 200, 200, 100, 100], 1333 [ 20, 20, 50, 30, 30, 30, 1334 30, 40, 40, 30, 20, 20]], 1335 "ipv4:203.0.113.45" : [[300, 400, 250, 250, 200, 150, 1336 150, 100, 100, 100, 100, 100, 1337 100, 100, 100, 100, 100, 150, 1338 200, 300, 300, 300, 300, 250], 1339 [100, 90, 80, 60, 50, 50, 1340 40, 40, 60, 90, 100, 80]], 1341 "ipv6:2001:db8::10" : [[200, 250, 300, 300, 300, 300, 1342 250, 300, 300, 300, 300, 350, 1343 300, 400, 250, 150, 100, 100, 1344 100, 150, 200, 250, 250, 300], 1345 [ 40, 40, 40, 40, 50, 50, 1346 50, 20, 10, 15, 30, 40]] 1347 } 1348 } 1349 } 1351 When receiving the response, the Client sees that the Calendar values 1352 for metric "routingcost" are repeated for 4 iterations. Therefore, 1353 in its next requests until the "routingcost" Calendar is expected to 1354 change, the Client will only need to request a Calendar for 1355 "owdelay". 1357 Without the ALTO Calendar extensions, the ALTO Client would have no 1358 clue on the dynamicity of the metric value change and would spend 1359 needless time requesting values at an inappropriate pace. In 1360 addition, without the Multi-Cost ALTO capabilities, the ALTO Client 1361 would duplicate this waste of time as it would need to send one 1362 request per cost metric. 1364 6. IANA Considerations 1366 This document does not define any new media types or introduce any 1367 new IANA considerations. 1369 7. Security Considerations 1371 As an extension of the base ALTO protocol [RFC7285], this document 1372 fits into the architecture of the base protocol, and hence the 1373 Security Considerations (Section 15) of [RFC7285] fully apply when 1374 this extension is provided by an ALTO Server. For example, the same 1375 authenticity and integrity considerations (Section 15.1 of [RFC7285] 1376 still fully apply; the same considerations for the privacy of ALTO 1377 users (Section 15.4 of [RFC7285]) also still fully apply. 1379 The calendaring information provided by this extension requires 1380 additional considerations on three security considerations discussed 1381 in [RFC7285]: potential undesirable guidance to Clients (Section 15.2 1382 of [RFC7285]), confidentiality of ALTO information (Section 15.2 of 1383 [RFC7285]), and availability of ALTO (Section 15.5 of [RFC7285]). 1384 For example, by providing network information in the future in a 1385 Calendar, this extension may improve availability of ALTO, when the 1386 ALTO Server is unavailable but related information is already 1387 provided in the Calendar. 1389 For confidentiality of ALTO information, an operator should be 1390 cognizant that this extension may introduce a new risk: a malicious 1391 ALTO Client may get information for future events that are scheduled 1392 through Calendaring. Possessing such information, the malicious 1393 Client may use it to generate massive connections to the network at 1394 times where its load is expected to be high. 1396 To mitigate this risk, the operator should address the risk of ALTO 1397 information being leaked to malicious Clients or third parties. As 1398 specified in Section 15.3.2 ("Protection Strategies") of [RFC7285], 1399 the ALTO Server should authenticate ALTO Clients and use the 1400 Transport Layer Security (TLS) protocol so that Man In The Middle 1401 (MITM) attacks to intercept an ALTO Calendar are not possible. 1402 [RFC7285] ensures the availability of such a solution in its 1403 Section 8.3.5. "Authentication and Encryption", which specifies 1404 that: "ALTO Server implementations as well as ALTO Client 1405 implementations MUST support the "https" URI scheme of [RFC2818] and 1406 Transport Layer Security (TLS) of [RFC5246]". 1408 [RFC8446] specifies TLS 1.3 and writes in its section 1: "While TLS 1409 1.3 is not directly compatible with previous versions, all versions 1410 of TLS incorporate a versioning mechanism which allows Clients and 1411 Servers to interoperably negotiate a common version if one is 1412 supported by both peers". ALTO Clients and Servers SHOULD support 1413 both TLS 1.3 [RFC8446] and TLS 1.2 [RFC5246], and MAY support and use 1414 newer versions of TLS as long as the negotiation process succeeds. 1416 The operator should be cognizant that the preceding mechanisms do not 1417 address all security risks. In particular, they will not help in the 1418 case of "malicious Clients" possessing valid authentication 1419 credentials. The threat here is that legitimate Clients have become 1420 subverted by an attacker and are now 'bots' being asked to 1421 participate in a DDoS attack. The Calendar information now becomes 1422 valuable in knowing exactly when to perpetrate a DDoS attack. A 1423 mechanism such as a monitoring system that detects abnormal behaviors 1424 may still be needed. 1426 To avoid malicious or erroneous guidance from ALTO information, an 1427 ALTO Client should be cognizant that using calendaring information 1428 can have risks: (1) Calendar values, especially in "repeated" 1429 Calendars may be only statistical, and (2) future events may change. 1430 Hence, a more robust ALTO Client should adapt and extend protection 1431 strategies specified in Section 15.2 of [RFC7285]. For example, to 1432 be notified immediately when a particular ALTO value that the Client 1433 depends on changes, it is RECOMMENDED that both the ALTO Client and 1434 ALTO Server using this extension support "ALTO Incremental Updates 1435 Using Server-Sent Events(SSE)" Service 1436 [I-D.ietf-alto-incr-update-sse]. 1438 Another risk of erroneous guidance appears when the Server exposes an 1439 occurrence of a same cost type name in different elements of the 1440 Calendar objects array associated to an information resource. In 1441 this case, there is no way for the Client to figure out which 1442 Calendar object in the array is valid. The specification in this 1443 document recommends, in this case, that the Client uses the first 1444 encountered Calendar object occurrence containing the cost type name. 1445 However, the Client may want to avoid the risks of erroneous guidance 1446 associated to the use of potentially invalid Calendar values. To 1447 this end, as an alternative to the recommendation in this document, 1448 the Client MAY ignore the totality of occurences of 1449 CalendarAttributes objects containing the cost type name and query 1450 this cost type using [RFC7285]. 1452 8. Operational Considerations 1454 It is important that both the operator of the network and the 1455 operator of the applications consider both the feedback aspect and 1456 the prediction-based (uncertainty) aspect of using the Cost Calendar. 1458 First consider the feedback aspect and consider the Cost Calendar as 1459 a traffic-aware map service (e.g., Google Maps). Using the service 1460 without considering its own effect, a large fleet can turn a not- 1461 congested road into a congested one; a large number of individual 1462 cars each choosing a road with light traffic ("cheap link") can also 1463 result in congestion or result in a less optimal global outcome 1464 (e.g., the Braess' Paradox [Braess-paradox]). 1466 Next consider the prediction aspect. Conveying ALTO Cost Calendars 1467 tends to reduce the on-the-wire data exchange volume compared to 1468 multiple single cost ALTO transactions. An application using 1469 Calendars has a set of time-dependent values upon which it can plan 1470 its connections in advance with no need for the ALTO Client to query 1471 information at each time. Additionally, the Calendar response 1472 attribute "repeated", when provided, saves additional data exchanges 1473 in that it indicates that the ALTO Client does not need to query 1474 Calendars during a period indicated by this attribute. The preceding 1475 is true only when "accidents" do not happen. 1477 Although individual network operators and application operators can 1478 choose their own approaches to address the aforementioned issues, 1479 this document recommends the following considerations. First, a 1480 typical approach to reducing instability and handling uncertainty is 1481 to ensure timely update of information. The SSE Service as discussed 1482 in Section 7 can handle updates, if supported by both the Server and 1483 the Client. Second, when a network operator updates the Cost 1484 Calendar and when an application reacts to the update, they should 1485 consider the feedback effects. This is the best approach even though 1486 there is theoretical analysis [Selfish-routing-Roughgarden-thesis] 1487 and Internet based evaluation [Selfish-routing-Internet-eval] showing 1488 that uncoordinated behaviors do not always cause substantial sub- 1489 optimal results. 1491 High-resolution intervals may be needed when values change, sometimes 1492 during very small time intervals but in a significant manner. A way 1493 to avoid conveying too many entries is to leverage on the "repeated" 1494 feature. A Server can smartly set the Calendar start time and number 1495 of intervals so as to declare them "repeated" for a large number of 1496 periods, until the Calendar values change and are conveyed to 1497 requesting Clients. 1499 The newer JSON Data Interchange Format specification [RFC8259] used 1500 in ALTO Calendars replaces the older one [RFC7159] used in the base 1501 ALTO protocol [RFC7285]. The newer JSON mandates UTF-8 text encoding 1502 to improve interoperability. Therefore, ALTO Clients and Servers 1503 implementations using UTF-{16,32} need to be cognizant of the 1504 subsequent interoperability risks and MUST switch to UTF-8 encoding, 1505 if they want to interoperate with Calendar-aware Servers and Clients. 1507 9. Acknowledgements 1509 The authors would like to thank Fred Baker, Li Geng, Diego Lopez, He 1510 Peng and Haibin Song for fruitful discussions and feedback on earlier 1511 draft versions. Dawn Chan, Kai Gao, Vijay Gurbani, Yichen Qian, 1512 Juergen Schoenwaelder, and Brian Weis and Jensen Zhang provided 1513 substantial review feedback and suggestions to the protocol design. 1515 10. References 1517 10.1. Normative References 1519 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1520 Requirement Levels", BCP 14, RFC 2119, 1521 DOI 10.17487/RFC2119, March 1997, 1522 . 1524 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1525 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1526 DOI 10.17487/RFC7231, June 2014, 1527 . 1529 [RFC7285] Alimi, R., Ed., Penno, R., Ed., Yang, Y., Ed., Kiesel, S., 1530 Previdi, S., Roome, W., Shalunov, S., and R. Woundy, 1531 "Application-Layer Traffic Optimization (ALTO) Protocol", 1532 RFC 7285, DOI 10.17487/RFC7285, September 2014, 1533 . 1535 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1536 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1537 May 2017, . 1539 [RFC8189] Randriamasy, S., Roome, W., and N. Schwan, "Multi-Cost 1540 Application-Layer Traffic Optimization (ALTO)", RFC 8189, 1541 DOI 10.17487/RFC8189, October 2017, 1542 . 1544 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1545 Interchange Format", STD 90, RFC 8259, 1546 DOI 10.17487/RFC8259, December 2017, 1547 . 1549 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1550 (TLS) Protocol Version 1.2", RFC 5246, 1551 DOI 10.17487/RFC5246, August 2008, 1552 . 1554 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1555 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1556 . 1558 [I-D.ietf-alto-incr-update-sse] 1559 Roome, W. and Y. Yang, "ALTO Incremental Updates Using 1560 Server-Sent Events (SSE)", draft-ietf-alto-incr-update- 1561 sse-20 (work in progress), February 2020. 1563 [IEEE.754.2008] 1564 "Standard for Binary Floating-Point Arithmetic, IEEE 1565 Standard 754", August 2008. 1567 10.2. Informative References 1569 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 1570 DOI 10.17487/RFC2818, May 2000, 1571 . 1573 [RFC5693] Seedorf, J. and E. Burger, "Application-Layer Traffic 1574 Optimization (ALTO) Problem Statement", RFC 5693, 1575 DOI 10.17487/RFC5693, October 2009, 1576 . 1578 [RFC6708] Kiesel, S., Ed., Previdi, S., Stiemerling, M., Woundy, R., 1579 and Y. Yang, "Application-Layer Traffic Optimization 1580 (ALTO) Requirements", RFC 6708, DOI 10.17487/RFC6708, 1581 September 2012, . 1583 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1584 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 1585 2014, . 1587 [I-D.ietf-alto-performance-metrics] 1588 WU, Q., Yang, Y., Dhody, D., Randriamasy, S., and L. 1589 Contreras, "ALTO Performance Cost Metrics", draft-ietf- 1590 alto-performance-metrics-09 (work in progress), March 1591 2020. 1593 [I-D.xiang-alto-multidomain-analytics] 1594 Xiang, Q., Zhang, J., Le, F., Yang, Y., and H. Newman, 1595 "Resource Orchestration for Multi-Domain, Exascale, Geo- 1596 Distributed Data Analytics", draft-xiang-alto-multidomain- 1597 analytics-03 (work in progress), March 2020. 1599 [SENSE-sdn-e2e-net] 1600 "SDN for End-to-End Networked Science at the Exascale 1601 (SENSE), http://sense.es.net/overview". 1603 [Braess-paradox] 1604 Steinberg, R. and W. Zangwill, "The Prevalence of Braess' 1605 Paradox", Transportation Science Vol. 17 No. 3, August 1606 1983. 1608 [Unicorn-fgcs] 1609 Xiang, Q., Wang, T., Zhang, J., Newman, H., and Y. Liu, 1610 "Unicorn: Unified resource orchestration for multi-domain, 1611 geo-distributed data analytics", Future Generation of 1612 Computer Systems (FGCS) Volume 93, Pages 188-197, April 1613 2019. 1615 [Selfish-routing-Roughgarden-thesis] 1616 Roughgarden, T., "Selfish Routing", Dissertation Thesis, 1617 Cornell 2002, May 2002. 1619 [Selfish-routing-Internet-eval] 1620 Qiu, L., Yang, Y., Zhang, Y., and S. Shenker, "Selfish 1621 Routing in Internet-LIke Environments", Proceedings of ACM 1622 SIGCOMM 2001, August 2001. 1624 Authors' Addresses 1626 Sabine Randriamasy 1627 Nokia Bell Labs 1628 Route de Villejust 1629 NOZAY 91460 1630 FRANCE 1632 Email: Sabine.Randriamasy@nokia-bell-labs.com 1634 Richard Yang 1635 Yale University 1636 51 Prospect st 1637 New Haven, CT 06520 1638 USA 1640 Email: yry@cs.yale.edu 1642 Qin Wu 1643 Huawei 1644 101 Software Avenue, Yuhua District 1645 Nanjing, Jiangsu 210012 1646 China 1648 Email: sunseawq@huawei.com 1650 Lingli Deng 1651 China Mobile 1652 China 1654 Email: denglingli@chinamobile.com 1656 Nico Schwan 1657 Thales Deutschland 1658 Lorenzstrasse 10 1659 Stuttgart 70435 1660 Germany 1662 Email: nico.schwan@thalesgroup.com