T-PWK / flake-idgen

Flake ID generator yields k-ordered, conflict-free ids in a distributed environment in Node.js
https://www.npmjs.org/package/flake-idgen
MIT License
242 stars 20 forks source link

Observing Duplicate Ids during load tests #15

Open austinkloske22 opened 1 year ago

austinkloske22 commented 1 year ago

I am using flake-idgen in a distributed environment and am seeing duplicate Id errors on a the primary Id field under the circumstances below during K6 load testing (50 Vus):

2+ replicates of Id service Datacenter = 0 Worker = 1,2,3,n

The issue does not exist when I run a single instance of the Id generation service (datacenter = 0, worker = 0). Based on observation, the Duplicate collisions are being produces by different instances of the service initialized with a different worker Id.

I'll attempt incrementing both datacenter and worker and leave a comment on the results.

Screenshot 2023-10-31 at 1 11 29 PM Screenshot 2023-10-31 at 1 10 21 PM
O-Connects commented 9 months ago

How are you doing now?

madiedinro commented 1 month ago

Aloha! Show how you convert Buffer to UO_c954169934325d1054c6a6698