Currently, buffered client optimizes only at the level of each "key" being updated if many of them come before a flush happens.
However, SendEvent is called for each key, and then an fmt.Fprintf(c.conn...) for every stat in that event. This leads to quite a lot of udp traffic.
The statsd protocol supports sending more than one stat by separating by \n. By doing so, we will reduce the number of fmt.Fprintf(c.conn...) calls, thereby reducing udp traffic.
Currently, buffered client optimizes only at the level of each "key" being updated if many of them come before a flush happens. However,
SendEvent
is called for each key, and then anfmt.Fprintf(c.conn...)
for every stat in that event. This leads to quite a lot of udp traffic. The statsd protocol supports sending more than one stat by separating by\n
. By doing so, we will reduce the number offmt.Fprintf(c.conn...)
calls, thereby reducing udp traffic.