Help me understand why you shouldn't ask Elasticsearch to pretty print everything


(Logan) #1

I already know that adding ?pretty=true to your production queries is a bad idea and that the documentation specifically says "use it for debugging only!" I just want to understand how bad of an idea this is and if there are any specific metrics or articles I can point to in order to better make my case in asking my development team to make a change to their code. We are currently running Elasticsearch version 2.3.5 in a analytics role and see tens of thousands of aggregation heavy queries per day.

Obviously it would greatly increase the size of the response payload as it flows through the network and while I can't imagine it costs a lot of cpu cycles in Elasticsearch the cost is definitely not zero plus whatever memory implications there are. Does anyone have some expert insight they can share?


(Adrien Grand) #2

I think you named all issues: larger responses will incur CPU, network, memory overhead. And this is unnecessary overhead if the consumer of the response is a machine, it might actually even make things even slower as the parser will need to skip over tons of white spaces.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.