Miss-you opened a new issue #2643:
URL: https://github.com/apache/apisix/issues/2643


   ### Issue description
   
   Use `ngx.var.request_id` as unique id, not `jit-uuid`.
   
   The distributed unique id generation algorithm is a classic problem. The 
current seed of jit-uuid is set by the lua code, while lua always use the same 
seed by default.
   
   On the other hand, nginx/openresty has a default distributed id -- 
`ngx.var.request_id`. And after a year of experience, `ngx.var.request_id` 
itself has a very low collision rate (billions of requests per day) and has 
never had a request_id/trace_id collision on the same day.
   
   I think it's better to use `ngx.var.request_id` rather than generate uuid by 
itself.
   
   ref:
   https://github.com/apache/skywalking/issues/5805
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):
   * OS:
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to