trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

SnowflakeID for organizationally unique identifiers

Open bneradt opened this issue 7 months ago • 2 comments

UUID values are 128 bit values designed to be univerally unique identifiers across all practical uses and environments. Snowflake ID values are 64 bit values that are designed with a more limited goal: to be unique across all values in a single organization. By limiting their scope, they limit their size which is helpful for performance and storage needs.

This updates the connection id to use SnowflakeID values so that they are unique across reboots and typically unique across ATS instances in a cdn.

This also adds psfid, a logging field similar to puuid, but that logs the process's snowflake ID instead of its UUID.

Depends upon: #12264

bneradt avatar May 31 '25 22:05 bneradt

IMO, we shouldn't use ink_ filenames for new code, but just some PascalCase.cc file like the other newer files in tscore.

cmcfarlen avatar Jun 02 '25 16:06 cmcfarlen

IMO, we shouldn't use ink_ filenames for new code, but just some PascalCase.cc file like the other newer files in tscore.

Yeah, that makes sense. I followed the precedent set by the uuid logic because this seemed similar. But I agree...I'll change this to SnowflakeID.{cc,h}.

bneradt avatar Jun 02 '25 23:06 bneradt