Contents

distributed id

the way of generating unique id

  1. uuid 128bit

    1. random
    2. too long
  2. snowflake 62bit

    1. increasing trend
  3. mysql auto_increatement

    1. strongly depond on db

the problem of snowflake

  1. clock back 1.

  2. can’t guaratted to always bigger than enver