websocket client performance

LarsHostrup
Posts: 1
Joined: Mon Feb 13, 2023 7:24 pm

websocket client performance

Postby LarsHostrup » Mon Feb 27, 2023 6:00 pm

Hi,

I'm building a solution where an app runs a websocket server and a number of esp32s3 devices acts as clients and connect to this server over wifi. The general functionality is that a client when triggered sends a message to the app which in turn sends a message to one of the connected clients and the problem is that the time from a client sends a message until the next message is received by a client is way to long (300-500ms).

The client sw is based on the managed component esp_websocket_client. In order to isolate the problem I have implemented a very simple websocket client (again based on esp_websocket_client) and tested it with the example ws_echo_server (esp/esp-idf/examples/protocols/http_server/ws_echo_server/) which resulted in similar bad performance.

I then tried to run a python websocket client on my laptop and tested it against the echo server running on a esp32 which performed as expected (almost all roundtrip times below 100ms) so it seems that its not hw limitation.

I have also tried a microPython client and a client based on the mongoose framework both with poor results. It seems that when the client is running on a esp32 the performance is bad.

Please advise, I’m getting desperate ;-)

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: websocket client performance

Postby ESP_Sprite » Tue Feb 28, 2023 12:58 am

Have you tried turning off WiFi power saving?

Who is online

Users browsing this forum: No registered users and 73 guests