envoyproxy/envoy

Use per-resource version to avoid hashing protos in xDS updates

Open

#14,367 建立於 2020年12月10日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)C++ (5,373 fork)batch import
area/perfarea/xdsenhancementhelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

xDS APIs today use hashes of incoming resource protos to compare against the existing resource version when determining if any updates needs to be made. This is expensive (we're measuring ~8% CPU in some workloads), since we need to flatten to text for Envoy-canonical proto hashing (protobuf doesn't do its own hashing).

It's also unnecessary when delivered resources are provided via delta xDS (or even SotW when we encapsulate in a Resource object). In these cases, we have per-resource versioning that can play the same role as the hash without any computational requirement.

Opening this issue to track potential optimization work here. I think the main value is for SotW+Resource wrapper, since delta xDS will be pushing the diffing to the server-side anyway, so there isn't a lot of saving.

FWIW, I think we had a thread on this ages ago but I can't spot it.

貢獻者指南