Hacker GitHub

← All repos

twitter-archive/snowflake

View on GitHub ↗ ★ 7,754 Scala archived

Snowflake is a network service for generating unique ID numbers at high scale with some simple guarantees.

23 mentions on Hacker News by 22 people: 1 story, 22 comments · first 2010-09-19 · latest 2026-05-11

Mentions per year 23 mentions · busiest year 2012 (6)
20082026
  1. There is source code available for it (although the repo's retired): https://github.com/twitter-archive/snowflake/blob/b3f6a3c6ca... Basically one big server had a number of threads each requesting the next value in the sequence on that…
    comment by benoau · 2026-05-11 · in Tell me why this UUID pattern is stupid
  2. …look into vector clocks[1] or snowflake[2][3] [1] https://en.wikipedia.org/wiki/Vector_clock [2] https://github.com/twitter-archive/snowflake/tree/snowflake-... [3] https://en.wikipedia.org/wiki/Snowflake_ID
    comment by syncsynchalt · 2024-08-26 · in TIL: Versions of UUID and when to use them
  3. …open sourced back in 2010 [0]. Looks like it was added in this commit [1] from August 2010. [0] https://github.com/twitter-archive/snowflake/blob/snowflake-... [1] https://github.com/twitter-archive/snowflake/commit/ba2e67ea...
    comment by karlding · 2020-12-01 · in I Made a Self-Quoting Tweet
  4. …has been retired in 2014 [1]. Are there any similar services around that are still maintained? [1]: https://github.com/twitter/snowflake
    comment by piquadrat · 2017-11-30 · in Auto increment is a terrible idea
  5. …that would require changes in the business logic: making IDs globally unique and sortable ala https://github.com/twitter/snowflake; deprecating but keeping around old APIs as new ones are added; "Ball of Mud" refactorings; isolated…
  6. For internal purposes, a 64 bit GUID will be sufficient. Look how Twitter uses Snowflake - https://github.com/twitter/snowflake - that's a scalable way to generate unique IDs which won't ever be revealed to the user. For default user…
  7. Twitter's Snowflake, though it's gone now. The principle is the same. https://github.com/twitter/snowflake .
  8. Twitter came up with a different scheme called Snowflake ( https://github.com/twitter/snowflake ).
    comment by lectrick · 2014-10-31 · in How long do GUIDs really need to be?
  9. …snowflake Twitter post (which has since been removed). Looks like Twitter has retired Snowflake: https://github.com/twitter/snowflake https://github.com/mumrah/flake-java
  10. He could have just Googled. I think Twitter's Snowflake came to some very similar conclusions. https://github.com/twitter/snowflake/ I even wrote something in Ruby as an idea based off it (although it hasn't been used in production yet)…
    comment by lectrick · 2014-05-18 · in Distributed ID Generation and Bit Packing
  11. …[5] (snippit'ed here [6]). [1] http://code.flickr.net/2010/02/08/ticket-servers-distributed... [2] https://github.com/twitter/snowflake [3] https://github.com/boundary/flake [4] http://boundary.com/blog/2012/01/12/flake-a-decentralized-k-..…
  12. …scales, so I don't see time getting much easier barring some revolutionary timekeeping system. [0] https://github.com/twitter/snowflake
  13. Twitter played with writing a UUID service a while back called Snowflake. https://github.com/twitter/snowflake
    comment by chuhnk · 2012-12-29 · in Show HN: UUID as a Service
  14. …really articulate who was put off by their use of Rails? Edit: To avoid confusion, Snowflake as in https://github.com/twitter/snowflake , not "snowflake schema".
    comment by encoderer · 2012-08-13 · in App.net funded with $500,000.
  15. …you're assuming that Twitter sees a constant rate of signups wrt time, which I highly doubt. [1] https://github.com/twitter/snowflake/blob/master/src/main/sc...
  16. Read up on Snowflake. https://github.com/twitter/snowflake 64 bits broken up into a timestamp, machine id, and id number.
  17. …their technology to meet their requirements, thanks for the link. Of course Twitter have snowflake: https://github.com/twitter/snowflake and many other tools such as UUID[4r] - see an old discussion on HN:…
  18. For those interested, there is also Snowflake by Twitter on GitHub https://github.com/twitter/snowflake
  19. …ids, but needed ids that increase over time (so that you can sort tweets by them). hence, snowflake: http://github.com/twitter/snowflake
  20. …a different fashion which is causing the issue. This seems to be the relevant id generating code: https://github.com/twitter/snowflake/blob/master/src/main/sc...
  21. Curious about this in snowflake (mentioned in slides): https://github.com/twitter/snowflake/blob/master/src/main/sc... def nextId(): Long = synchronized { var timestamp = timeGen() if (lastTimestamp > timestamp) { log.warning("clock is…
    comment by devmonk · 2010-11-22 · in NoSQL at Twitter
  22. …is a network service for generating unique ID numbers at high scale with some simple guarantees. http://github.com/twitter/snowflake Kellan (from Flickr) has a neat post about Ticket servers : http://laughingmeme.org/2010/02/08/ticket-serve…