# Timeflake - 128bit, 어느정도 정렬된, URL에도 안전한 UUID

> Clean Markdown view of GeekNews topic #3633. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=3633](https://news.hada.io/topic?id=3633)
- GeekNews Markdown: [https://news.hada.io/topic/3633.md](https://news.hada.io/topic/3633.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-01-25T10:38:17+09:00
- Updated: 2021-01-25T10:38:17+09:00
- Original source: [github.com](https://github.com/anthonynsimon/timeflake)
- Points: 17
- Comments: 1

## Topic Body

- Twitter의 Snowflake , Firebase의 PushID 등과 비슷한 구현

- 빠름 : K-sortable로 어느정도 정렬

- 충분히 유니크 : 1ms당 5천만개를 만들어도 충돌 확율 10억분의 1

- 효율적 : 48비트는 밀리세컨드 단위 timestamp 인코딩 + 80비트는 암호화된 랜덤 숫자

- 유연함 : 128bit unsigned int, hex, URL-Safe base62 값으로 UUID 호환

- Python 오픈소스

## Comments



### Comment 4310

- Author: xguru
- Created: 2021-01-25T10:38:24+09:00
- Points: 1

비슷한 것으로 세그먼트가 만든 20바이트 짜리 KSUID 가 있지만 표준 128비트 UUID가 아니었죠.

https://github.com/segmentio/ksuid
