Skip to content

Commit f69e88b

Browse files
committed
edit
1 parent fcb9e82 commit f69e88b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

articles/api-management/how-to-configure-service-fabric-backend.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,18 @@ Add the [`set-backend-service`](api-management-transformation-policies.md#SetBac
115115
1. Add the `set-service-backend` policy statement.
116116
* In `backend-id`, substitute the name of your Service Fabric backend.
117117

118-
* The `sf-resolve-condition` is a condition for re-resolving a service location and resending a request. The number of retries was set when configuring the backend. The following example handles cases where the Service Fabric cluster partition isn't resolved, or cluster nodes are removed or unavailable.
118+
* The `sf-resolve-condition` is a condition for re-resolving a service location and resending a request. The number of retries was set when configuring the backend. For example:
119119

120-
```xml
121-
<set-backend-service backend-id="mysfbackend" sf-resolve-condition="@((int)context.Response.StatusCode != 200 || context.LastError?.Reason == "BackendConnectionFailure" || context.LastError?.Reason == "Timeout")"/>
120+
```xml
121+
<set-backend-service backend-id="mysfbackend" sf-resolve-condition="@(context.LastError?.Reason == "BackendConnectionFailure")"/>
122122
```
123123
1. Select **Save**.
124124

125125
:::image type="content" source="media/backends/set-backend-service.png" alt-text="Configure set-backend-service policy":::
126126

127+
> [!NOTE]
128+
> If one or more nodes in the Service Fabric cluster goes down or is removed, API Management does not get an automatic notification and continues to send traffic to these nodes. To handle these cases, configure a resolve condition similar to: `sf-resolve-condition="@((int)context.Response.StatusCode != 200 || context.LastError?.Reason == "BackendConnectionFailure" || context.LastError?.Reason == "Timeout")"`
129+
127130
### Test backend API
128131

129132
1. On the **Test** tab, select the **GET** operation you created in a previous section.

0 commit comments

Comments
 (0)