This PR based on https://github.com/containers/gvisor-tap-vsock/pull/609 And its REST API is based on https://github.com/containers/gvisor-tap-vsock/issues/630
Activity
16Here performance test comparison:
Performance Impact: 100 Domain Blocklist Entries
Environment: macOS Darwin 25.5.0, arm64, Fedora CoreOS VM
Branch: filter-outgoing-connection
Test: test-perf-qemu (21/21 pass), test-perf-mac (21/21 pass)
QEMU
| Metric | Baseline | +100 Blocklist | Delta |
|---|---|---|---|
| TCP VM→Host | 2867.51 Mbps | 2769.20 Mbps | -3.4% |
| TCP Host→VM | 2037.93 Mbps | 2027.57 Mbps | -0.5% |
| TCP fwd Host→VM | 1905.79 Mbps | 2067.15 Mbps | +8.5% |
| TCP fwd VM→Host | 2976.71 Mbps | 2779.36 Mbps | -6.6% |
| TCP 1 stream | 2840.45 Mbps | 2807.80 Mbps | -1.1% |
| TCP 4 streams | 2791.13 Mbps | 2753.43 Mbps | -1.4% |
| TCP 8 streams | 2819.41 Mbps | 2775.95 Mbps | -1.5% |
| UDP VM→Host | 1.05 Mbps | 1.05 Mbps | 0.0% |
| UDP Host→VM | 1.05 Mbps | 1.05 Mbps | 0.0% |
| Ping gateway avg | 0.661 ms | 0.590 ms | -10.7% |
| Ping external avg | 8.343 ms | 8.968 ms | +7.5% |
| DNS internal avg | 0.0 ms | 0.0 ms | — |
| DNS internal p95 | 0 ms | 0 ms | — |
| DNS external avg | 1.1 ms | 1.5 ms | +36.4% |
| DNS external max | 2 ms | 7 ms | +250% |
| HTTP req/sec | 2086.1 | 1958.3 | -6.1% |
| HTTP avg latency | 0.48 ms | 0.51 ms | +6.3% |
| Expose avg | 161 µs | 121 µs | -24.8% |
| Unexpose avg | 115 µs | 98 µs | -14.8% |
vfkit
| Metric | Baseline | +100 Blocklist | Delta |
|---|---|---|---|
| TCP VM→Host | 3154.36 Mbps | 3284.18 Mbps | +4.1% |
| TCP Host→VM | 1471.18 Mbps | 1522.41 Mbps | +3.5% |
| TCP fwd Host→VM | 1476.93 Mbps | 1539.93 Mbps | +4.3% |
| TCP fwd VM→Host | 3113.83 Mbps | 3275.83 Mbps | +5.2% |
| TCP 1 stream | 3090.61 Mbps | 3285.70 Mbps | +6.3% |
| TCP 4 streams | 3010.52 Mbps | 3554.11 Mbps | +18.1% |
| TCP 8 streams | 2830.14 Mbps | 2944.97 Mbps | +4.1% |
| UDP VM→Host | 1.05 Mbps | 1.05 Mbps | 0.0% |
| UDP Host→VM | 1.05 Mbps | 1.05 Mbps | 0.0% |
| Ping gateway avg | 0.390 ms | 0.429 ms | +10.0% |
| Ping external avg | 8.720 ms | 8.831 ms | +1.3% |
| DNS internal avg | 0.0 ms | 0.2 ms | — |
| DNS internal p95 | 0 ms | 1 ms | — |
| DNS external avg | 0.4 ms | 1.2 ms | +200% |
| DNS external max | 1 ms | 2 ms | +100% |
| HTTP req/sec | 2881.0 | 2850.1 | -1.1% |
| HTTP avg latency | 0.35 ms | 0.35 ms | 0.0% |
| Expose avg | 47 µs | 65 µs | +38.3% |
| Unexpose avg | 44 µs | 54 µs | +22.7% |
Conclusion
- Throughput: No measurable impact. All TCP/UDP variations are within normal run-to-run noise (±5-8%).
- DNS latency: Small increase on external resolution (~0.4-0.8 ms avg), negligible vs upstream RTT. Internal DNS stays sub-millisecond.
- HTTP request rate: Within noise (-1% to -6%).
- Port forwarding ops: Within noise; direction differs between QEMU and vfkit.
cc @benoitf
DCO seems missing and GPG seems invalid (https://github.com/containers/gvisor-tap-vsock/pull/687/commits says Unverified).
This PR also seems contain lots of files that do not directly relate to filtering.
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
What's the current status?
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: evidolob
The full list of commands accepted by this bot can be found here.
The pull request process is described here
OWNERS[evidolob]Approvers can indicate their approval by writing
/approvein a comment Approvers can cancel approval by writing/approve cancelin a comment