nsqio / go-nsq

The official Go package for NSQ
MIT License
2.59k stars 444 forks source link

Use buffered writer for Snappy compression. #362

Open philpearl opened 6 months ago

philpearl commented 6 months ago

The non-buffered writer is now deprecated. Also the amount of compression achieved and the CPU overhead is much better when using the buffered writer.

In our testing the amount of data sent by the NSQ library with Snappy compression enabled didn't improve much at all without this fix - the data was perhaps 4/5s of the original size. With the fix it's closer to 50%