devloperdevesh / devloperdevesh/FaultPlane
[Feat/Infra]: Implement an eBPF sockmap Carrier for Direct Kernel-to-Kernel Socket Forwarding across Local Clusters
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- Avg merge
- 14m
- Merged PRs (30d)
- 57
Description
Problem
When distinct localized multi-tenant microservices or agent workflows communicate with one another within the same host or cluster environment, standard proxies read connection packets from the client socket and write them back down to the target listener socket. This forces data streams to continuously bounce back and forth between kernel and user memory blocks, clogging memory bus throughput.
Proposed Solution
Build an elite, bare-metal acceleration core inside internal/gateway/sockmap_carrier.go using Linux kernel eBPF BPF_MAP_TYPE_SOCKMAP interfaces.
- Intercept local cross-service data routing pipelines directly at the transport layer layer before connection streams climb the network stack.
- Link client stream file descriptors natively with target backend listener file descriptors inside a centralized kernel mapping allocation engine using
bpf_msg_redirect_hash. - Splice the connection paths cleanly inside the kernel space, moving processed data packets directly from socket buffer to socket buffer under < 200 microseconds—completely bypassing user-space runtime reading loops.
Alternatives
- High-level application service meshes (such as traditional Envoy filters), which thop noticeable serialization boundaries and high CPU scheduling overhead.
Use Case
Reduces internal multi-cluster telemetry and microservices communication latency down to absolute physical limits, ensuring flat P99.99 execution tracks.
Additional Notes
All struct alignment and padding parameters must integrate seamlessly with the cache-line alignments established under issue #6.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading internal/gateway/sockmap_carrier.go and the cache-line alignment requirements referenced in issue #6. Then review the Linux eBPF BPF_MAP_TYPE_SOCKMAP and bpf_msg_redirect_hash interfaces before deciding how the carrier fits the existing gateway. Done means local cross-service socket forwarding uses the proposed kernel path while preserving the required alignment and target latency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- distributed-systems, networking, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100