Multi-Cost Application-Layer Traffic Optimization (ALTO)
Extracted elements (21)
Only the Filtered Cost Map and Endpoint Cost Map Services are extended (not the full cost map) because full cost map resources are GET-mode requests, and a legacy ALTO Client cannot interpret 'multi-cost-types' in 'meta' or array-valued cost entries.
The multi-cost extension restricts to Filtered Cost Map and Endpoint Cost Map Services only (not full cost maps) to ensure compatibility with legacy ALTO Clients, relying on the base protocol requirement that ALTO Clients MUST ignore unknown fields.
Using an integer index '[#]' in constraint predicates to refer to cost types was chosen to minimize expression length for constraints combining multiple OR and AND expressions, following the shortest path from the constraint design in RFC 7285.
Legacy ALTO Clients will ignore the 'max-cost-types' capability and send single-cost requests using 'cost-type'; the Server will respond with a legacy single-valued cost map. Multi-cost-aware Clients detect 'max-cost-types' and use 'multi-cost-types' instead.
'testable-cost-type-names' and 'cost-constraints' are mutually exclusive in the IRD capabilities to prevent legacy Clients from issuing constraint tests on cost types that are not actually testable.
Each name in 'testable-cost-type-names' MUST also be in 'cost-type-names', and if 'testable-cost-type-names' is present the 'cost-constraints' capability MUST NOT be true.
If 'cost-constraints' is true, the resource MUST accept constraint tests on any cost type in 'cost-type-names', and the 'testable-cost-type-names' capability MUST NOT be present.
In multi-cost responses, if a cost type is not available for a particular source/destination pair, the ALTO Server MUST use the JSON 'null' value for that array element; if none of the cost types are available, the Server MAY omit the entry entirely.
The Client MUST NOT use 'multi-cost-types' unless the resource's 'max-cost-types' capability exists and has a value greater than 0, and this field MUST NOT have more than 'max-cost-types' cost types.
The Client MUST specify either 'cost-type' or 'multi-cost-types' but MUST NOT specify both. When placing a single cost request as in RFC 7285, a Client MUST use 'cost-type'.
The 'or-constraints' parameter MAY only be specified if the resource's 'max-cost-types' capability has a value greater than 0 and the resource allows constraint tests; it MUST NOT be specified if 'constraints' is also specified.
A multi-cost map extends the standard ALTO cost map by using JSON arrays as cost values instead of single numbers, with the 'multi-cost-types' field in 'meta' mapping array positions to cost metrics (e.g., [routingcost, hopcount]).
Extended constraint predicates take the form '[#] op value', where '#' is an optional zero-based index into 'testable-cost-types' (or 'multi-cost-types' if 'testable-cost-types' is absent), defaulting to index 0, enabling per-metric constraint tests.
In a multi-cost response, the 'meta' field sets 'cost-type' to {} (for backwards compatibility) and adds 'multi-cost-types' with the same value as the request's 'multi-cost-types' parameter; cost values are JSONArrays ordered to match 'multi-cost-types'.
The 'max-cost-types' capability is added to FilteredCostMapCapabilities and EndpointCostService capabilities; its presence signals multi-cost extension support, and its value N indicates the maximum number of cost types returnable per request.
The 'or-constraints' field is a JSONArray of JSONArrays of extended constraint predicate strings, interpreted as the logical OR of ANDs; it MUST NOT be specified together with 'constraints', and MUST NOT contain any empty inner array.
The ReqFilteredCostMap object is extended with optional fields: 'multi-cost-types' (array of CostType), 'testable-cost-types' (array of CostType), and 'or-constraints' (array of arrays of constraint predicate strings), alongside the existing 'cost-type' and 'constraints' fields.
The 'testable-cost-type-names' capability, added to FilteredCostMapCapabilities, restricts constraint tests to a named subset of cost types and MUST be a subset of 'cost-type-names'. It is mutually exclusive with 'cost-constraints: true'.
The 'testable-cost-types' request parameter lists cost types used only for constraint tests; if omitted, it defaults to the cost types in 'multi-cost-types' or 'cost-type'. This allows filtering by a metric without returning its values.
Queries for multiple cost metrics represent a stronger fingerprinting signal than single-metric queries, potentially leaking more information about the ALTO Client; however, linking individual queries via source IP address may already be possible.
The multi-cost extension tends to reduce on-the-wire data volume compared to multiple single-cost ALTO transactions, and multi-cost constraints further filter Server responses, moderating the risk of massive multi-cost requests.