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 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.
17
17
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.
19
19
20
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, 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 backendprotocol 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. |
27
27
28
28
## Prerequisites
29
29
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.
33
32
34
33
```azurecli
35
34
az extension remove --name spring
36
35
az extension add --name spring
37
36
az extension remove --name spring-cloud
38
37
```
39
38
40
-
## Set the ingress settings when creating an app
39
+
## Set the ingress configuration
41
40
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.
43
42
44
43
```azurecli
45
44
az spring app create \
@@ -53,24 +52,30 @@ az spring app create \
53
52
--backend-protocol Default \
54
53
```
55
54
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
57
62
58
63
## Update the ingress settings for an existing app
59
64
60
65
### [Azure portal](#tab/azure-portal)
61
66
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.
63
68
64
69
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.
67
72
1. Update the ingress settings, and then select **Save**.
68
73
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.":::
70
75
71
76
### [Azure CLI](#tab/azure-cli)
72
77
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.
74
79
75
80
```azurecli
76
81
az spring app update \
@@ -84,29 +89,43 @@ az spring app update \
84
89
--backend-protocol GRPC \
85
90
```
86
91
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
88
99
89
100
## FAQ
90
101
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.
93
109
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.
98
111
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?
100
113
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.
103
119
104
120
- 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
121
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).
108
127
109
128
## Next steps
110
129
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)
0 commit comments