G+: Finally had a chance to play around with …

David Coles
Finally had a chance to play around with Linux BPF socket filtering today. I was interesting in seeing if it was possible to have two separate processes listening on the same UDP port but have them handle different connections based on the UDP payload.

Recently Linux learned the SO_REUSEPORT option (see http://lwn.net/Articles/542629/ ) which in theory should allow load-balancing of connections between processes in this manner but alas, it seems like all my connections are handled by the most recently run process.

(I'm also worried that the BPF filtering behavior may be to not just reject the packet from this socket, but to drop the packet from the system entirely, but I figure I need to get the load balancing case working first)

experiments/bpf at master · dcoles/experiments · GitHub

(+1's) 1