diff --git a/docs/en_us/configuration/cluster_conf/cluster_table.data.md b/docs/en_us/configuration/cluster_conf/cluster_table.data.md index ea771cba..cfb5d3ef 100644 --- a/docs/en_us/configuration/cluster_conf/cluster_table.data.md +++ b/docs/en_us/configuration/cluster_conf/cluster_table.data.md @@ -1,223 +1,47 @@ -# Cluster Forwarding Configuration +# Instances Balancing Configuration -## Configuration Introduction +## Introduction -`cluster_conf.data` is the configuration file for cluster forwarding. +cluster_table.data records the load balancing config among instances. -## Configuration Description +## Configuration -### Basic Configuration +### Basic configuration -| Configuration Item | Description | -| ------------------ | ----------- | -| Version | String
Configuration file version | -| Config | Object
Forwarding configuration parameters for each cluster | -| Config[k] | String
Cluster name | -| Config[v] | Object
Cluster forwarding configuration parameters | +| Config Item | Description | +| --------------------- | ------------------------------- | +| Version | String
Verson of config file | +| Config | Object
config of all clusters | +| Config{k} | String
name of cluster | +| Config{v} | Object
config of cluster | +| Config{v}{k} | String
name of subcluster | +| Config{v}{v} | Object
config of subcluster(a list of instance) | -### Cluster Forwarding Configuration +### Instance configuration -Note: The following configuration items are located in the namespace `Config[v]`, and the namespace is omitted in the configuration item names. +| Config Item | Description | +| --------------------- | ------------------------------- | +| Addr | String
ip address of instance | +| Name | String
name of instance | +| Port | String
port of instance | +| Weight | String
weight of instance | -#### Backend Basic Configuration - -| Configuration Item | Description | -| ------------------ | ----------- | -| BackendConf.Protocol | String
Protocol of the backend service, currently supports http/https and fcgi, default value is http | -| BackendConf.TimeoutConnSrv | Integer
Timeout for connecting to the backend, in milliseconds
Default value 2000 | -| BackendConf.TimeoutResponseHeader | Integer
Timeout for reading the response header from the backend, in milliseconds
Default value 60000 | -| BackendConf.MaxIdleConnsPerHost | Integer
Maximum number of idle persistent connections between the BFE instance and each backend
Default value 2 | -| BackendConf.MaxConnsPerHost | Integer
Maximum number of persistent connections between the BFE instance and each backend, 0 means no limit
Default value 0 | -| BackendConf.RetryLevel | Integer
Request retry level. 0: Retry when connection to backend fails; 1: Retry when connection to backend fails or forwarding GET request fails
Default value 0 | -| BackendConf.OutlierDetectionHttpCode | String
Backend response status code anomaly check, "" means no check, "500" means backend is considered failed if it returns 500
Supports two formats: "\[0-9\]{3}" (e.g., "500") and "\[0-9\]xx" (e.g., "4xx"); multiple status codes can be connected using '|'
Default value "", no backend response status code anomaly check | -| BackendConf.FCGIConf | Object
FastCGI protocol configuration | -| BackendConf.FCGIConf.Root | String
Root folder location of the website | -| BackendConf.FCGIConf.EnvVars | Map\[string\]string
Extended environment variables | - -#### Health Check Configuration - -| Configuration Item | Description | -| ------------------ | ----------- | -| CheckConf.Schem | String
Health check protocol, supports HTTP/HTTPS/TCP/TLS
Default value HTTP | -| CheckConf.Uri | String
Health check request URI (only HTTP/HTTPS)
Default value "/health_check" | -| CheckConf.Host | String
Health check request HOST (only HTTP/HTTPS)
Default value "" | -| CheckConf.StatusCode | Integer
Expected response status code (only HTTP/HTTPS)
Default value 200. Can also be configured as 0, meaning any status code is acceptable. | -| CheckConf.StatusCodeRange | String
Expected response status code (only HTTP/HTTPS)
See: Note 1. StatusCodeRange | -| CheckConf.FailNum | Integer
Health check activation threshold (after forwarding requests fail consecutively for FailNum times, the backend instance is marked as unavailable and health check is initiated)
Default value 5 | -| CheckConf.SuccNum | Integer
Health check success threshold (after health check succeeds consecutively for SuccNum times, the backend instance is marked as available)
Default value 1 | -| CheckConf.CheckTimeout | Integer
Health check timeout, in milliseconds
Default value 0 (no timeout) | -| CheckConf.CheckInterval | Integer
Health check interval, in milliseconds
Default value 1000 | - -#### GSLB Basic Configuration - -| Configuration Item | Description | -| ------------------ | ----------- | -| GslbBasic.CrossRetry | Integer
Maximum cross-sub-cluster retry count
Default value 0 | -| GslbBasic.RetryMax | Integer
Maximum retry count within a sub-cluster
Default value 2 | -| GslbBasic.BalanceMode | String
Load balancing mode (WRR: Weighted Round Robin; WLC: Weighted Least Connections)
Default value WRR | -| GslbBasic.HashConf | Object
Hash strategy configuration for session persistence | -| GslbBasic.HashConf.HashStrategy | Integer
Hash strategy for session persistence. 0: ClientIdOnly, 1: ClientIpOnly, 2: ClientIdPreferred, 3: RequestURI
Default value 1 (ClientIpOnly) | -| GslbBasic.HashConf.HashHeader | String
Hash request header for session persistence. Optional. Can be configured as a Header that uniquely identifies a client. If it is a cookie header, the format is: "Cookie:key" | -| GslbBasic.HashConf.SessionSticky | Boolean
Whether to enable session persistence (when enabled, requests from the same user can be sent to the same backend)
Default value False. When set to False, the session persistence level is at the sub-cluster level. | - -#### Cluster Basic Configuration - -| Configuration Item | Description | -| ------------------ | ----------- | -| ClusterBasic.TimeoutReadClient | Integer
Timeout for reading the client request body, in milliseconds
Default value 30000 | -| ClusterBasic.TimeoutWriteClient | Integer
Timeout for writing the response, in milliseconds
Default value 60000 | -| ClusterBasic.TimeoutReadClientAgain | Integer
Timeout for idle connections, in milliseconds
Default value 60000 | -| ClusterBasic.ReqWriteBufferSize | Integer
Request write buffer size, in Bytes. Default value 512. Recommended to use the default value. | -| ClusterBasic.ReqFlushInterval | Integer
Interval for flushing requests, in milliseconds. Default value 0, meaning no periodic flushing | -| ClusterBasic.ResFlushInterval | Integer
Interval for flushing responses, in milliseconds. Default value -1, meaning no caching of responses. Setting to 0 means no periodic flushing. Recommended to use the default value. | -| ClusterBasic.CancelOnClientClose | Boolean
Whether to cancel the blocking state when the client disconnects while the server is reading the backend response. Default value false. Recommended to use the default value. | - -#### Backend Service HTTPS Configuration - -| Configuration Item | Description | -| ------------------ | ----------- | -| HTTPSConf.RSHost | String
Hostname of the backend service instance, used to verify the server certificate.
Default value: Host field in the frontend request header. | -| HTTPSConf.BFEKeyFile | String
Private key file path, required when mutual authentication is supported
Private key used by the BFE engine when forwarding HTTPS requests to the backend. The private key file must be in PEM format | -| HTTPSConf.BFECertFile | String
Certificate file path, required when mutual authentication is supported
Certificate used by the BFE engine when forwarding HTTPS requests to the backend. The certificate file must be in x509 standard PEM format, and each PEM file can only contain one certificate | -| HTTPSConf.RSCAList | []String
Required when BackendConf.Protocol is https and server certificate verification is needed (i.e., RSInsecureSkipVerify is false). If not filled, the system default CA pool is used. List items are certificate file paths. Certificate files must be in x509 standard PEM format. Multiple CA certificates in the CA trust chain can be combined into one PEM file. | -| HTTPSConf.RSInsecureSkipVerify | Boolean
Server certificate verification switch
true: Do not verify, false: Verify (default) | - -## Configuration Example +## Example ```json { - "Version": "20190101000000", "Config": { "cluster_example": { - "BackendConf": { - "TimeoutConnSrv": 2000, - "TimeoutResponseHeader": 50000, - "MaxIdleConnsPerHost": 0, - "RetryLevel": 0, - "OutlierDetectionHttpCode": "5xx|403" - }, - "CheckConf": { - "Schem": "http", - "Uri": "/healthcheck", - "Host": "example.org", - "StatusCode": 200, - "FailNum": 10, - "CheckInterval": 1000 - }, - "GslbBasic": { - "CrossRetry": 0, - "RetryMax": 2, - "HashConf": { - "HashStrategy": 0, - "HashHeader": "Cookie:UID", - "SessionSticky": false - } - }, - "ClusterBasic": { - "TimeoutReadClient": 30000, - "TimeoutWriteClient": 60000, - "TimeoutReadClientAgain": 60000, - } - }, - "https_cluster_example": { - "BackendConf": { - "Protocol": "https", - "TimeoutConnSrv": 2000, - "TimeoutResponseHeader": 50000, - "MaxIdleConnsPerHost": 0, - "RetryLevel": 0 - }, - "CheckConf": { - "Schem": "https", - "Uri": "/", - "Host": "example.org", - "StatusCode": 200, - "FailNum": 10, - "CheckInterval": 1000 - }, - "GslbBasic": { - "CrossRetry": 0, - "RetryMax": 2, - "HashConf": { - "HashStrategy": 0, - "HashHeader": "Cookie:UID", - "SessionSticky": false - } - }, - "ClusterBasic": { - "TimeoutReadClient": 30000, - "TimeoutWriteClient": 60000, - "TimeoutReadClientAgain": 30000, - "ReqWriteBufferSize": 512, - "ReqFlushInterval": 0, - "ResFlushInterval": -1, - "CancelOnClientClose": false - }, - "HTTPSConf":{ - "RSHost": "www.example.org", - "BFEKeyFile": "../conf/tls_conf/backend_rs/r_bfe_dev_prv.pem", - "BFECertFile": "../conf/tls_conf/backend_rs/r_bfe_dev.crt", - "RSCAList": [ - "../conf/tls_conf/backend_rs/bfe_r_ca.crt", - "../conf/tls_conf/backend_rs/bfe_i_ca.crt" - ], - "RSInsecureSkipVerify": false - } - }, - "fcgi_cluster_example": { - "BackendConf": { - "Protocol": "fcgi", - "TimeoutConnSrv": 2000, - "TimeoutResponseHeader": 50000, - "MaxIdleConnsPerHost": 0, - "MaxConnsPerHost": 0, - "RetryLevel": 0, - "FCGIConf": { - "Root": "/home/work", - "EnvVars": { - "VarKey": "VarVal" - } + "example.bfe.bj": [ + { + "Addr": "10.199.189.26", + "Name": "example_hostname", + "Port": 10257, + "Weight": 10 } - }, - "CheckConf": { - "Schem": "http", - "Uri": "/healthcheck", - "Host": "example.org", - "StatusCode": 200, - "FailNum": 10, - "CheckInterval": 1000 - }, - "GslbBasic": { - "CrossRetry": 0, - "RetryMax": 2, - "HashConf": { - "HashStrategy": 1, - "HashHeader": "Cookie:UID", - "SessionSticky": false - } - }, - "ClusterBasic": { - "TimeoutReadClient": 30000, - "TimeoutWriteClient": 60000, - "TimeoutReadClientAgain": 60000, - "ReqWriteBufferSize": 512, - "ReqFlushInterval": 0, - "ResFlushInterval": -1, - "CancelOnClientClose": false - } + ] } - } + }, + "Version": "20190101000000" } ``` - -## Notes - -### 1. StatusCodeRange - -- Response status code range. If StatusCode is configured, this validation condition will be ignored. -- Valid configuration examples: - 1. One of `"3xx"`, `"4xx"`, `"5xx"` - 2. Specific HTTP return codes, consistent with the StatusCode function - 3. The above (1) or (2) connected by the `"|"` symbol, for example: - - `"503|4xx"` - - `"501|409|30x"` \ No newline at end of file diff --git a/docs/en_us/configuration/server_data_conf/cluster_conf.data.md b/docs/en_us/configuration/server_data_conf/cluster_conf.data.md index 2eb2ff8f..ea771cba 100644 --- a/docs/en_us/configuration/server_data_conf/cluster_conf.data.md +++ b/docs/en_us/configuration/server_data_conf/cluster_conf.data.md @@ -1,83 +1,88 @@ -# Cluster Configuration - -## Introduction - -cluster_conf.data records the cluster config. - -## Configuration - -| Config Item | Description | -| ----------- | ------------------------------------------------------------ | -| Version | String
Version of config file | -| Config | Struct
Map data, key is cluster name, value is cluster config detail | -| Config[k] | String
Cluster name | -| Config[v] | Object
Cluster's routing config | - -### Cluster Config Detail - -Notice: the following configs are in namespace Config[v]. - -#### Backend Config - -BackendConf is config for backend. - -| Config Item | Description | -| --------------------- | ------------------------------------------- | -| Protocol | String
Protocol for connecting backend. http and fcgi are supported. Default value is http. | -| TimeoutConnSrv | Int
Timeout for connecting backend, in ms. Default value is 2000. | -| TimeoutResponseHeader | Int
Timeout for reading response header, in ms. Default value is 60000. | -| MaxIdleConnsPerHost | Int
Max idle connections to each backend per BFE. Default value is 2. | -| MaxConnsPerHost | Int
Max number of concurrent connections to each backend per BFE. 0 means no limitation. Default value is 0. | -| RetryLevel | Int
Retry level if request fail. 0: retry after connecting backend fails; 1: retry after connecting backend fails or forwarding GET request fails. Default value is 0. | -| BackendConf.OutlierDetectionHttpCode | String
Backend HTTP status code outlier detection.
"" means disable detection, "500" means "500" is considered as backend failure.
Supports two formats: "\[0-9\]{3}"(e.g "500"), and "\[0-9\]xx"(e.g "4xx"). Multiple status codes are separated by "\|".
Default value is "", which means disable the detection. | -| FCGIConf | Object
Conf for FastCGI Protocol | -| FCGIConf.Root | String
The root folder of the website | -| FCGIConf.EnvVars | Map\[string\]string
Extra environment variable | - -#### Health Check Config - -CheckConf is config of backend check. - -| Config Item | Description | -| ------------- | ------------------------------------------------------------ | -| Schem | String
Protocol for health check (HTTP/TCP). Default value is http. | -| Uri | String
Uri used in health check (HTTP only). Default value is "/health_check". | -| Host | String
Host used in health check (HTTP only). Default value is "". | -| StatusCode | Int
Expected response code (HTTP only). Default value is 200. And 0 means any response code is considered valid. | -| FailNum | Int
Failure threshold (consecutive failures of forwarded requests), which will trigger BFE to set the backend instance to unavailable state and start the health check. | -| SuccNum | Int
Healthy threshold (consecutive successes of health check request), which will trigger BFE to set the backend instance to available state and stop the health check. | -| CheckTimeout | Int
Timeout for health check, in ms. Default value is 0, which means no timeout. | -| CheckInterval | Int
Interval of health check, in ms. Default value is 1000. | - -#### GSLB Config - -GslbBasic is cluster config for Gslb. - -| Config Item | Description | -| --------------------- | ------------------------------------------------------------ | -| CrossRetry | Int
Max cross sub-clusters retry times. Default value is 0. | -| RetryMax | Int
Max retry times within same sub-cluster. Default value is 2. | -| BalanceMode | String
Load Balance Mode. Supported mode: WRR(Weighted Round Robin), WLC(Weighted Least Connection). Default value is WRR. | -| HashConf | Struct
Hash config of session persistence
| -| HashConf.HashStrategy | Int
Hash Strategy of session persistence. Supported strategies: 0: ClientIdOnly, 1: ClientIpOnly, 2: ClientIdPreferred, 3: RequestURI. Default value is 1 (ClientIpOnly).
| -| HashConf.HashHeader | String
HashHeader is an optional request header which represents a unique client. Format for speicial cookie header is "Cookie:Key"
| -| HashConf.SessonSticky | Boolean
Set SessionSticky to "true" enable sticky session (ensures that all requests from the user during the session are sent to the same backend). If set to "false", the session persistence will be at sub-cluster level. | - -#### Cluster Basic Config - -ClusterBasic is basic config for cluster. - -| Config Item | Description | -| ---------------------- | ------------------------------------------------------------ | -| TimeoutReadClient | Int
Timeout for read client body in ms. Default value is 30000. | -| TimeoutWriteClient | Int
Timeout for write response to client. Default value is 60000. | -| TimeoutReadClientAgain | Int
Timeout for read client again in ms. Default value is 60000. | -| ReqWriteBufferSize | Int
Write buffer size for request in byte. Default and recommended value is 512. | -| ReqFlushInterval | Int
Interval to flush request in ms. Default and recommended value is 0, means disable periodic flush. | -| ResFlushInterval | Int
Interval to flush response in ms. Default and recommended value is -1, means not to cache response. 0 means disable periodic flush. | -| CancelOnClientClose | Bool
During reading response from backend, cancel the blocking status if client connection disconnected. Default and recommended value is false. | - -## Example +# Cluster Forwarding Configuration + +## Configuration Introduction + +`cluster_conf.data` is the configuration file for cluster forwarding. + +## Configuration Description + +### Basic Configuration + +| Configuration Item | Description | +| ------------------ | ----------- | +| Version | String
Configuration file version | +| Config | Object
Forwarding configuration parameters for each cluster | +| Config[k] | String
Cluster name | +| Config[v] | Object
Cluster forwarding configuration parameters | + +### Cluster Forwarding Configuration + +Note: The following configuration items are located in the namespace `Config[v]`, and the namespace is omitted in the configuration item names. + +#### Backend Basic Configuration + +| Configuration Item | Description | +| ------------------ | ----------- | +| BackendConf.Protocol | String
Protocol of the backend service, currently supports http/https and fcgi, default value is http | +| BackendConf.TimeoutConnSrv | Integer
Timeout for connecting to the backend, in milliseconds
Default value 2000 | +| BackendConf.TimeoutResponseHeader | Integer
Timeout for reading the response header from the backend, in milliseconds
Default value 60000 | +| BackendConf.MaxIdleConnsPerHost | Integer
Maximum number of idle persistent connections between the BFE instance and each backend
Default value 2 | +| BackendConf.MaxConnsPerHost | Integer
Maximum number of persistent connections between the BFE instance and each backend, 0 means no limit
Default value 0 | +| BackendConf.RetryLevel | Integer
Request retry level. 0: Retry when connection to backend fails; 1: Retry when connection to backend fails or forwarding GET request fails
Default value 0 | +| BackendConf.OutlierDetectionHttpCode | String
Backend response status code anomaly check, "" means no check, "500" means backend is considered failed if it returns 500
Supports two formats: "\[0-9\]{3}" (e.g., "500") and "\[0-9\]xx" (e.g., "4xx"); multiple status codes can be connected using '|'
Default value "", no backend response status code anomaly check | +| BackendConf.FCGIConf | Object
FastCGI protocol configuration | +| BackendConf.FCGIConf.Root | String
Root folder location of the website | +| BackendConf.FCGIConf.EnvVars | Map\[string\]string
Extended environment variables | + +#### Health Check Configuration + +| Configuration Item | Description | +| ------------------ | ----------- | +| CheckConf.Schem | String
Health check protocol, supports HTTP/HTTPS/TCP/TLS
Default value HTTP | +| CheckConf.Uri | String
Health check request URI (only HTTP/HTTPS)
Default value "/health_check" | +| CheckConf.Host | String
Health check request HOST (only HTTP/HTTPS)
Default value "" | +| CheckConf.StatusCode | Integer
Expected response status code (only HTTP/HTTPS)
Default value 200. Can also be configured as 0, meaning any status code is acceptable. | +| CheckConf.StatusCodeRange | String
Expected response status code (only HTTP/HTTPS)
See: Note 1. StatusCodeRange | +| CheckConf.FailNum | Integer
Health check activation threshold (after forwarding requests fail consecutively for FailNum times, the backend instance is marked as unavailable and health check is initiated)
Default value 5 | +| CheckConf.SuccNum | Integer
Health check success threshold (after health check succeeds consecutively for SuccNum times, the backend instance is marked as available)
Default value 1 | +| CheckConf.CheckTimeout | Integer
Health check timeout, in milliseconds
Default value 0 (no timeout) | +| CheckConf.CheckInterval | Integer
Health check interval, in milliseconds
Default value 1000 | + +#### GSLB Basic Configuration + +| Configuration Item | Description | +| ------------------ | ----------- | +| GslbBasic.CrossRetry | Integer
Maximum cross-sub-cluster retry count
Default value 0 | +| GslbBasic.RetryMax | Integer
Maximum retry count within a sub-cluster
Default value 2 | +| GslbBasic.BalanceMode | String
Load balancing mode (WRR: Weighted Round Robin; WLC: Weighted Least Connections)
Default value WRR | +| GslbBasic.HashConf | Object
Hash strategy configuration for session persistence | +| GslbBasic.HashConf.HashStrategy | Integer
Hash strategy for session persistence. 0: ClientIdOnly, 1: ClientIpOnly, 2: ClientIdPreferred, 3: RequestURI
Default value 1 (ClientIpOnly) | +| GslbBasic.HashConf.HashHeader | String
Hash request header for session persistence. Optional. Can be configured as a Header that uniquely identifies a client. If it is a cookie header, the format is: "Cookie:key" | +| GslbBasic.HashConf.SessionSticky | Boolean
Whether to enable session persistence (when enabled, requests from the same user can be sent to the same backend)
Default value False. When set to False, the session persistence level is at the sub-cluster level. | + +#### Cluster Basic Configuration + +| Configuration Item | Description | +| ------------------ | ----------- | +| ClusterBasic.TimeoutReadClient | Integer
Timeout for reading the client request body, in milliseconds
Default value 30000 | +| ClusterBasic.TimeoutWriteClient | Integer
Timeout for writing the response, in milliseconds
Default value 60000 | +| ClusterBasic.TimeoutReadClientAgain | Integer
Timeout for idle connections, in milliseconds
Default value 60000 | +| ClusterBasic.ReqWriteBufferSize | Integer
Request write buffer size, in Bytes. Default value 512. Recommended to use the default value. | +| ClusterBasic.ReqFlushInterval | Integer
Interval for flushing requests, in milliseconds. Default value 0, meaning no periodic flushing | +| ClusterBasic.ResFlushInterval | Integer
Interval for flushing responses, in milliseconds. Default value -1, meaning no caching of responses. Setting to 0 means no periodic flushing. Recommended to use the default value. | +| ClusterBasic.CancelOnClientClose | Boolean
Whether to cancel the blocking state when the client disconnects while the server is reading the backend response. Default value false. Recommended to use the default value. | + +#### Backend Service HTTPS Configuration + +| Configuration Item | Description | +| ------------------ | ----------- | +| HTTPSConf.RSHost | String
Hostname of the backend service instance, used to verify the server certificate.
Default value: Host field in the frontend request header. | +| HTTPSConf.BFEKeyFile | String
Private key file path, required when mutual authentication is supported
Private key used by the BFE engine when forwarding HTTPS requests to the backend. The private key file must be in PEM format | +| HTTPSConf.BFECertFile | String
Certificate file path, required when mutual authentication is supported
Certificate used by the BFE engine when forwarding HTTPS requests to the backend. The certificate file must be in x509 standard PEM format, and each PEM file can only contain one certificate | +| HTTPSConf.RSCAList | []String
Required when BackendConf.Protocol is https and server certificate verification is needed (i.e., RSInsecureSkipVerify is false). If not filled, the system default CA pool is used. List items are certificate file paths. Certificate files must be in x509 standard PEM format. Multiple CA certificates in the CA trust chain can be combined into one PEM file. | +| HTTPSConf.RSInsecureSkipVerify | Boolean
Server certificate verification switch
true: Do not verify, false: Verify (default) | + +## Configuration Example ```json { @@ -88,9 +93,8 @@ ClusterBasic is basic config for cluster. "TimeoutConnSrv": 2000, "TimeoutResponseHeader": 50000, "MaxIdleConnsPerHost": 0, - "MaxConnsPerHost": 0, "RetryLevel": 0, - "OutlierDetectionHttpCode": "5xx|400" + "OutlierDetectionHttpCode": "5xx|403" }, "CheckConf": { "Schem": "http", @@ -113,10 +117,51 @@ ClusterBasic is basic config for cluster. "TimeoutReadClient": 30000, "TimeoutWriteClient": 60000, "TimeoutReadClientAgain": 60000, + } + }, + "https_cluster_example": { + "BackendConf": { + "Protocol": "https", + "TimeoutConnSrv": 2000, + "TimeoutResponseHeader": 50000, + "MaxIdleConnsPerHost": 0, + "RetryLevel": 0 + }, + "CheckConf": { + "Schem": "https", + "Uri": "/", + "Host": "example.org", + "StatusCode": 200, + "FailNum": 10, + "CheckInterval": 1000 + }, + "GslbBasic": { + "CrossRetry": 0, + "RetryMax": 2, + "HashConf": { + "HashStrategy": 0, + "HashHeader": "Cookie:UID", + "SessionSticky": false + } + }, + "ClusterBasic": { + "TimeoutReadClient": 30000, + "TimeoutWriteClient": 60000, + "TimeoutReadClientAgain": 30000, "ReqWriteBufferSize": 512, "ReqFlushInterval": 0, "ResFlushInterval": -1, "CancelOnClientClose": false + }, + "HTTPSConf":{ + "RSHost": "www.example.org", + "BFEKeyFile": "../conf/tls_conf/backend_rs/r_bfe_dev_prv.pem", + "BFECertFile": "../conf/tls_conf/backend_rs/r_bfe_dev.crt", + "RSCAList": [ + "../conf/tls_conf/backend_rs/bfe_r_ca.crt", + "../conf/tls_conf/backend_rs/bfe_i_ca.crt" + ], + "RSInsecureSkipVerify": false } }, "fcgi_cluster_example": { @@ -125,6 +170,7 @@ ClusterBasic is basic config for cluster. "TimeoutConnSrv": 2000, "TimeoutResponseHeader": 50000, "MaxIdleConnsPerHost": 0, + "MaxConnsPerHost": 0, "RetryLevel": 0, "FCGIConf": { "Root": "/home/work", @@ -163,3 +209,15 @@ ClusterBasic is basic config for cluster. } } ``` + +## Notes + +### 1. StatusCodeRange + +- Response status code range. If StatusCode is configured, this validation condition will be ignored. +- Valid configuration examples: + 1. One of `"3xx"`, `"4xx"`, `"5xx"` + 2. Specific HTTP return codes, consistent with the StatusCode function + 3. The above (1) or (2) connected by the `"|"` symbol, for example: + - `"503|4xx"` + - `"501|409|30x"` \ No newline at end of file