Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Add support for non-JSON encoding of replies #367

Merged
merged 1 commit into from
Mar 24, 2017

Conversation

binarin
Copy link

@binarin binarin commented Mar 23, 2017

One of the low-hanging fruits in HTTP API optimization.
E.g. serializing information about 10000 queues:

  • For JSON it takes 2 seconds on my machine and more than 1GB of RAM
  • For BERT it takes 0.2 seconds and a negligible amount of RAM

If the approach in general is OK, I'm going to replace all other
instances of <<"application/json">> everywhere.

@michaelklishin
Copy link
Member

Thank you! I personally don't see any issues with this approach.

@michaelklishin michaelklishin added this to the 3.6.9 milestone Mar 23, 2017
@kjnilsson
Copy link
Contributor

@binarin thank you - the approach looks generally fine to me.

@dcorbacho
Copy link
Contributor

@binarin thanks, looks good to me too!

@michaelklishin
Copy link
Member

@binarin so can you please get this PR into a state that's ready for QA and merging?

@binarin binarin force-pushed the json-alternatives branch from f33b64b to 9819756 Compare March 24, 2017 08:13
@binarin binarin changed the title DO NOT MERGE Add support for non-JSON encoding of replies Add support for non-JSON encoding of replies Mar 24, 2017
One of the low-hanging fruits in HTTP API optimization.
E.g. serializing information about 10000 queues:
- For JSON it takes 2 seconds on my machine and more than 1GB of RAM
- For BERT it takes 0.2 seconds and negligible amount of RAM
@binarin binarin force-pushed the json-alternatives branch from 9819756 to a2897c0 Compare March 24, 2017 08:57
@binarin
Copy link
Author

binarin commented Mar 24, 2017

Done

@michaelklishin michaelklishin merged commit a2897c0 into rabbitmq:stable Mar 24, 2017
binarin pushed a commit to binarin/rabbitmq_exporter that referenced this pull request Apr 14, 2017
Since 3.6.9 (see rabbitmq/rabbitmq-management#367) RabbitMQ
supports BERT encoding as a JSON alternative. Given that BERT encoding
is implemented in C inside the Erlang VM, it's way more effective than
pure-Erlang JSON encoding. So this greatly reduces monitoring overhead
when we have a lot of objects in RabbitMQ.
binarin pushed a commit to binarin/rabbitmq_exporter that referenced this pull request Apr 14, 2017
Since 3.6.9 (see rabbitmq/rabbitmq-management#367) RabbitMQ
supports BERT encoding as a JSON alternative. Given that BERT encoding
is implemented in C inside the Erlang VM, it's way more effective than
pure-Erlang JSON encoding. So this greatly reduces monitoring overhead
when we have a lot of objects in RabbitMQ.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants