gobetween
gobetween copied to clipboard
[FEATURE QUERY] UDP Application Awareness
Hi All,
Been examining your project - great work and very well delivered.
I was wondering if application awareness is possible, namely in the following manner: Assume a UDP protocol that sends messages in a following format fashion:
{ "command": "some-command", "some-ident": "cfBXzDSZqhYNcXM", "data-object": {} }
Now, I would like to make sure that the server handling "some-ident" will always be the same server. Potentially, providing gobetween an "application awareness" plug-in or backend, to allow developers to incorporate their own "stickiness" - depending on the application at hand.
Is that possible?
Hi @greenfieldtech-nirs We had plans to add kind of custom "middleware" plugins to inject custom business logic into proxy code, but still not came up with an elegant idea that will be suitable both to udp and tcp and flexible enough to cover most of business cases. Thanks for your questions anyways! It helps us to understand more use cases that may be covered by this new feature.
Hi @yyyar ,
Thanks for replying. I believe a "middleware" won't be the correct solution here, as it will indicate a "pluggable" methodology of coding. Preferably, I think the best would be an "API approach" with a global activation.
For example, imagine a packet is accepted at the load balancer. The balancer will store the packet into a queue, while in parallel will send a message into a "bus" saying that a message had been received, asking for additional processing instructions. The bus may have multiple handling entities to it, which will then simply respond back with the correct "balancing case". In this manner, you don't need a pluggable middleware architecture, but a more unified process. Based upon the choice of "bus" will determine the performance, however, I do believe that for most cases, any response that is under the 10ms response should not affect any production payloads.
What do you think?