core/homeassistant/components/websocket_api
J. Nick Koston 79bc179ce8
Improve websocket message coalescing to handle thundering herds better (#118268)
* Increase websocket peak messages to match max expected entities

During startup the websocket would frequently disconnect if more than
4096 entities were added back to back. Some MQTT setups will have more
than 10000 entities. Match the websocket peak value to the max expected
entities

* coalesce more

* delay more if the backlog gets large

* wait to send if the queue is building rapidly

* tweak

* tweak for chrome since it works great in firefox but chrome cannot handle it

* Revert "tweak for chrome since it works great in firefox but chrome cannot handle it"

This reverts commit 439e2d76b1.

* adjust for chrome

* lower number

* remove code

* fixes

* fast path for bytes

* compact

* adjust test since we see the close right away now on overload

* simplify check

* reduce loop

* tweak

* handle ready right away
2024-05-28 23:14:06 -04:00
..
__init__.py
auth.py
commands.py
connection.py
const.py Improve websocket message coalescing to handle thundering herds better (#118268) 2024-05-28 23:14:06 -04:00
decorators.py
error.py
http.py Improve websocket message coalescing to handle thundering herds better (#118268) 2024-05-28 23:14:06 -04:00
manifest.json
messages.py Collapse websocket_api _state_diff into _state_diff_event (#118170) 2024-05-26 16:04:34 +02:00
sensor.py
services.yaml
strings.json
util.py