rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
12.06k stars 3.91k forks source link

Replace synchronous HTTP API requests with asynchronous #2618

Open DullReferenceException opened 7 years ago

DullReferenceException commented 7 years ago

We're unsure what's causing the call to /api/overview to not respond in our management UI, but the JavaScript sync_get calls are problematic and render browsers unresponsive as they block the main thread. Chrome even complains about these with this warning:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/

It would be a huge improvement to this management API if synchronous AJAX was replaced with asynchronous + appropriate UI feedback while waiting.

michaelklishin commented 7 years ago

We are aware of this. The plan is to rewrite the UI entirely as it is horrible in this many other ways.

jrlog commented 3 years ago

The same thing is happening with us. We have about a hundred virtual hosts and a few-thousand queues spread over a three-node cluster on 3.8.8, and it takes several seconds for the HTTP API to return stats objects. The few seconds alone isn't a huge problem, but the blocking time accumulates with the multiple sync_get calls, and it takes 10-30 seconds for page loads to complete.