Skip to content

Commit 5654235

Browse files
committed
Add ingress settings doc
1 parent 08f6acf commit 5654235

File tree

1 file changed

+52
-17
lines changed

1 file changed

+52
-17
lines changed

articles/spring-apps/how-to-configure-ingress.md

Lines changed: 52 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ ms.custom: devx-track-java, devx-track-azurecli
1313

1414
**This article applies to:** ✔️ Basic/Standard tier ✔️ Enterprise tier
1515

16-
This article shows you how to set and update the ingress configuration in Azure Spring Apps by using the Azure portal and Azure CLI.
16+
This article shows you how to set and update the applications' ingress settings in Azure Spring Apps by using the Azure portal and Azure CLI.
1717

1818
The Azure Spring Apps service uses an underlying ingress controller to handle application traffic management. Currently, the following ingress setting is supported for customization.
1919

20-
| Name | Ingress setting | Default value | Valid range | Description |
21-
|----------------------|--------------------|---------------|-------------|----------------------------------------------------------------------|
22-
| ingress-read-timeout | proxy-read-timeout | 300 | \[1,1800\] | The timeout in seconds for reading a response from a proxied server. |
20+
| Name | Ingress setting | Default value | Valid range | Description |
21+
|----------------------|------------------------|---------------|-------------------|--------------------------------------------------------------------------|
22+
| ingress-read-timeout | proxy-read-timeout | 300 | \[1,1800\] | The timeout in seconds for reading a response from a proxied server. |
23+
| ingress-send-timeout | proxy-send-timeout | 60 | \[1,1800\] | The timeout in seconds for transmitting a request to the proxied server. |
24+
| session-affinity | affinity | None | \[Session, None\] | Type of the affinity, set this to Cookie to enable session affinity. |
25+
| session-max-age | session-cookie-max-age | 0 | \[0,7 days\] | Time seconds until the cookie expires, corresponds to the Max-Age cookie directive. If set to 0, the expiration period is equal to the browser session period. |
26+
| backend-protocol | backend-protocol | Default | \[Default, GRPC\] | Sets the backend-protocol to indicate how NGINX should communicate with the backend service. Default means HTTP/HTTPS/WebSocket. The setting is only about client-to-app traffic, for app-to-app traffic within the same service instance, you can use any protoco. |
2327

2428
## Prerequisites
2529

@@ -33,43 +37,74 @@ The Azure Spring Apps service uses an underlying ingress controller to handle ap
3337
az extension remove --name spring-cloud
3438
```
3539

36-
## Set the ingress configuration when creating a service
40+
## Set the ingress settings when creating an app
3741

3842
You can set the ingress configuration when creating a service by using the following CLI command.
3943

4044
```azurecli
41-
az spring create \
45+
az spring app create \
4246
--resource-group <resource-group-name> \
47+
--service <service-name> \
4348
--name <service-name> \
44-
--ingress-read-timeout 300
49+
--ingress-read-timeout 300 \
50+
--ingress-send-timeout 60 \
51+
--session-affinity Cookie \
52+
--session-max-age 1800 \
53+
--backend-protocol Default \
4554
```
4655

47-
This command will create a service with ingress read timeout set to 300 seconds.
56+
This command will create an app with ingress read timeout set to 300 seconds, ingress send timeout set to 60 seconds, session affinity set to `Cookie`, session cookie max age set to 1800 seconds, backend protocol set to `Default`.
4857

49-
## Update the ingress configuration for an existing service
58+
## Update the ingress settings for an existing app
5059

5160
### [Azure portal](#tab/azure-portal)
5261

53-
To update the ingress configuration for an existing service, use the following steps:
62+
To update the ingress settings for an existing service's application, use the following steps:
5463

5564
1. Sign in to the portal using an account associated with the Azure subscription that contains the Azure Spring Apps instance.
56-
2. Navigate to the **Networking** pane, then select the **Ingress configuration** tab.
57-
3. Update the ingress configuration, and then select **Save**.
65+
2. Navigate to the **Apps** pane, then select the app you want to configure.
66+
3. Navigate to the **Configuration** pane, then select the **Ingress settings** tab.
67+
4. Update the ingress settings, and then select **Save**.
5868

59-
:::image type="content" source="media/how-to-configure-ingress/config-ingress-read-timeout.png" lightbox="media/how-to-configure-ingress/config-ingress-read-timeout.png" alt-text="Screenshot of Azure portal example for config ingress read timeout.":::
69+
:::image type="content" source="media/how-to-configure-ingress/ingress-settings.jpg" lightbox="media/how-to-configure-ingress/ingress-settings.jpg" alt-text="Screenshot of Azure portal example for config ingress settings.":::
6070

6171
### [Azure CLI](#tab/azure-cli)
6272

63-
To update the ingress configuration for an existing service, use the following command:
73+
To update the ingress settings for an existing app, use the following command:
6474

6575
```azurecli
66-
az spring update \
76+
az spring app update \
6777
--resource-group <resource-group-name> \
78+
--service <service-name> \
6879
--name <service-name> \
69-
--ingress-read-timeout 600
80+
--ingress-read-timeout 600 \
81+
--ingress-send-timeout 600 \
82+
--session-affinity None \
83+
--session-max-age 0 \
84+
--backend-protocol GRPC \
7085
```
7186

72-
This command will update the ingress read timeout to 600 seconds.
87+
This command will update the ingress read timeout to 600 seconds, ingress send timeout set to 600 seconds, session affinity set to `None`, session cookie max age set to 0, backend protocol set to `GRPC`.
88+
89+
## FAQ
90+
- How to enable gRPC?
91+
- Set the backend protocol to `GRPC`.
92+
93+
- How to enable WebSocket?
94+
- Set the backend protocol to `Default`, and the WebScocket is enabled by default.
95+
- For WebSocket connection limit, the upper limit is 20000, and when you reach that limit the connection will fail.
96+
- You can use RSocket based on WebSocket, as well as you set the backend protocol to `Default`.
97+
98+
- Can I still use the old ingress config settings?
99+
- Yes, you can still use old ingress config in sdk, but once an app has been configured by new ingress settings, the old ingress config will not affect it.
100+
101+
- When ingress settings are used together with App Gateway/APIM, what is the overall effect of timeout when you set the timeout in both ASA ingress and the App Gateway/APIM?
102+
- The shorter timeout should be effective.
103+
104+
- Do you need extra config in App Gateway/APIM if you need to have end-to-end support for gRPC or WebSocket?
105+
- Nothing extra config as long as the App Gateway support gRPC.
106+
107+
- Configurable port is not currently supported (80/443)
73108

74109
## Next steps
75110

0 commit comments

Comments
 (0)