dickens7 commented on a change in pull request #4559:
URL: https://github.com/apache/apisix/pull/4559#discussion_r677936999
##########
File path: docs/en/latest/plugins/request-id.md
##########
@@ -72,6 +72,60 @@ X-Request-Id: fe32076a-d0a5-49a6-a361-6c244c1df956
......
```
+### Use the snowflake algorithm to generate an ID
+
+> supports using the Snowflake algorithm to generate ID.
+> read the documentation first before deciding to use snowflake. Because once
the configuration information is enabled, you cannot arbitrarily adjust the
configuration information. Failure to do so may result in duplicate ID being
generated.
+
+The Snowflake algorithm is not enabled by default and needs to be configured
in 'conf/config.yaml'.
+
+```yaml
+plugin_attr:
+ request-id:
+ snowflake:
+ enable: true
+ snowflake_epoc: 1609459200000
+ data_machine_bits: 12
+ sequence_bits: 10
+ data_machine_ttl: 30
+ data_machine_interval: 10
+```
+
+#### Configuration parameters
+
+| Name | Type | Requirement | Default | Valid |
Description |
+| ------------------- | ------- | ------------- | -------------- | ------- |
------------------------------ |
+| enable | boolean | required | false | |
When set it to true, enable the snowflake algorithm. |
Review comment:
Got it. I'll make it optional
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]