Contributor
tonyli233

Move out of gogo/protobuf to protobuf with vtproto implementation


Mentors
Max Amin, Callum Styan
Organization
CNCF
Technologies
prometheus, go, protobuf, HTTP, Buf
Topics
cloud, benchmarking
We propose transitioning from the deprecated gogo/protobuf to Vitess's vtproto as part of an effort to modernize Prometheus's codebase. The migration requires minor changes to the original code structure. However, agent-side performance degrades significantly by around 50% according to cstyan’s experimental results. While manually serializing the data structure can avoid these allocation overheads, we prefer not to maintain hand-written marshal/unmarshal code. The upcoming Remote-write-2.0 (rw2.0) will address these memory allocation overheads. By pushing for rw2.0 alongside migrating to vtproto, we can utilize a better-maintained library and eliminate this allocation if rw2.0 is adopted quickly. Therefore, I propose that we manually marshal/unmarshal protobuf while pushing for rw2.0's publication.