Distributed sequence number generation?

后端 未结 13 1962
小鲜肉
小鲜肉 2020-11-29 14:32

I\'ve generally implemented sequence number generation using database sequences in the past.

e.g. Using Postgres SERIAL type http://www.neilconway.o

13条回答
  •  臣服心动
    2020-11-29 15:20

    If it really has to be globally sequential, and not simply unique, then I would consider creating a single, simple service for dispensing these numbers.

    Distributed systems rely on lots of little services interacting, and for this simple kind of task, do you really need or would you really benefit from some other complex, distributed solution?

提交回复
热议问题