Standard BLB Real Server Related Interfaces
AddBackendServers: Add real servers
Description
- Add real servers to the specified LoadBalancer, supporting batch addition.
Request structure
1POST /v{version}/blb/{blbId}/backendserver?clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "backendServerList":[
7 {
8 "instanceId":instanceId,
9 "weight":weight
10 },...
11 ]
12}
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| blbId | String | Yes | URL parameter | LoadBalancer identifier |
| clientToken | String | Yes | Query | Idempotency Token, with length no more than 64 characters. |
| backendServerList | List<[BackendServerModel](BLB/API Reference/Appendix.md#BackendServerModel)> | Yes | RequestBody | List of real servers to be added |
Response Status Code
Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)
Response headers
No special headers beyond common headers.
Response parameters
None
Request example
1POST /v1/blb/lb-j8UqijYf/backendserver?clientToken=clienttokentest
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "backendServerList":[
7 {
8 "instanceId":"i-YfAibl4A",
9 "weight":"50"
10 },
11 {
12 "instanceId":"i-jBXABQ8D",
13 "weight":"60"
14 }
15 ]
16}
Response example
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Fri, 03 Jun 2016 03:54:29 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
DescribeHealthStatus: Query real server health status
Description
- To query real server information under a specified LoadBalancer, the listener port shall be specified, and the response result will be the health status of the real servers.
- Results support marker-based pagination, with a default page size of 1000, which can be specified via the maxKeys parameter.
Request structure
1GET /v{version}/blb/{blbId}/backendserver?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| blbId | String | Yes | URL parameter | LoadBalancer identifier |
| listenerPort | int | Yes | Query | Listener port to be queried |
| marker | String | No | Query | The starting position of the batch list query is a system-generated string |
| maxKeys | int | No | Query | Maximum number of items per page is 1,000, with a default value of 1000. |
Response Status Code
Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)
Response headers
No special headers beyond common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| backendServerList | List<[BackendServerStatus](BLB/API Reference/Appendix.md#BackendServerStatus)> | Real server status list |
| type | String | Listener type, values: "TCP"/"HTTP" |
| listenerPort | int | Listener port |
| backendPort | int | Real server listener port |
| marker | string | Marker indicating the starting position of the query. If the result list is empty, this field does not exist. |
| isTruncated | boolean | true indicates there is more data later, false indicates it is the last page |
| nextMarker | String | The marker value needed to fetch the next page. This field is absent when isTruncated is false. |
| maxKeys | int | Maximum number of items included per page |
Request example
1GET /v1/blb/lb-j8UqijY/backendserver?listenerPort=88 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
Response example
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Fri, 03 Jun 2016 03:54:29 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7
8{
9 "backendServerList": [
10 {
11 "instanceId": "i-YfAibl4A",
12 "weight": 50,
13 "status": "Alive"
14 },
15 {
16 "instanceId": "i-jBXABQ8D",
17 "weight": 60,
18 "status": "Dead"
19 }
20 ],
21 "type": "TCP",
22 "listenerPort": 88,
23 "backendPort": 88,
24 "marker": "rs-0A6BE9BB",
25 "nextMarker": null,
26 "isTruncated": false,
27 "maxKeys": 1000
28}
DescribeBackendServers: Query real server list
Description
- Query real server list under specified LoadBalancer
- Results support marker-based pagination, with a default page size of 1000, which can be specified via the maxKeys parameter.
Request structure
1GET /v{version}/blb/{blbId}/backendserver?marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| blbId | String | Yes | URL parameter | LoadBalancer identifier |
| marker | String | No | Query | The starting position of the batch list query is a system-generated string |
| maxKeys | int | No | Query | Maximum number of items per page is 1,000, with a default value of 1000. |
Response Status Code
Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md#Error code)
Response headers
No special headers beyond common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| backendServerList | List<[BackendServerModel](BLB/API Reference/Appendix.md#BackendServerModel)> | Real server list |
| marker | string | Marker indicating the starting position of the query. If the result list is empty, this field does not exist. |
| isTruncated | boolean | true indicates there is more data later, false indicates it is the last page |
| nextMarker | String | The marker value needed to fetch the next page. This field is absent when isTruncated is false. |
| maxKeys | int | Maximum number of items included per page |
Request example
1GET /v1/blb/lb-j8UqijY/backendserver HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
Response example
HTTP/1.1 200 OK x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09 Date: Fri, 03 Jun 2016 03:54:29 GMT Transfer-Encoding: chunked Content-Type: application/json;charset=UTF-8 Server: BWS
1{
2 "backendServerList": [
3 {
4 "instanceId": "i-YfAibl4A",
5 "weight": 50,
6 }
7 ],
8 "marker": "rs-0A6BE9BB",
9 "nextMarker": null,
10 "isTruncated": false,
11 "maxKeys": 1000
12}
UpdateBackendServers: Update real servers
Description
Modify the weight of real servers under a specified LoadBalancer, with support for batch updates.
Request structure
1PUT /v{version}/blb/{blbId}/backendserver?{action}&clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "backendServerList":[
7 {
8 "instanceId":instanceId,
9 "weight":weight
10 },...
11 ]
12}
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| blbId | String | Yes | URL parameter | LoadBalancer identifier |
| action | String | Yes | Query | It must be "update" |
| clientToken | String | Yes | Query | Idempotency Token, with length no more than 64 characters. |
| backendServerList | List<[BackendServerModel](BLB/API Reference/Appendix.md#BackendServerModel)> | Yes | RequestBody | List of real servers to be updated |
Response Status Code
Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)
Response headers
No special headers beyond common headers.
Response parameters
None
Request example
1PUT /v1/blb/lb-j8UqijYf/backendserver?update&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/ae4780f344774daa832f34caadd4d7de/2016-06-03T03:26:45Z/1800/host/c863c8b9f75ff307eb1a3c564307b0833acb9d857c65de108258c3edd4cd0118
4
5{
6 "backendServerList":[
7 {
8 "instanceId":"i-YfAibl4A",
9 "weight":"50"
10 },
11 {
12 "instanceId":"i-jBXABQ8D",
13 "weight":"60"
14 }
15 ]
16}
Response example
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Fri, 03 Jun 2016 03:54:29 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
RemoveBackendServers: Delete real servers
Description
- Delete real servers under the specified LoadBalancer, with those real servers indicated by their identifiers
- Supports batch deletion
Request structure
1PUT /v{version}/blb/{blbId}/backendserver?clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "backendServerList":[backendServer1,backendServer2,...]
7}
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| blbId | String | Yes | URL parameter | LoadBalancer identifier |
| clientToken | String | Yes | Query | Idempotency Token, with length no more than 64 characters. |
| backendServerList | List |
Yes | RequestBody | All identifiers of real servers to be deleted form an array |
Response Status Code
Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)
Response headers
No special headers beyond common headers.
Response parameters
None
Request example
1PUT /v1/blb/lb-j8UqijY/backendserver?clientToken=shfkjanajsabvhj HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "backendServerList":["i-jBXABQ8D"]
7}
Response example
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Fri, 03 Jun 2016 03:54:29 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
