The invention provides a distributed short-chain
resource management and fault-tolerant method and
system based on a double-layer
pool architecture, and aims to solve the problems of insufficient resource competition, cursor consistency,
system fault-tolerant capability and the like in short-chain
resource management in a distributed environment. The method comprises the following steps: creating a public short chain
pool table, setting a self-increasing
primary key and a unique index, and constructing a public short chain
pool serving as a central storage warehouse; resource supplement of the public short chain pool is realized through distributed lock control and batch write-in operation; creating a private short chain pool based on a concurrent
linked list queue in a memory of each service instance, monitoring the capacity through a timed task, and getting short chains in batches to realize short chain storage; establishing a dual-storage vernier mechanism, monitoring the vernier position in real time, and performing
anomaly detection and self-repairing; and local persistence and fault-tolerant
processing of the private short chain pool are realized. According to the method, short-chain resource layered management is realized through a double-layer pool architecture, local persistence is realized, and the stability of the
system under an abnormal condition is improved.