Token can be used in java to intercept repeated submissions.
Is there any plug-in or module in nodejs to solve this security problem? .
In theory, the simpler the better. . . Queue or something, alas. .
The simplest way is to restrict on the client side and cannot initiate another request until the last request has not responded.
There are also many methods on the server side.
The simplest way to prevent duplicate data writing is at the database level
Use some RateLimit to define how many times the same operation cannot be performed within a specified time. If you use Express, you can use this.https://github.com/nfriedly/express-rate-limit
As you mentioned, using queue writing
Each submission requires one token, and each token can only be used once.