load balancing server issue RRS feed

  • Question

  • We are facing issue in insertion of Events(Database Row) in production server. The Event which are supposed to be inserted in correct order get inserted in wrong order.

    we thought following problem might happen in load balancing servers.

    1)Load balancing server I has time 12:34 and Event 1 got generated on 12:34

    2)for same claim number next Event generation request went to Load Balancing sever II which has time as 12:33 and Event 2 get inserted as 12:33



    Event 1


    Event 2


    Hence Event got inserted in wrong order.

    Is there any possibilities to have two different times on load balancing servers? Since we do not have access to production server how we can make sure

    Timestamp should be same for both servers?  

    Another possibilities we can think of is Load balancers can also be configured to guarantee that subsequent requests from the same user, and part of the same session, are directed to the same server as the original request. If same user’s request  create one event and other event request should be gone to same server. However I am not sure how it  can be checked this in production server.

    Please let me know if above scenario is possible with load balancing servers and if yes how to resolve it

    Monday, September 10, 2012 12:43 PM


  • Hello,

    We don't really have all of the information here. If the code is checking the local time of the server it is running off of, then you'll need to keep the time on the servers' up to date. This is generally done through NTP and time servers. Your company may or may not have an internal time server but most internal time servers sync from one of the many national time servers such as in colorado or washington dc (if you're in the US). This is a WINDOWS level setting that will need to be setup by your windows or system admins.

    Another possible solution is to use the time on the database server by using getdate(), if you need more precision sysdatetime(), if timezone is needed sysdatetimeoffset(). That will keep all events on the time of the database server since it *reads* as though you have multiple web servers or some type of network load balancer but a single database server.


    Sean Gallardy, MCC | Blog | Twitter

    • Proposed as answer by amber zhang Tuesday, September 11, 2012 2:49 AM
    • Marked as answer by Iric Wen Monday, September 17, 2012 6:00 AM
    Monday, September 10, 2012 1:46 PM