2

In J2EE based web application, We have Load Balancer server which is being hit before user request reaches to web server. For a particular request only, web server is getting two POST request where as user has clicked only ONCE on web page's some action button using Firefox browser.

HIREN011
  • 549
  • 1
  • 7
  • 7

1 Answers1

4

When we had user go directly to web server, the error did not appear on UI and while going via Load Balancer, user did get an exception on UI. The exception on UI was legitimate code on application to prevent any such scenarios. Upon investigating TCP Dumps we found that duplicate request was being sent to web server exactly at 2 minutes interval.

It turns out to be Time Out setup on Load Balancer server. If it does not get the response back from web server within that time out span, it sends the request again.

HIREN011
  • 549
  • 1
  • 7
  • 7
  • How do you plan to handle the duplicate requests? – matt.early Sep 15 '14 at 22:43
  • 4
    We are using security mechanism (in-house developed using locally generated Tokens) to track POST requests coming from same session/user. If request is duplicated by Load Balancer, second request (duplicate one) will still have outdated security token and hence it will be unauthorized request - will die automatically. – HIREN011 Nov 20 '14 at 15:39