Configures a back-to-origin policy for the forwarding rule of a website.
Operation description
If multiple origin servers are configured for a website that is added to Anti-DDoS Pro or Anti-DDoS Premium, you can modify the load balancing algorithms for back-to-origin traffic based on back-to-origin policies. The IP hash algorithm is used by default. You can change the algorithm to the round-robin or least response time algorithm. For more information, see the description of the Policy parameter in the "Request parameters" section of this topic.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group. For more information about resource groups, see Create a resource group. |
rg-acfm2pz25js**** |
| Domain |
string |
Yes |
The domain name of the website. Note
A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query the domain names for which forwarding rules are configured. |
www.aliyun.com |
| Policy |
string |
Yes |
The back-to-origin policy. The value is a string that consists of a JSON struct. The JSON struct contains the following fields:
|
{"ProxyMode":"rr","Attributes":[{"RealServer":"1.***.***.1","Attribute":{"Weight":100,"ConnectTimeout":5,"FailTimeout":10,"MaxFails":3,"Mode":"active","ReadTimeout":120,"SendTimeout":120}},{"RealServer":"2.***.***.2","Attribute":{"Weight":100,"ConnectTimeout":5,"FailTimeout":10,"MaxFails":3,"Mode":"active","ReadTimeout":120,"SendTimeout":120}}]} |
| UpstreamRetry |
integer |
No |
The retry switch. Valid values:
|
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc |
Examples
Success response
JSON format
{
"RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.