Skip to content

Commit 6d9cba6

Browse files
edit pass
1 parent ae94b0b commit 6d9cba6

File tree

1 file changed

+51
-32
lines changed

1 file changed

+51
-32
lines changed

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

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,32 @@ 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 applications' ingress settings in Azure Spring Apps by using the Azure portal and Azure CLI.
16+
This article shows you how to set and update an application's ingress settings in Azure Spring Apps by using the Azure portal and Azure CLI.
1717

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

2020
| Name | Ingress setting | Default value | Valid range | Description |
2121
|----------------------|------------------------|---------------|-------------------|--------------------------------------------------------------------------|
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, which will make the request come to the same pod replica that was responding to the request before. Set session-affinity to Cookie to enable session affinity, in the portal only need to choose the enable session affinity box. |
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 backend-protocol setting is only about client-to-app traffic. For app-to-app traffic within the same service instance, choose any protocol for app-to-app traffic without modifying this option. The protocol doesn't restrict your choice of protocol for app-to-app traffic within the same service instance. |
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 | The type of the affinity that will make the request come to the same pod replica that was responding to the previous request. Set `session-affinity` to Cookie to enable session affinity. In the portal only, you must choose the enable session affinity box. |
25+
| `session-max-age` | `session-cookie-max-age` | 0 | \[0,7 days\] | The time in seconds until the cookie expires, corresponding to the `Max-Age` cookie directive. If you set `session-max-age` to 0, the expiration period is equal to the browser session period. |
26+
| `backend-protocol` | `backend-protocol` | Default | DefaultGRPC | Sets the backend protocol to indicate how NGINX should communicate with the backend service. Default means HTTP/HTTPS/WebSocket. The `backend-protocol` setting only applies to client-to-app traffic. For app-to-app traffic within the same service instance, choose any protocol for app-to-app traffic without modifying the `backend-protocol` setting. The protocol doesn't restrict your choice of protocol for app-to-app traffic within the same service instance. |
2727

2828
## Prerequisites
2929

30-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
31-
- [The Azure CLI](/cli/azure/install-azure-cli).
32-
- The Azure Spring Apps extension. Use the following command to remove previous versions and install the latest extension. If you previously installed the spring-cloud extension, uninstall it to avoid configuration and version mismatches.
30+
- An Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
31+
- [Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension. Use the following command to remove previous versions and install the latest extension. If you previously installed the spring-cloud extension, uninstall it to avoid configuration and version mismatches.
3332

3433
```azurecli
3534
az extension remove --name spring
3635
az extension add --name spring
3736
az extension remove --name spring-cloud
3837
```
3938

40-
## Set the ingress settings when creating an app
39+
## Set the ingress configuration
4140

42-
You can set the ingress configuration when creating a service by using the following CLI command.
41+
Use the following Azure CLI command to set the ingress configuration when you create.
4342

4443
```azurecli
4544
az spring app create \
@@ -53,24 +52,30 @@ az spring app create \
5352
--backend-protocol Default \
5453
```
5554

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`.
55+
This command creates an app with the following settings:
56+
57+
- Ingress read timeout: 300 seconds
58+
- Ingress send timeout: 60 seconds
59+
- Session affinity: Cookie
60+
- Session cookie max age: 1800 seconds
61+
- Backend protocol: Default
5762

5863
## Update the ingress settings for an existing app
5964

6065
### [Azure portal](#tab/azure-portal)
6166

62-
To update the ingress settings for an existing service's application, use the following steps:
67+
Use the following steps to update the ingress settings for an existing service's application.
6368

6469
1. Sign in to the portal using an account associated with the Azure subscription that contains the Azure Spring Apps instance.
65-
1. Navigate to the **Apps** pane, then select the app you want to configure.
66-
1. Navigate to the **Configuration** pane, then select the **Ingress settings** tab.
70+
1. Navigate to the **Apps** pane, and then select the app you want to configure.
71+
1. Navigate to the **Configuration** pane, and then select the **Ingress settings** tab.
6772
1. Update the ingress settings, and then select **Save**.
6873

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.":::
74+
:::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 Configuration page showing the Ingress settings tab.":::
7075

7176
### [Azure CLI](#tab/azure-cli)
7277

73-
To update the ingress settings for an existing app, use the following command:
78+
Use the following command to update the ingress settings for an existing app.
7479

7580
```azurecli
7681
az spring app update \
@@ -84,29 +89,43 @@ az spring app update \
8489
--backend-protocol GRPC \
8590
```
8691

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`.
92+
This command updates the app with the following settings:
93+
94+
- Ingress read timeout: 600 seconds
95+
- Ingress send timeout: 600 seconds
96+
- Session affinity: None
97+
- Session cookie max age: 0
98+
- Backend protocol: GRPC
8899

89100
## FAQ
90101

91-
- How to enable gRPC?
92-
- Set the backend protocol to `GRPC`.
102+
- How do you enable gRPC?
103+
104+
Set the backend protocol to *GRPC*.
105+
106+
- How do you enable WebSocket?
107+
108+
WebSocket is enabled by default if you set the backend protocol to *Default*. The WebSocket connection limit is 20000. When you reach that limit, the connection will fail.
93109

94-
- How to enable WebSocket?
95-
- Set the backend protocol to `Default`, and the WebSocket is enabled by default.
96-
- For WebSocket connection limit, the upper limit is 20000, and when you reach that limit the connection will fail.
97-
- You can also use RSocket based on WebSocket.
110+
You can also use RSocket based on WebSocket.
98111

99-
- The `ingress config` still can be used in CLI and sdk, and that setting will apply to all apps within the service instance, but once an app has been configured by `ingress settings`, the `ingress config` won't affect it. We don't recommend that new scripts use "ingress config" since we plan to stop supporting it in the future.
112+
- What is the difference between ingress config and ingress settings?
100113

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.
114+
Ingress config can still be used in the Azure CLI and SDK, and that setting will apply to all apps within the service instance. Once an app has been configured by ingress settings, the Ingress config won't affect it. We don't recommend that new scripts use ingress config since we plan to stop supporting it in the future.
115+
116+
- When ingress settings are used together with App Gateway/APIM, what happens when you set the timeout in both Azure Spring Apps ingress and the App Gateway/APIM?
117+
118+
The shorter timeout is used.
103119

104120
- 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.
106121

107-
- Configurable port isn't currently supported (80/443)
122+
You do not need extra config as long as the App Gateway supports gRPC.
123+
124+
- Is configurable port supported?
125+
126+
Configurable port isn't currently supported (80/443).
108127

109128
## Next steps
110129

111-
- [Learn more about ingress controller](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers)
112-
- [Learn more about NGINX ingress controller](https://kubernetes.github.io/ingress-nginx)
130+
- [Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers)
131+
- [NGINX ingress controller](https://kubernetes.github.io/ingress-nginx)

0 commit comments

Comments
 (0)