Performance gain with MultiSubnetFailover for single subnet











up vote
5
down vote

favorite
2












On BOL I read following about MultiSubnetFailover=True:




The MultiSubnetFailover connection option should be set to True even if the availability group only spans a single subnet. This allows you to preconfigure new clients to support future spanning of subnets without any need for future client connection string changes and also optimizes failover performance for single subnet failovers.




As I understand the working of MultiSubnetFailover, with this option set the client driver sets up a socket for each IP address associated with the listener. They are all checked in parallel to speed up the process to find the online IP and the first one that response will be the one used for the connection. Here I see a performance gain.



But where is the performance gain in a single subnet? There is only IP associated with the listener.










share|improve this question




























    up vote
    5
    down vote

    favorite
    2












    On BOL I read following about MultiSubnetFailover=True:




    The MultiSubnetFailover connection option should be set to True even if the availability group only spans a single subnet. This allows you to preconfigure new clients to support future spanning of subnets without any need for future client connection string changes and also optimizes failover performance for single subnet failovers.




    As I understand the working of MultiSubnetFailover, with this option set the client driver sets up a socket for each IP address associated with the listener. They are all checked in parallel to speed up the process to find the online IP and the first one that response will be the one used for the connection. Here I see a performance gain.



    But where is the performance gain in a single subnet? There is only IP associated with the listener.










    share|improve this question


























      up vote
      5
      down vote

      favorite
      2









      up vote
      5
      down vote

      favorite
      2






      2





      On BOL I read following about MultiSubnetFailover=True:




      The MultiSubnetFailover connection option should be set to True even if the availability group only spans a single subnet. This allows you to preconfigure new clients to support future spanning of subnets without any need for future client connection string changes and also optimizes failover performance for single subnet failovers.




      As I understand the working of MultiSubnetFailover, with this option set the client driver sets up a socket for each IP address associated with the listener. They are all checked in parallel to speed up the process to find the online IP and the first one that response will be the one used for the connection. Here I see a performance gain.



      But where is the performance gain in a single subnet? There is only IP associated with the listener.










      share|improve this question















      On BOL I read following about MultiSubnetFailover=True:




      The MultiSubnetFailover connection option should be set to True even if the availability group only spans a single subnet. This allows you to preconfigure new clients to support future spanning of subnets without any need for future client connection string changes and also optimizes failover performance for single subnet failovers.




      As I understand the working of MultiSubnetFailover, with this option set the client driver sets up a socket for each IP address associated with the listener. They are all checked in parallel to speed up the process to find the online IP and the first one that response will be the one used for the connection. Here I see a performance gain.



      But where is the performance gain in a single subnet? There is only IP associated with the listener.







      sql-server availability-groups sql-server-2017






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 7 at 15:45









      Joe Obbish

      20.2k32880




      20.2k32880










      asked Dec 5 at 13:17









      Frederik Vanderhaegen

      6171315




      6171315






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          When MultiSubnetFailover=True is set, SQL Server Native Client will aggressively retry the TCP connection.



          So in




          • a multi-subnet scenario, it will attempt connections in parallel, which you already know.


          • a single subnet scenario, it will aggressively retry the TCP connection faster than the OS default TCP retransmit interval, so your reconnect time after an AG failover will be improved.







          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "182"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f224196%2fperformance-gain-with-multisubnetfailover-for-single-subnet%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote



            accepted










            When MultiSubnetFailover=True is set, SQL Server Native Client will aggressively retry the TCP connection.



            So in




            • a multi-subnet scenario, it will attempt connections in parallel, which you already know.


            • a single subnet scenario, it will aggressively retry the TCP connection faster than the OS default TCP retransmit interval, so your reconnect time after an AG failover will be improved.







            share|improve this answer



























              up vote
              5
              down vote



              accepted










              When MultiSubnetFailover=True is set, SQL Server Native Client will aggressively retry the TCP connection.



              So in




              • a multi-subnet scenario, it will attempt connections in parallel, which you already know.


              • a single subnet scenario, it will aggressively retry the TCP connection faster than the OS default TCP retransmit interval, so your reconnect time after an AG failover will be improved.







              share|improve this answer

























                up vote
                5
                down vote



                accepted







                up vote
                5
                down vote



                accepted






                When MultiSubnetFailover=True is set, SQL Server Native Client will aggressively retry the TCP connection.



                So in




                • a multi-subnet scenario, it will attempt connections in parallel, which you already know.


                • a single subnet scenario, it will aggressively retry the TCP connection faster than the OS default TCP retransmit interval, so your reconnect time after an AG failover will be improved.







                share|improve this answer














                When MultiSubnetFailover=True is set, SQL Server Native Client will aggressively retry the TCP connection.



                So in




                • a multi-subnet scenario, it will attempt connections in parallel, which you already know.


                • a single subnet scenario, it will aggressively retry the TCP connection faster than the OS default TCP retransmit interval, so your reconnect time after an AG failover will be improved.








                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 7 at 16:23









                Tony Hinkle

                1,5751417




                1,5751417










                answered Dec 5 at 15:28









                Kin

                52.6k478187




                52.6k478187






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Database Administrators Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f224196%2fperformance-gain-with-multisubnetfailover-for-single-subnet%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?