You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
17
17
18
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.
19
19
20
-
| Name | Ingress setting | Default value | Valid range | Description |
| 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. |
23
27
24
28
## Prerequisites
25
29
@@ -33,43 +37,74 @@ The Azure Spring Apps service uses an underlying ingress controller to handle ap
33
37
az extension remove --name spring-cloud
34
38
```
35
39
36
-
## Set the ingress configuration when creating a service
40
+
## Set the ingress settings when creating an app
37
41
38
42
You can set the ingress configuration when creating a service by using the following CLI command.
39
43
40
44
```azurecli
41
-
az spring create \
45
+
az spring app create \
42
46
--resource-group <resource-group-name> \
47
+
--service <service-name> \
43
48
--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 \
45
54
```
46
55
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`.
48
57
49
-
## Update the ingress configuration for an existing service
58
+
## Update the ingress settings for an existing app
50
59
51
60
### [Azure portal](#tab/azure-portal)
52
61
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:
54
63
55
64
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**.
58
68
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.":::
60
70
61
71
### [Azure CLI](#tab/azure-cli)
62
72
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:
64
74
65
75
```azurecli
66
-
az spring update \
76
+
az spring app update \
67
77
--resource-group <resource-group-name> \
78
+
--service <service-name> \
68
79
--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 \
70
85
```
71
86
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)
0 commit comments