Comments (2)
Hi @ronf, for all the reasons you seem to have discovered, proxy protocol isn't really well suited (or easily suited) to UDP. Due to datagram packet size limitations, it's not necessarily safe to just add a header to every packet unless the application protocol is guaranteed to leave enough room.
One possibility would be to send a packet that contains the full proxy protocol header (v2 + TLV can be a few hundred bytes) and subsequent application packets could simply reference the header (e.g. by hash), assuming that each source is cached on the receiver side. I don't think something like that could be made generic enough to include in this library, especially without inclusion in the proxy protocol spec, but it could work for your situation.
Hope that helps, feel free to reopen if you have any more questions or ideas.
from proxy-protocol.
Thanks for getting back to me. I agree with the concerns you mentioned around length. Adding such a header in every packet would probably not exceed the max UDP datagram size, but it could lead to IP fragmentation if the original UDP packets were already close to the MTU in size, and having every packet fragmented is far from ideal.
There's also an ordering and packet loss concern with the "hash" approach, if the initial packet with the full header is dropped or if it arrives out of order and the receiver gets a packet with the hash in it before the one with the full header.
To be clear, my original question was to try and get clarity on the current proxy protocol v2 spec and not to ask for something new to be implemented. It seems like maybe there isn't an implementation that addresses these issues, though, despite to spec mentioning UDP as one of the options.
from proxy-protocol.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proxy-protocol.