KEY GENERATE ALGORITHM #
Snowflake #
Type: SNOWFLAKE
Configurable Properties:
Name | DataType | Description | Default Value |
---|---|---|---|
max-vibration-offset (?) | int | The max upper limit value of vibrate number, range [0, 4096) . Notice: To use the generated value of this algorithm as sharding value, it is recommended to configure this property. The algorithm generates key mod 2^n (2^n is usually the sharding amount of tables or databases) in different milliseconds and the result is always 0 or 1 . To prevent the above sharding problem, it is recommended to configure this property, its value is (2^n)-1 | 1 |
max-tolerate-time-difference-milliseconds (?) | long | The max tolerate time for different server’s time difference in milliseconds | 10 milliseconds |
worker-id-offset | int | This parameter is suitable for multi-cluster environments to avoid generating duplicate snowflake algorithms. When setting parameter values, please reasonably evaluate the number of nodes required for the cluster | 0 |
UUID #
Type: UUID
Configurable Properties: None