如果是内网使用的话UDP应该效率更高的, https://redis.io/topics/protocol
Networking layer
A client connects to a Redis server creating a TCP connection to the port 6379.
While RESP is technically non-TCP specific, in the context of Redis the protocol is only used with TCP connections (or equivalent stream oriented connections like Unix sockets).
udp是不可靠的,没有重传机制,大概是怕丢失数据?