golang / groupcache

groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.
Apache License 2.0
12.93k stars 1.39k forks source link

Why do not use RPC to request another GroupCache instance #147

Open seraph98 opened 3 years ago

seraph98 commented 3 years ago

Hi, I am confused why do not use RPC protocal for requesting another GroupCache instancne, it might have better performance than HTTP.

thrawn01 commented 3 years ago

groupcache uses HTTP2 for it's transport when configured correctly. You also have the option of using protobuf as the serialization method. Together these options can be much faster than using GPRC, which introduces a bit more overhead than just regular HTTP2 and Protobuf.

Also, you might not realize, GRPC uses HTTP2 as it's transport.