-
Notifications
You must be signed in to change notification settings - Fork 6
Client network location based CDN selection using ALTO
Each CDN can be configured with a Client IP whitelist. This contains the list of all the networks that are allowed to be directed to the CDN.
Typically network operators would use this feature to direct On-Net customers to their own in-house CDN, while directing off-net customers to a global CDN such as Akamai. The whitelist defines which networks are allowed to use the in-house CDN, and all client IPs outside of these ranges are directed to an alternative CDN.
The list of network addresses can be managed through the Admin GUI, but in the case of large operators with many networks this could quickly become complicated. An alternative is to provide access to an Application Layer Traffic Optimization (ALTO) service, which CDN selector will use to automatically discover a list of IP ranges.
CDN Selector uses the network map, an example of which can be found at http://tools.ietf.org/html/draft-ietf-alto-protocol-17#page-41.
The network map is fetched at startup and then at regular intervals. All addresses regardless of PID are added to the whitelist, but it is possible to configure certain PIDs to be ignored.
You can use a standard web server serving static files as a test ALTO service. However, please take note of the following:
- The web server must return the correct Content-type headers. These are ‘application/alto-networkmap+json’ for network maps and ‘application/alto-directory+json’ for information resource directories.
- The application uses the version tag to notice changes to the network map. Ensure that the value of the tag changes whenever you update the document: "map-vtag": { "resource-id": "default-network-map", "tag": "1266506148" }
{
"meta": {
"cost-types": {
"num-routing": {
"cost-mode": "numerical",
"cost-metric": "routingcost",
"description": "My default"
},
"num-hop": {
"cost-mode": "numerical",
"cost-metric": "hopcount"
},
"ord-routing": {
"cost-mode": "ordinal",
"cost-metric": "routingcost"
},
"ord-hop": {
"cost-mode": "ordinal",
"cost-metric": "hopcount"
}
}
},
"resources": [{
"id": "default-network-map",
"uri": "networkmap.alton",
"media-type": "application/alto-networkmap+json"
}, {
"id": "numerical-routing-cost-map",
"uri": "http://www.ecreationmedia.tv/demo/cdns/alto/costmap/num/routingcost",
"media-type": "application/alto-costmap+json",
"capabilities": {
"cost-type-names": ["num-routing"]
},
"uses": ["default-network-map"]
}, {
"id": "numerical-hopcount-cost-map",
"uri": "http://www.ecreationmedia.tv/demo/cdns/alto/costmap/num/hopcount",
"media-type": "application/alto-costmap+json",
"capabilities": {
"cost-type-names": ["num-hop"]
},
"uses": ["default-network-map"]
}, {
"id": "custom-maps-resources",
"uri": "http://www.ecreationmedia.tv/demo/cdns/alto/maps",
"media-type": "application/alto-directory+json"
}, {
"id": "endpoint-property",
"uri": "http://www.ecreationmedia.tv/demo/cdns/alto/endpointprop/lookup",
"media-type": "application/alto-endpointprop+json",
"accepts": "application/alto-endpointpropparams+json",
"capabilities": {
"prop-types": ["pid"]
},
"uses": ["default-network-map"]
}, {
"id": "endpoint-cost",
"uri": "http:///endpointcost/lookup",
"media-type": "application/alto-endpointcost+json",
"accepts": "application/alto-endpointcostparams+json",
"capabilities": {
"cost-constraints": true,
"cost-type-names": ["num-routing", "num-hop", "ord-routing", "ord-hop"]
}
}]
}
See also http://demo.cdnexperts.net/demo/cdns/alto/directory.altod
{
"meta": {},
"data": {
"map-vtag": {
"resource-id": "default-network-map",
"tag": "1266506139"
},
"map": {
"PID1": {
"ipv4": ["192.0.2.0/24", "198.51.100.0/25"]
},
"PID2": {
"ipv4": ["198.51.100.128/25"]
},
"PID3": {
"ipv4": ["0.0.0.0/0"],
"ipv6": ["::/0"]
}
}
}
}
See also http://demo.cdnexperts.net/demo/cdns/alto/networkmap.alton