js icon indicating copy to clipboard operation
js copied to clipboard

[Bug]: HTTP API DoS / No back-off on API failures

Open broglep opened this issue 11 months ago • 1 comments

Hardware

Not Applicable

Connection Type

HTTP

Local or Hosted

http://meshtastic.local

Firmware Version

Description

The web interface constantly performs new HTTP API calls even if they have failed. There seems to be no time in between requests and this essential performs an denial of service to the API and at the same time drives up CPU usage of the browser.

Web web interface should add some delay after failed request, ideally an exponential backoff and maybe even treat 4xx and 5xx differently. For 4xx response codes it is unlikely that retrying will help anything, so web interface should probably abort. For 5xx response codes the API call can be retried after some backoff

Relevant console output

No response

broglep avatar Jan 05 '25 14:01 broglep

Thanks for the report! Can you please open this issue in the JS library repo : https://github.com/meshtastic/js ?

danditomaso avatar Jan 05 '25 17:01 danditomaso