none
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

    Time

    Event 1

    12:34

    Event 2

    12:33

    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

Answers

  • 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


    Sean Gallardy, MCC | Blog | Twitter

    Monday, September 10, 2012 1:46 PM
    Answerer