I am receiving messages from a 3rd party via a http post, and it is important that the order the messages hit our infrastructure is maintained through the load balancers and proxies until it hits our application server.
Quick Diagram. (proxies in place due to security requirements.)
[ACE load balancer] -> [2 proxies] -> [Application Servers]
or maybe
[ACE load balancer] -> [2 proxies] -> [ACE load balancer] -> [Application Servers]
My idea was that I would setup the load balancers in active-passive mode, to force all messages to use one proxy, and then both the proxies would hit a second load balancer that would be configu开发者_开发问答red in active passive to hit one application server.
Whilst the above is not ideal, it does give me resilience, and once the message is in my app servers, I enter a stateless world, and load balance across both nodes of my cluster.
However, I am concerned that even a single proxy could send messages out of order, perhaps if 2 messages are recived very close together, message 2 might get processed faster than message 1. Is this possible? Likely? Is there a simple open source proxy (MOD_PROXY?) that can be easily configured to just pass messages through it, and to guarantee to send the messages through in the order they are received. If so which, and finally links to how I should configure it would be great.
In fact any links to articles around avoiding "out of order" messages using hardware would be gratefully received.
Thanks,
ps for those that are interested, the app is a java spring integration application currently on a appliation server.
I think your scenario is possible - mutlithreading and asynchronous processing can introduce such behaviour. How likely iot is depends on the type and variability of requests.
If you really need requests to be ordered on proxy I have this silly solution: stamp the requests when they enter the proxy, keep requests in some list or set ordered by the stamp and pass to app server only the requests form the continuous end of the list.
You can fine-tune this logic but you'll have to write it yourself.
精彩评论