[rabbitmq-discuss] Rabbit Management API Overhead/Impact

Simon MacMullen simon at rabbitmq.com
Mon Apr 16 13:44:54 BST 2012


On 16/04/12 13:30, Brendan Hay wrote:
> Hi,

Hi!

> While using the HTTP/JSON API of the management plugin for
> monitoring/statistics, I was wondering what kind of performance
> implication hitting  an endpoint (ie. /channels which could return
> thousands of json entries) every 5 seconds would be?
>
> Looking through the management agent code it doesn't seem to do any sort
> of sampling/caching. Thoughts/considerations?

Yes it does, although not in the agent. The management plugin maintains 
a database of statistics for connections, channels etc (see 
rabbit_mgmt_db), so hitting such an API endpoint does not go and hit 
tons of other processes and should not be very expensive.

Ironically the most expensive thing in a management API call that 
returns lots of stuff is usually the JSON serialisation! mochijson2 is 
just not that fast. So to cut down on the work done by the management 
API itself it's well worth restricting the info items you ask for.

Which I now see is undocumented. Damn. Use something like

http://server:55672/api/channels?columns=name,message_stats.publish

i.e. comma-separated, dot to drill down.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list