Filter infra traffic at the Hubble agents
Host-originated flows, remote-node, cilium health and DNS :53 were ~74% of the non-reply events on a 12k-event sample and none of them map to a workload card; streaming them all kept hubble-relay at ~400m CPU. They are now blacklisted in the GetFlows request, so agents drop them before the relay. The UI's "Служебный" toggle had nothing left to show and is gone; the legend says what isn't collected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6ead0a0d6d
commit
41f9b47556
@@ -130,6 +130,19 @@ func (c *collector) setErr(err error) {
|
||||
log.Printf("hubble: %v", err)
|
||||
}
|
||||
|
||||
// Filtered at the agents, so the relay never serialises them. Measured on a
|
||||
// 12k-event sample: host-originated traffic (kubelet probes, hostNetwork
|
||||
// pods) 43% of non-reply events, DNS :53 19%, remote-node 11%, cilium
|
||||
// health 1%. None of it attaches to a workload card, and the relay spent
|
||||
// ~400m CPU streaming it all.
|
||||
var infraFilters = []*flowpb.FlowFilter{
|
||||
{SourceLabel: []string{"reserved:host"}},
|
||||
{SourceLabel: []string{"reserved:remote-node"}},
|
||||
{SourceLabel: []string{"reserved:health"}},
|
||||
{DestinationLabel: []string{"reserved:health"}},
|
||||
{DestinationPort: []string{"53"}},
|
||||
}
|
||||
|
||||
var flowFields = []string{"time", "verdict", "IP", "l4", "source", "destination", "source_names", "destination_names", "node_name"}
|
||||
|
||||
func (c *collector) run(obs observerpb.ObserverClient) {
|
||||
@@ -145,6 +158,7 @@ func (c *collector) run(obs observerpb.ObserverClient) {
|
||||
// tuples after a reconnect collapse in the per-minute sets
|
||||
Since: timestamppb.New(time.Now().Add(-time.Minute)),
|
||||
Whitelist: []*flowpb.FlowFilter{{Reply: []bool{false}}},
|
||||
Blacklist: infraFilters,
|
||||
}
|
||||
if useMask {
|
||||
req.FieldMask = &fieldmaskpb.FieldMask{Paths: flowFields}
|
||||
|
||||
Reference in New Issue
Block a user