You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+54-2
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,6 @@ Currently, R3 offers a simple gRPC service that could be deployed easily at loca
25
25
26
26
The simple server is the best way to get started, which could steadily serve 500+ SkyWalking services * 3000 uris per minute).
27
27
28
-
TODO: Fault tolerence and persistence is not implemented yet.
29
-
30
28
To run the R3 service on localhost:
31
29
32
30
```bash
@@ -39,6 +37,60 @@ To deploy as a container:
39
37
docker run -d --name r3 -p 17128:17128 r3:latest
40
38
```
41
39
40
+
### Demo
41
+
42
+
#### Restful Pattern Recognition
43
+
44
+
The following URL would recognize the pattern as `/api/users/{var}`, since the last part of URL are different for each instance.
45
+
46
+
* /api/users/cbf11b02ea464447b507e8852c32190a
47
+
* /api/users/5e363a4a18b7464b8cbff1a7ee4c91ca
48
+
* /api/users/44cf77fc351f4c6c9c4f1448f2f12800
49
+
* /api/users/38d3be5f9bd44f7f98906ea049694511
50
+
* /api/users/5ad14302e7924f4aa1d60e58d65b3dd2
51
+
52
+
#### Word Detection
53
+
54
+
The following URL would keep the original URL, not parametrized, since the all part of URL are word.
55
+
56
+
* /api/sale
57
+
* /api/product_sale
58
+
* /api/ProductSale
59
+
60
+
#### Lower Sample Count
61
+
62
+
The following URL would keep the original URL, not parametrized, since the sample count is lower than the threshold(`combine_min_url_count`).
63
+
If the sample count equals or bigger than the threshold, the URL would be parametrized.
64
+
65
+
Such as the threshold is `3`, the following URL would keep the original URL, not parametrized.
66
+
67
+
* /api/fetch1
68
+
* /api/fetch2
69
+
70
+
But the following URL would be parametrized to `/api/{var}`, since the sample count is bigger than the threshold.
71
+
72
+
* /api/fetch1
73
+
* /api/fetch2
74
+
* /api/fetch3
75
+
76
+
#### Versioned API
77
+
78
+
If the part of URI contains version number, such as `v1`, `v2`, `v3`, the version number part would not be parametrized.
79
+
80
+
Such as the following URL would not be parametrized:
81
+
82
+
* /test/v1
83
+
* /test/v2
84
+
* /test/v3
85
+
86
+
If still not matter the other part of URI to be parametrized, such as the following URI would be parametrized to `/test/v1/{var}` and `/test/v999/{var}`.
87
+
88
+
* /test/v1/cbf11b02ea464447b507e8852c32190a
89
+
* /test/v1/5e363a4a18b7464b8cbff1a7ee4c91ca
90
+
* /test/v1/38d3be5f9bd44f7f98906ea049694511
91
+
* /test/v999/1
92
+
* /test/v999/2
93
+
* /test/v999/3
42
94
43
95
### Algorithm: URIDrain
44
96
If you are curious how the algorithm actually works or decided to improve upon it, please first read the [URIDrain Overview](models/README.md) and checkout the algorithm live demo by running below commands:
Copy file name to clipboardexpand all lines: models/Configuration.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Drain is the core algorithm of URI Drain.
36
36
| max_clusters | int | DRAIN_MAX_CLUSTERS | 1024 | Max number of tracked clusters (unlimited by default). When this number is reached, model starts replacing old clusters with a new ones according to the LRU policy. |
37
37
| extra_delimiters | string | DRAIN_EXTRA_DELIMITERS |\["/"\]| The extra delimiters to split the sequence. |
38
38
| analysis_min_url_count | int | DRAIN_ANALYSIS_MIN_URL_COUNT | 20 | The minimum number of unique URLs(each service) to trigger the analysis. |
39
-
| combine_min_url_count | int | DRAIN_COMBINE_MIN_URL_COUNT |8| The minimum number of unique URLs(candidate of each service) to mask as variable URL(encase some similar URL are not restful, such as `/test/one` and `test/two`). |
39
+
| combine_min_url_count | int | DRAIN_COMBINE_MIN_URL_COUNT |3| The minimum number of unique URLs(candidate of each service) to mask as variable URL(encase some similar URL are not restful, such as `/test/one` and `test/two`). |
0 commit comments