아래의 배경 설명은 아직 번역되지 않아 영어로 표시됩니다.
UUID 소개
The format predates the web. In the early 1980s Apollo Computer needed identifiers that any machine on a network could mint without asking a central authority, and built 64-bit unique IDs into its Domain/OS. The idea moved into Apollo's Network Computing System, widened to 128 bits, and from there into the Open Software Foundation's Distributed Computing Environment RPC specification at the start of the 1990s. Microsoft adopted the DCE design for COM and called the result a GUID — the same sixteen bytes, but historically printed with the first three fields byte-swapped, which is why one identifier can appear in two different spellings.
Paul Leach, Michael Mealling and Rich Salz finally wrote the format down for the IETF in July 2005 as RFC 4122, which registered the urn:uuid namespace and defined five versions: time-and-MAC (1), DCE Security (2), MD5 name-based (3), random (4) and SHA-1 name-based (5). ISO and the ITU standardised the same object as ISO/IEC 9834-8 and ITU-T X.667. Version 1's embedded MAC address turned out to be a privacy leak — GUIDs written into Microsoft Office documents carried the author's network card address, and this is widely reported to have helped investigators identify the author of the 1999 Melissa macro virus, though the accounts are second-hand.
Version 4 won on simplicity and then lost on database performance: random keys scatter inserts across a B-tree index instead of landing at its right-hand edge. Developers built time-ordered alternatives of their own — MongoDB's ObjectId in 2009, Twitter's Snowflake in 2010, Alizain Feerasta's ULID in 2016. A draft by Brad Peabody and Kyzer Davis folded that lesson back into the standard, and in May 2024 RFC 9562 replaced RFC 4122, adding version 6, version 7 (48 bits of Unix milliseconds followed by randomness, so the lowercase text form sorts by creation time) and version 8 for custom layouts.
주요 성질
- The canonical text form is 36 characters: 32 hexadecimal digits in groups of 8-4-4-4-12 separated by four hyphens.
- A version 4 UUID carries 122 random bits — 128 minus 4 version bits and 2 variant bits — giving 2^122 ≈ 5.3 × 10^36 possible values.
- The version is the first hex digit of the third group; the variant occupies the top bits of the first hex digit of the fourth group, which for RFC 4122 and RFC 9562 UUIDs is 8, 9, a or b.
- Drawing 103 trillion random version 4 UUIDs gives roughly a one-in-a-billion chance that two of them are identical, by the birthday approximation n²/2N.
- A version 7 UUID begins with a 48-bit big-endian count of milliseconds since the Unix epoch, so sorting the lowercase text form sorts by creation time.
- The nil UUID is all 128 bits zero; RFC 9562 also defines a Max UUID with all 128 bits set.
- RFC 9562 (May 2024) obsoletes RFC 4122 (July 2005) and adds versions 6, 7 and 8 to the original five.
- The UUIDs on this page are produced by a seeded, non-cryptographic PRNG and are reproducible by anyone with the link, so they are deliberately unsuitable as real identifiers.
등장하는 곳
- Windows stores COM class and interface identifiers as braced GUIDs in the registry, which is where the {8-4-4-4-12} spelling comes from.
- Linux labels filesystems by UUID — the identifiers in /etc/fstab and the GPT partition table — so disks can be mounted regardless of the order the kernel enumerated them in.
- Databases use UUIDs as primary keys when many clients must mint identifiers without coordinating; version 7 exists mainly because its time ordering keeps B-tree inserts near the right-hand edge of the index.
- Distributed tracing systems use UUIDs as request and span identifiers so that log lines from different services can be stitched back together.
- Apple exposes UUIDs through NSUUID and uses one as the identifier-for-vendor that an app sees in place of a device serial number.
- A version 4 UUID is only as unique as the random source behind it: libraries that have backed one with a weak or predictable generator have produced real collisions, which is a property of the implementation rather than of the format.
이 생성기 사용법
생성된 값은 위쪽에 표시되고 옆에 복사 단추가 있습니다. 이미지로 만들려면 이미지 만들기의 스타일에서 모양을 고르고, 내보내기 크기를 정한 뒤 PNG·JPEG·WebP로 내려받으세요. 모두 브라우저에서 그려지므로 생성한 내용이 서버로 전송되지 않습니다.
작업하는 동안 주소창이 갱신되므로, 링크는 항상 지금 보이는 상태를 그대로 재현합니다. 특정 수열을 공유하거나 설정을 저장해 두기에 좋습니다. 값을 일반 텍스트로 가져가려면 복사를, CSV·JSON·NDJSON·SQL·XML이 필요하면 데이터 내보내기를 사용하세요.
출처
- Universally unique identifier — Wikipedia — CC BY-SA 4.0
- RFC 9562 — Universally Unique IDentifiers (UUIDs) — IETF Trust (BCP 78) — redistribution permitted
- RFC 4122 — A UUID URN Namespace (obsoleted by RFC 9562) — IETF Trust (BCP 78) — redistribution permitted
- Birthday problem — Wikipedia — CC BY-SA 4.0
이 페이지의 역사적 설명은 위에 나열한 공개 라이선스 자료를 바탕으로 합니다. 잘못된 내용을 발견하셨나요? 알려주시면 바로잡겠습니다.