Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ Thumbs.db

# flattened pom file
.flattened-pom.xml
node_modules/
10 changes: 5 additions & 5 deletions sentinel-adapter/sentinel-apache-httpclient-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ CloseableHttpClient httpclient = builder.build();

- `SentinelApacheHttpClientConfig` configuration:

| name | description | type | default value |
|------|------------|------|-------|
| prefix | customize resource prefix | `String` | `httpclient:` |
| extractor | customize resource extractor | `ApacheHttpClientResourceExtractor` | `DefaultApacheHttpClientResourceExtractor` |
| fallback | handle request when it is blocked | `ApacheHttpClientFallback` | `DefaultApacheHttpClientFallback` |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| prefix | customize resource prefix | `String` | `httpclient:` |
| extractor | customize resource extractor | `ApacheHttpClientResourceExtractor` | `DefaultApacheHttpClientResourceExtractor` |
| fallback | handle request when it is blocked | `ApacheHttpClientFallback` | `DefaultApacheHttpClientFallback` |

### extractor (resource extractor)

Expand Down
10 changes: 5 additions & 5 deletions sentinel-adapter/sentinel-okhttp-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ OkHttpClient client = new OkHttpClient.Builder()

`SentinelOkHttpConfig` configuration:

| name | description | type | default value |
|------|------------|------|-------|
| resourcePrefix | customized resource name prefix | `String` | `okhttp:` |
| resourceExtractor | customized resource extractor | `OkHttpResourceExtractor` | `DefaultOkHttpResourceExtractor` |
| fallback | handle request when it is blocked | `OkHttpFallback` | `DefaultOkHttpFallback` |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| resourcePrefix | customized resource name prefix | `String` | `okhttp:` |
| resourceExtractor | customized resource extractor | `OkHttpResourceExtractor` | `DefaultOkHttpResourceExtractor` |
| fallback | handle request when it is blocked | `OkHttpFallback` | `DefaultOkHttpFallback` |

### Resource Extractor

Expand Down
28 changes: 14 additions & 14 deletions sentinel-adapter/sentinel-spring-webmvc-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,23 @@ config.setBlockExceptionHandler((request, response, e) -> {

- Common configuration in `SentinelWebMvcConfig` and `SentinelWebMvcTotalConfig`:

| name | description | type | default value |
|------|------------|------|-------|
| `blockExceptionHandler`| The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
| `originParser` | Extracting request origin (e.g. IP or appName from HTTP Header) from HTTP request | `RequestOriginParser` | - |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| `blockExceptionHandler` | The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
| `originParser` | Extracting request origin (e.g. IP or appName from HTTP Header) from HTTP request | `RequestOriginParser` | - |

- `SentinelWebMvcConfig` configuration:

| name | description | type | default value |
|------|------------|------|-------|
| urlCleaner | The `UrlCleaner` interface is designed for clean and unify the URL resource. | `UrlCleaner` | - |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_entry_attr` |
| httpMethodSpecify | Specify whether the URL resource name should contain the HTTP method prefix (e.g. `POST:`). | `boolean` | `false` |
| webContextUnify | Specify whether unify web context(i.e. use the default context name). | `boolean` | `true` |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| urlCleaner | The `UrlCleaner` interface is designed for clean and unify the URL resource. | `UrlCleaner` | - |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_entry_attr` |
| httpMethodSpecify | Specify whether the URL resource name should contain the HTTP method prefix (e.g. `POST:`). | `boolean` | `false` |
| webContextUnify | Specify whether unify web context(i.e. use the default context name). | `boolean` | `true` |

- `SentinelWebMvcTotalConfig` configuration:

| name | description | type | default value |
|------|------------|------|-------|
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |
28 changes: 14 additions & 14 deletions sentinel-adapter/sentinel-spring-webmvc-v6x-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,23 @@ config.setBlockExceptionHandler((request, response, e) -> {

- Common configuration in `SentinelWebMvcConfig` and `SentinelWebMvcTotalConfig`:

| name | description | type | default value |
|------|------------|------|-------|
| `blockExceptionHandler`| The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
| `originParser` | Extracting request origin (e.g. IP or appName from HTTP Header) from HTTP request | `RequestOriginParser` | - |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| `blockExceptionHandler` | The handler that handles the block request | `BlockExceptionHandler` | null (throw out the BlockException) |
| `originParser` | Extracting request origin (e.g. IP or appName from HTTP Header) from HTTP request | `RequestOriginParser` | - |

- `SentinelWebMvcConfig` configuration:

| name | description | type | default value |
|------|------------|------|-------|
| urlCleaner | The `UrlCleaner` interface is designed for clean and unify the URL resource. | `UrlCleaner` | - |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_entry_attr` |
| httpMethodSpecify | Specify whether the URL resource name should contain the HTTP method prefix (e.g. `POST:`). | `boolean` | `false` |
| webContextUnify | Specify whether unify web context(i.e. use the default context name). | `boolean` | `true` |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| urlCleaner | The `UrlCleaner` interface is designed for clean and unify the URL resource. | `UrlCleaner` | - |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_entry_attr` |
| httpMethodSpecify | Specify whether the URL resource name should contain the HTTP method prefix (e.g. `POST:`). | `boolean` | `false` |
| webContextUnify | Specify whether unify web context(i.e. use the default context name). | `boolean` | `true` |

- `SentinelWebMvcTotalConfig` configuration:

| name | description | type | default value |
|------|------------|------|-------|
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |
| name | description | type | default value |
| ------ | ------------ | ------ | ------- |
| totalResourceName | The resource name in `SentinelTotalInterceptor` | `String` | `spring-mvc-total-url-request` |
| requestAttributeName | Attribute key in request used by Sentinel (internal) | `String` | `$$sentinel_spring_web_total_entry_attr` |
10 changes: 5 additions & 5 deletions sentinel-cluster/sentinel-cluster-server-envoy-rls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ We may also retrieve the converted `FlowRule` via the command API `localhost:871

The configuration list:

| Item (env) | Item (JVM property) | Description | Default Value | Required |
|--------|--------|--------|--------|--------|
| `SENTINEL_RLS_GRPC_PORT` | `csp.sentinel.grpc.server.port` | The RLS gRPC server port | **10240** | false |
| `SENTINEL_RLS_RULE_FILE_PATH` | `csp.sentinel.rls.rule.file` | The path of the RLS rule yaml file | - | **true** |
| `SENTINEL_RLS_ACCESS_LOG` | - | Whether to enable the access log (`on` for enable) | off | false |
| Item (env) | Item (JVM property) | Description | Default Value | Required |
| -------- | -------- | -------- | -------- | -------- |
| `SENTINEL_RLS_GRPC_PORT` | `csp.sentinel.grpc.server.port` | The RLS gRPC server port | **10240** | false |
| `SENTINEL_RLS_RULE_FILE_PATH` | `csp.sentinel.rls.rule.file` | The path of the RLS rule yaml file | - | **true** |
| `SENTINEL_RLS_ACCESS_LOG` | - | Whether to enable the access log (`on` for enable) | off | false |

## Samples

Expand Down
8 changes: 4 additions & 4 deletions sentinel-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ java -Dserver.port=8080 \
为便于演示,我们对控制台本身加入了流量控制功能,具体做法是引入 Sentinel 提供的 `CommonFilter` 这个 Servlet Filter。
上述 JVM 参数的含义是:

| 参数 | 作用 |
|--------|--------|
|`-Dcsp.sentinel.dashboard.server=localhost:8080`|向 Sentinel 接入端指定控制台的地址|
|`-Dproject.name=sentinel-dashboard`|向 Sentinel 指定应用名称,比如上面对应的应用名称就为 `sentinel-dashboard`|
| 参数 | 作用 |
| -------- | -------- |
| `-Dcsp.sentinel.dashboard.server=localhost:8080` | 向 Sentinel 接入端指定控制台的地址 |
| `-Dproject.name=sentinel-dashboard` | 向 Sentinel 指定应用名称,比如上面对应的应用名称就为 `sentinel-dashboard` |

全部的配置项可以参考 [启动配置项文档](https://github.com/alibaba/Sentinel/wiki/%E5%90%AF%E5%8A%A8%E9%85%8D%E7%BD%AE%E9%A1%B9)。

Expand Down
14 changes: 7 additions & 7 deletions sentinel-extension/sentinel-parameter-flow-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ ParamFlowRuleManager.loadRules(Collections.singletonList(rule));

The description for fields of `ParamFlowRule`:

| Field | Description | Default |
| :----: | :----| :----|
| resource| resource name (**required**) ||
| count | flow control threshold (**required**) ||
| grade | metric type (QPS or thread count) | QPS mode |
| paramIdx | the index of provided parameter in `SphU.entry(xxx, args)` (**required**) ||
| paramFlowItemList | the exception items of parameter; you can set threshold to a specific parameter value ||
| Field | Description | Default |
| :----: | :---- | :---- |
| resource | resource name (**required**) | |
| count | flow control threshold (**required**) | |
| grade | metric type (QPS or thread count) | QPS mode |
| paramIdx | the index of provided parameter in `SphU.entry(xxx, args)` (**required**) | |
| paramFlowItemList | the exception items of parameter; you can set threshold to a specific parameter value | |

Now the parameter flow control rules will take effect.
Loading