none
simulating SQL Azure load balancing to test retry logic?

Answers

  • Hi,

    Load balancing is one of many reasons why you would want to implement connection retries. So your objective isn't necessarily to simulate a load balancing event, but a connection failure of some kind. To that end, you could try with a very low initial connection timeout. So instead of 30 seconds connection timeout (which is the default I believe), try a 1 second timeout. Then increment your timeout in 10 seconds interval. I implemented that logic on a project and didn't have any issues simulating my connection retry logic.

    Good luck!


    Herve Roggero, Blue Syntax MVP SQL Azure Co-Author: Pro SQL Azure
    • Marked as answer by vinceb Thursday, February 03, 2011 4:43 PM
    Saturday, January 29, 2011 2:26 AM

All replies

  • Hi,

    Load balancing is one of many reasons why you would want to implement connection retries. So your objective isn't necessarily to simulate a load balancing event, but a connection failure of some kind. To that end, you could try with a very low initial connection timeout. So instead of 30 seconds connection timeout (which is the default I believe), try a 1 second timeout. Then increment your timeout in 10 seconds interval. I implemented that logic on a project and didn't have any issues simulating my connection retry logic.

    Good luck!


    Herve Roggero, Blue Syntax MVP SQL Azure Co-Author: Pro SQL Azure
    • Marked as answer by vinceb Thursday, February 03, 2011 4:43 PM
    Saturday, January 29, 2011 2:26 AM
  • That sounds like a great idea. I was hoping to actually see the 40501 error code that indicates SQL Azure load balancing, but I think your idea will get me close enough. Thanks.
    Thursday, February 03, 2011 4:43 PM