Extend websocket idle connection timeout

0

This is a feature request.

I'm developing an infrastructure on AWS that manages electric vehicle chargeboxes that implements a standard protocol (OCPP v1.6 over JSON). This protocol is based on websocket, so I created an API with API Gateway that is working fine. Chargeboxes can send heartbeats with an interval between one and the next decided by the backend.

In order to reduce traffic I'd like to set this interval around 3 or 4 hours, but after 10 minutes the chargebox resets itself sending back the boot notification message because API Gateway sends a status code "1001 - Going away", so I had to reduce the interval between heartbeats down to a value smaller than 10 minutes.

Is it possible to extend this limit (described here https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html), maybe setting it as customizable?

Thanks a lot for your support!

asked 5 years ago5717 views
4 Answers
1

https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
As noted here, this limit cannot be increased. Also there is a limit for max connection duration(2 hours) which cannot be increased for now.

We could consider to make the idle time customizable in the future, but it would be between 0 and 10 minutes, not extending beyond 10 minutes. Having longer idle time means that it will take longer to detect the client who disconnected without sending close message properly.

AWS
answered 5 years ago
1

The purpose of maximum connection duration is to conserve our server resource while we provide high scalability on WebSocket API. Generally allocating resources longer makes harder to optimize the resource utilization.

We understand the current maximum connection duration is not enough for some use cases and will continue to work to improve it.

AWS
answered 5 years ago
0

Alright that makes sense. I already handled the 10 minutes problem, so I can keep it as it is.

I've just noticed the 2 hours limit. Out of curiosity, why is that? It would be nice to have clients that stay connected and do not need to perform the connection handshake so often.

Thanks a lot for your support

MattiaC
answered 5 years ago
0

Got it.
I think I'll replace the API Gateway infrastructure with an ELB and an EC2. As of now 2 hours means that our chargeboxes disconnects 12 times a day for about 10 minutes per time, which is really bad.

Hoping this limits will be improved soon.
Thanks

MattiaC
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions