Re: New Version Notification for draft-nottingham-structured-headers-00.txt

On 02/11/17 19:06, Willy Tarreau wrote:
> On Thu, Nov 02, 2017 at 10:05:31AM +0900, Kazuho Oku wrote:
>> What I am arguing is that we should allow applications to send all
>> integers (especially all of those that fit into 64-bit) using series
>> of digits, rather than requiring use of strings, labels, or base64 for
>> storing them.
>>
>> In my view, an application would not be enforced to handle every
>> number represented by a 64-bit number even if Structured Headers
>> defines handling of 64-bit numbers as a minimal requirement. For
>> example, you cannot download a file of 1EiB size, unless your
>> filesystem supports storing such large files.
> 
> ... or you're forwarding it because you're an intermediary :-)
> 

Or its not a file size at all but some other value related to large 
files. ie frame counters on long-lived video feeds, Range etc.

Squid already is used on various academic networks where the datasets 
are so huge they have to be chunked by the TB. The Content-Range values 
on those messages can be amazing. I don't see those requirements getting 
any smaller in future.


>> Assuming that we would not be actually using all the numbers sent
>> using Structured Headers, it makes sense to delay converting them to
>> internal numeric representation (i.e. `int64_t`) until it becomes
>> necessary. In fact, many of us already have such kind of optimization.
>> For example, many of the HTTP clients keep the Last-Modified header in
>> string received as-is, since it is seldom required to make
>> calculations using the value. It is wise to keep them as strings (and
>> send them as part of the If-Modified-Sence header). What I am
>> suggesting is that the fields of Structured Headers can be handled the
>> same way.
> 
> That's a good point. In haproxy the only integers we always parse are
> the content-length (which requires a lot of care including for duplicate
> values etc), and the chunk sizes. The rest is optional. I suspect that
> caches like Varnish and Squid have to deal a lot with dates.

Date are not so much of a problem for integer parsing. Age / max-age are 
more the worry as they are just on the brink of 32-bit being 
insufficient for edge cases involving archival content.

Amos

Received on Thursday, 2 November 2017 09:57:28 UTC