1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
1
Hi there, adding CloudFront in front of your API Gateway, you add an annitional layer which affects the behavior of your websocket connection. In the CloudFront service quotas you have following timeout settings.
Name | Default | Adjustable | Description |
---|---|---|---|
Connection timeout per origin | 10 sec | No | The connection timeout per origin (1-10 seconds). |
Request timeout | 30 sec | Yes | The maximum request timeout in seconds. |
Origin response timeout (idle timeout) | 10 min | No | The maximum origin response timeout (idle timeout) in minutes. If CloudFront hasn’t detected any bytes sent from the origin to the client within the past 10 minutes, the connection is assumed to be idle and is closed. |
Response timeout per origin | 60 sec | Yes | The response timeout per origin (1-60 seconds). |
The majority are not adjustable and if you keep your CloudFront setup, you'll have to implement something like a Keep-Alive Message. It's quite a common workaround for dealing with websockets timeouts. It basically just sends a periodic ping message from the server to the client or vice versa.
Please verify if it's really a idle timeout which is triggered, because the non-adjustable idle timeout settings would be 10 minutes. Which seems to be more than enough for your use case.
con risposta 2 mesi fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 2 anni fa