Skip to content

Commit cb97375

Browse files
authored
Merge pull request #178349 from dlepow/apimsf
[APIM] Update policy example for APIM-SF integration
2 parents b0da8fd + f69e88b commit cb97375

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,21 @@ Add the [`set-backend-service`](api-management-transformation-policies.md#SetBac
112112

113113
1. On the **Design** tab, in the **Inbound processing** section, select the code editor (**</>**) icon.
114114
1. Position the cursor inside the **&lt;inbound&gt;** element
115-
1. Add the following policy statement. In `backend-id`, substitute the name of your Service Fabric backend.
115+
1. Add the `set-service-backend` policy statement.
116+
* In `backend-id`, substitute the name of your Service Fabric backend.
116117

117-
The `sf-resolve-condition` is a retry condition if the cluster partition isn't resolved. The number of retries was set when configuring the backend.
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:
118119

119-
```xml
120-
<set-backend-service backend-id="mysfbackend" sf-resolve-condition="@(context.LastError?.Reason == "BackendConnectionFailure")" />
120+
```xml
121+
<set-backend-service backend-id="mysfbackend" sf-resolve-condition="@(context.LastError?.Reason == "BackendConnectionFailure")"/>
121122
```
122123
1. Select **Save**.
123124

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

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+
126130
### Test backend API
127131

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

0 commit comments

Comments
 (0)