httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@decus.org (Rodent of Unusual Size)
Subject Re: sequence numbers
Date Fri, 15 Aug 1997 13:31:32 GMT
>From the fingers of Dean Gaudet flowed the following:
>
>Consider the following structure:
>
>typedef struct {
>    time_t stamp;
>    unsigned int ip_addr;
>    unsigned short child_num;
>    unsigned short counter;
>} seqno_t;
>
>During child init do this:
>
>    cur_seqno.stamp = time(0);
>    cur_seqno.child_num = child_num;
>    cur_seqno.counter = 0;
>
>On each hit, calculate a sequence number for the hit as follows:
>
>    r->seqno = cur_seqno;
>    if (++cur_seqno.counter == 0) {
>	cur_seqno.stamp = time(0);
>    }

    Um, where's the sequence number?  Or are you formulating an opaque
    sequence *identifier* from the structure-as-a-whole?

>Obviously if we're somehow able to serve > 65535 requests in a single
>second by a single child then uniqueness breaks down.  It also requires
>that the physical addresses of the machines in a cluster differ ... but,
>well, that's essentially a requirement of building the cluster in the
>first place.

    +1 on the concept, sure.  But.. how about allowing for a) more than
    64K requests, and b) IPv6 addresses.

    #ken    :-)}

Mime
View raw message