feat(ipvs): add IPVS load balancer monitoring support#325
Conversation
- Add eBPF kprobe/kretprobe for IPVS kernel functions - Track IPVS call chain: CONN_NEW -> SCHEDULE -> NAT_XMIT -> CONN_PUT - Display VIP to RealServer mapping in flow chart - Support NAT/DR/TUNNEL forwarding modes - Add --enable-ipvs flag to enable IPVS tracing New files: - agent/ipvs/: IPVS tracker, cache, and event handling - bpf/ipvs.*: eBPF programs for IPVS function tracing Modified files: - agent/agent.go: Initialize IPVS tracker - agent/common/options.go: Add EnableIPVS option - agent/analysis/common/types.go: Add IPVS fields to AnnotatedRecord - agent/analysis/stat.go: Query IPVS cache when creating records - agent/render/watch/time_detail.go: Display IPVS info in flow chart - cmd/watch.go: Add --enable-ipvs flag
|
Someone is attempting to deploy a commit to the hengyoush's projects Team on Vercel. A member of the Team first needs to authorize it. |
SummaryThis PR adds IPVS (IP Virtual Server) load balancer monitoring support to kyanos. It enables users to trace IPVS kernel function calls and visualize the VIP to RealServer mapping in the network flow chart. BackgroundProblemIn Kubernetes environments using IPVS mode for kube-proxy, network traffic goes through IPVS load balancing before reaching the actual backend pods. Currently, kyanos cannot show this IPVS layer in the network flow visualization, making it difficult to:
SolutionAdd eBPF-based IPVS tracing that:
Features1. IPVS Function TracingTraces 8 key IPVS kernel functions:
2. Flow Chart IntegrationIPVS information is displayed in the flow chart: 3. Usage# Enable IPVS monitoring
./kyanos watch --remote-ports 9000 --enable-ipvsTechnical DesignArchitectureKey Components
ChangesNew Files
Modified Files
TestingEnvironment
Test Steps
Test Results
|
|
@hengyoush hi, can u review this code? |
New files:
Modified files: