-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can hb_id
always be unique?
#325
Comments
|
Or are you concerned about ids across multiple processes? Rereading your issue it appears this is the case. I can look into changing this. |
Yes, I'm assuming to run application in environments like ECS or Cloud Run. |
Just using a single 64 bit value random number will increase the likely hold of clashes. I might break this into two 64 bit values. A randomly generated number per server and the incrementing value. And combine them into one id |
UUIDv4 is 122 bit. I would prefer to have a completely random 128-bit value, I think both are effective. |
#326 seems to be merged. thanks! |
Currently,
hb_id
is an integer sequence value in each process.I don't fully understand why current
hb_id
' works like this, but for logging I would prefer it to be unique across all processes.This creates extra work when I query logs associated with specific requests.
This is because logs are taken from each application server and put together (like in CloudWatch).
Vapor uses
UUID
, but Hummingbird is not.Maybe this is because it doesn't depend on
Foundation
.I think making a random string that's as long with
UUID
, with something likeSystemRandomNumberGenerator
, might be good.The text was updated successfully, but these errors were encountered: