[Nsi-wg] Topology versions

Henrik Thostrup Jensen htj at nordu.net
Fri Sep 27 07:44:56 EDT 2013


On Thu, 26 Sep 2013, John MacAuley wrote:

> I have noticed some of the NSA that support dynamic topology retrieval 
> are updating the "version" attribute of the NSA element every time a 
> retrieval occurs.  This has the unwanted side effect of appearing to be 
> a new topology each time it is retrieved.  If possible, could you only 
> update the "version" attribute after an NSA restart, or when you have 
> had an actual topology change.  This will help to reduce the churn in 
> recomputing topology when polling for updates.

Indeed.

To further reduce load HTTP has a standard mechanism that can be used for 
this: Provide a Last-modified header in the payload indicating the version 
of topology. Furthermore, the client has to specify an If-modified-since 
in the request. If the resource has not been modified since then, the 
servouce should send back a 304 with an empty body. Like this:

htj at scandium> curl -fSsihttps://nsi.nordu.net:9443/NSI/topology/nordu.net:2013.xml 
HTTP/1.1 200 OK
Date: Fri, 27 Sep 2013 11:39:14 GMT
Last-Modified: Fri, 27 Sep 2013 11:39:01 GMT
Content-Length: 4782
Content-Type: text/html
Server: TwistedWeb/11.1.0
[snip]

And:

htj at scandium> curl -i -H 'If-Modified-Since: Fri, 27 Sep 2013 11:41:40 GMT'  https://nsi.nordu.net:9443/NSI/topology/nordu.net:2013.xml
HTTP/1.1 304 Not Modified
Date: Fri, 27 Sep 2013 11:40:19 GMT
Content-Length: 0
Server: TwistedWeb/11.1.0

And I've just added in this in OpenNSA for good measure :-).

And yes, the timestamp format must be the ugly RFC850 format.

I realize this is already established functionality and has good tooling, 
and we don't get to invent our own thing, so I reckon this will meet some 
resistance :-)


     Best regards, Henrik

  Henrik Thostrup Jensen <htj at nordu.net>
  Software Developer, NORDUnet



More information about the nsi-wg mailing list