11

如何在分布式场景下生成全局唯一 ID ?

 4 years ago
source link: https://juejin.im/post/5e2ffac26fb9a02fba3a33e5
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
在分布式系统中,有一些场景需要使用全局唯一 ID ,可以和业务场景有关,比如支付流水号,也可以和业务场景无关,比如分库分表后需要有一个全局唯一 ID,或者用作事务版本号、分布式链路追踪等等,好的全局唯一 ID 需要具备这些特点: 全局唯一:这是最基本的要求,

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK