Search squid archive

Re: acl / format code evaluation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/5/21 11:00 AM, Jason Spashett wrote:

> On the subject of unique ids, the code %random isn't necessarily of my
> choosing. But it has 54^8 combinations,

The number of unique values and the period of the random number
generator are largely irrelevant here. What matters here is how soon the
generator will repeat a _single_ value. Many random number generators
repeat too soon, but most random number generators descriptions do not
mention that fact because it is irrelevant for most things random
numbers are (designed to be) used for.

I do not know how soon your random number generator will repeat a single
value, and I would worry about that if global uniqueness is the goal.


> I think you are suggesting that a "proper" UUID may be better

What is "better" depends on your desired uniqueness scope. If one does
not care about cross-instance uniqueness and kid restarts, then an
ever-increasing 64-bit integer counter is the best for them. This is
similar to what %master_xaction provides.


> Given that %master_axtion is a counter which resets when you restart
> squid, and is not unique among squids (or restarts), is there not a
> case to be made for making one available?

Yes, there is absolutely such a use case! It can already be addressed
via external ACLs, but a quality pull request adding native UUID support
to globally-uniquely identify Squid processes (%process_uuid) should be
welcomed IMO. The combination of (slowly computed once per process)
%process_uuid and (fast) %master_xaction ID would give many admins what
they want.


Cheers,

Alex.
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux