<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Edwin M SarmientoThe US$ 50,000 Nested Parenthesis &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/the-nested-parenthesis/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Mon, 13 Apr 2026 21:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>The US$ 50,000 Nested Parenthesis</title>
		<link>https://www.edwinmsarmiento.com/the-nested-parenthesis/</link>
		<comments>https://www.edwinmsarmiento.com/the-nested-parenthesis/#respond</comments>
		<pubDate>Tue, 19 Jan 2016 01:13:07 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[AlwaysOn Availability Groups]]></category>
		<category><![CDATA[Availability Groups]]></category>
		<category><![CDATA[load balance]]></category>
		<category><![CDATA[read-only routing]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server AlwaysOn]]></category>
		<guid isPermaLink="false">http://www.edwinmsarmiento.com/?p=2392</guid>

				<description><![CDATA[A Follow-Up On the New SQL Server 2016 Availability Groups Load Balancing of Read-Only Replicas. In a previous blog post, I talked about the new SQL Server 2016 Availability Groups Load Balancing of Read-Only Replicas feature (I know that&#8217;s a mouthful but it&#8217;s how I understand the concept.) I explained how the precedence rules in defining how the read-only workload is balanced across multiple readable secondary replicas using nested parenthesis. One [&#8230;]]]></description>
					<content:encoded><![CDATA[<p><em id="gnt_postsubtitle" style="color:#770005;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:1.3em;line-height:1.2em;font-weight:normal;font-style:italic;">A Follow-Up On the New SQL Server 2016 Availability Groups Load Balancing of Read-Only Replicas</em></p> <img width="760" height="404" src="https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1-760x404.jpg" class="featured-image wp-post-image" alt="" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1-760x404.jpg 760w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1-300x159.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1-1024x544.jpg 1024w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1-518x275.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1-82x44.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1-600x319.jpg 600w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/08/SQLAG1.jpg 1437w" sizes="(max-width: 760px) 100vw, 760px" /><p>In a <a href="https://www.edwinmsarmiento.com/introducing-sql-server-2016-availability-groups-load-balancing-of-read-only-replicas/" target="_blank">previous blog post</a>, I talked about the new SQL Server 2016 Availability Groups Load Balancing of Read-Only Replicas feature (I know that&#8217;s a mouthful but it&#8217;s how I understand the concept.) I explained how the precedence rules in defining how the read-only workload is balanced across multiple readable secondary replicas using <strong>nested parenthesis</strong>.</p>
<p>One of the most common implementations of Availability Groups is a 2-replica setup &#8211; one for primary and one for secondary. You can also have two possible options for the 2-replica setup &#8211; a failover clustered instance or a standalone instance as a primary. I&#8217;m a big fan of the failover clustered instance as a primary because you are providing both high availability and disaster recovery &#8211; high availability thru the failover clustered instance and disaster recovery thru the Availability Group. The decision to implement either one is always driven by cost. But let&#8217;s imagine that you can go beyond the 2-replica setup and implement readable secondary replicas. You can have a lot of different combinations on how to implement the new load balancing feature of read-only replicas. Which can also mean that you will have a lot of confusion trying to understand how you can make it work given your existing architecture.</p>
<h2>Precedence Rules in Action</h2>
<p>Suppose that you currently have a five (5) replica Availability Group setup that you plan to upgrade to SQL Server 2016. You use two of the replicas for readable secondary while the other two are just there for standby. With the increase in workload, you also plan to use the standby replicas for read-only purposes (after purchasing the additional license required, of course.)</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-2397" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG_readonly_routing1.jpg" alt="AG_readonly_routing1" width="694" height="345" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG_readonly_routing1.jpg 694w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG_readonly_routing1-300x149.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG_readonly_routing1-518x258.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG_readonly_routing1-82x41.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG_readonly_routing1-600x298.jpg 600w" sizes="(max-width: 694px) 100vw, 694px" /></p>
<p>Let&#8217;s see the possible combination of readable secondary replicas that you can use given this setup, highlighting the difference between the usage.</p>
<h3>Default Behavior</h3>
<p>This is the current behavior of Availability Group read-only routing &#8211; from SQL Server 2012 to SQL Server 2016.</p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">ALTER </span><span style="color: black;">AVAILABILITY </span><span style="color: blue;">GROUP </span><span style="color: black;">SQL2016AG<br />
MODIFY REPLICA </span><span style="color: blue;">ON<br />
</span><span style="color: red;">N'S1' </span><span style="color: blue;">WITH<br />
</span><span style="color: gray;">(</span><span style="color: black;">PRIMARY_ROLE<br />
</span><span style="color: gray;">(<br />
</span><span style="color: black;">READ_ONLY_ROUTING_LIST</span><span style="color: blue;">=</span><span style="color: gray;">(</span><span style="color: red;">'S2'</span><span style="color: gray;">,</span><span style="color: red;">'S3'</span><span style="color: gray;">,</span><span style="color: red;">'S4'</span><span style="color: gray;">,</span><span style="color: red;">'S5'</span><span style="color: gray;">)<br />
)<br />
);<br />
</span></code> </div>
<p><img decoding="async" class="aligncenter size-full wp-image-2398" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing2.jpg" alt="AG2016_readonly_routing2" width="694" height="342" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing2.jpg 694w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing2-300x148.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing2-518x255.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing2-82x40.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing2-600x296.jpg 600w" sizes="(max-width: 694px) 100vw, 694px" /></p>
<p>Regardless of the number of readable secondary replicas you include in the <strong>READ_ONLY_ROUTING_LIST</strong>, all read-only workloads will only be redirected to the secondary replica <strong>S2</strong>. Which, by the way, also means that you just threw away an Enterprise Edition license because you probably don&#8217;t even have the chance to use the secondary replica <strong>S5</strong> unless three (3) out of the five (5) replicas are unavailable. I won&#8217;t dive deep into the licensing aspects of having secondary replicas <strong>S3</strong> and <strong>S4</strong> covered by software assurance of <strong>S1</strong> and <strong>S2</strong> because, technically, they&#8217;re just standby secondary replicas doing nothing. This is the reason why I wanted to talk about the cost implications of understanding the behavior of read-only routing.</p>
<p>Simply put, if you failover your Availability Group to <strong>S2 </strong>while<strong> S1 </strong>remains available, secondary replicas <strong>S3</strong>, <strong>S4</strong> and <strong>S5</strong> are all just standing by. If <strong>S1</strong> goes offline and <strong>S2</strong> becomes the new primary,  that is the only time that <strong>S3</strong> gets to function as a readable secondary replica and the only time that you would need a license for it. Of course, if you have a proper incident response process, you will probably bring <strong>S1</strong> back online as soon as possible and move the Availability Group back to it, bringing <strong>S3 </strong>back as one of the standby replicas.</p>
<h3>Nested Parenthesis #1: Using All of the Readable Secondary Replicas</h3>
<p>This option is only available in SQL Server 2016. You can use the nested parenthesis to implement the new load balancing of read-only replicas feature based on your selected readable secondary replicas. Let&#8217;s start with using ALL of them. Pay attention to the use of the nested parenthesis. I&#8217;ve highlighted them for ease of identification.</p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">ALTER </span><span style="color: black;">AVAILABILITY </span><span style="color: blue;">GROUP </span><span style="color: black;">SQL2016AG<br />
MODIFY REPLICA </span><span style="color: blue;">ON<br />
</span><span style="color: red;">N'S1' </span><span style="color: blue;">WITH<br />
</span><span style="color: gray;">(</span><span style="color: black;">PRIMARY_ROLE<br />
</span><span style="color: gray;">(<br />
</span><span style="color: black;">READ_ONLY_ROUTING_LIST</span><span style="color: blue;">=</span><span style="color: gray;">(<code style="font-size: 18px;"><strong>(</strong></code></span><span style="color: red;">'S2'</span><span style="color: gray;">,</span><span style="color: red;">'S3'</span><span style="color: gray;">,</span><span style="color: red;">'S4'</span><span style="color: gray;">,</span><span style="color: red;">'S5'</span><span style="color: gray;"><code style="font-size: 18px;"><strong>)</strong></code>)<br />
)<br />
);<br />
</span></code></div>
<p><img decoding="async" class="aligncenter size-full wp-image-2400" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing3.jpg" alt="AG2016_readonly_routing3" width="693" height="346" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing3.jpg 693w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing3-300x150.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing3-518x259.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing3-82x41.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing3-600x300.jpg 600w" sizes="(max-width: 693px) 100vw, 693px" /></p>
<p>With the nested parenthesis, we are now telling the Availability Group to redirect all of the read-only workloads to all of the available secondary replicas defined in the <strong>READ_ONLY_ROUTING_LIST </strong>&#8211;<strong> S2</strong>,<strong> S3</strong>,<strong> S4 </strong>and<strong> S5 </strong>&#8211; using a round-robin algorithm. Which means we are now maximizing the use of all of our licenses because all of the readable secondary replicas are being used to service read-only requests.</p>
<p>If any of the readable secondary goes offline, the same algorithm works, redirecting the read-only workloads to all available readable secondary replicas.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2401" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing4.jpg" alt="AG2016_readonly_routing4" width="691" height="358" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing4.jpg 691w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing4-300x155.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing4-518x268.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing4-82x42.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing4-600x311.jpg 600w" sizes="(max-width: 691px) 100vw, 691px" /></p>
<h3>Nested Parenthesis #2: Using Some of the Readable Secondary Replicas</h3>
<p>Let&#8217;s say you only want to prioritize load balancing of the read-only workloads across a subset of all of the readable secondary replica. For example, you haven&#8217;t purchased the required licenses for the other two replicas or maybe the hardware resources are not as powerful as the rest. You can either do that by listing just two readable secondary replicas, like the syntax below.</p>
<p><strong>Syntax #1</strong></p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">ALTER </span><span style="color: black;">AVAILABILITY </span><span style="color: blue;">GROUP </span><span style="color: black;">SQL2016AG<br />
MODIFY REPLICA </span><span style="color: blue;">ON<br />
</span><span style="color: red;">N'S1' </span><span style="color: blue;">WITH<br />
</span><span style="color: gray;">(</span><span style="color: black;">PRIMARY_ROLE<br />
</span><span style="color: gray;">(<br />
</span><span style="color: black;">READ_ONLY_ROUTING_LIST</span><span style="color: blue;">=</span><span style="color: gray;">(</span><span style="color: red;">'S2'</span><span style="color: gray;">,</span><span style="color: red;">'S3'</span><span style="color: gray;">)<br />
)<br />
);<br />
</span></code></div>
<p>Or you can use a nested parenthesis, like the syntax below.</p>
<p><strong>Syntax #2</strong></p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">ALTER </span><span style="color: black;">AVAILABILITY </span><span style="color: blue;">GROUP </span><span style="color: black;">SQL2016AG<br />
MODIFY REPLICA </span><span style="color: blue;">ON<br />
</span><span style="color: red;">N'S1' </span><span style="color: blue;">WITH<br />
</span><span style="color: gray;">(</span><span style="color: black;">PRIMARY_ROLE<br />
</span><span style="color: gray;">(<br />
</span><span style="color: black;">READ_ONLY_ROUTING_LIST</span><span style="color: blue;">=</span><span style="color: gray;">(<code style="font-size: 18px;"><strong>(</strong></code></span><span style="color: red;">'S2'</span><span style="color: gray;">,</span><span style="color: red;">'S3'</span><span style="color: gray;"><span style="color: gray;"><code style="font-size: 18px;"><strong>)</strong></code>,</span><span style="color: red;">'S4'</span><span style="color: gray;">,</span><span style="color: red;">'S5'</span>)<br />
)<br />
);<br />
</span></code></div>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2402" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5.jpg" alt="AG2016_readonly_routing5" width="687" height="365" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5.jpg 687w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-300x159.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-518x275.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-82x44.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-600x319.jpg 600w" sizes="(max-width: 687px) 100vw, 687px" /></p>
<p>While the two syntax may have some similarities, the key difference lies in the use of the nested parenthesis. With <strong>Syntax #1</strong>, read-only workloads will only be redirected to <strong>S2</strong> and <strong>S3, </strong>similar to the default behavior of <strong>S2</strong> being the only one serving the read-only workloads until it becomes unavailable (<strong>S2</strong> has to become unavailable before <strong>S3</strong> can start serving read-only workloads; no load balancing between the two will occur unless you enclose them in a nested parenthesis.) Now, if both <strong>S2</strong> and <strong>S3</strong> become unavailable, the Availability Group will not redirect them to <strong>S4</strong> and <strong>S5 </strong> even though they are still available. It&#8217;s basically the same as the default behavior but with limited readable secondary replicas in the <strong>READ_ONLY_ROUTING_LIST.</strong></p>
<p><strong>Syntax #2</strong>, on the other hand, includes <strong>S4</strong> and <strong>S5</strong>. But because of the nested parenthesis, all read-only workloads are only redirected to <strong>S2</strong> and <strong>S3, </strong>albeit load balanced between the two, unlike in <strong>Syntax #1</strong>. But what happens when both <strong>S2</strong> and <strong>S3</strong> become unavailable?</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2404" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing6.jpg" alt="AG2016_readonly_routing6" width="690" height="339" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing6.jpg 690w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing6-300x147.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing6-518x254.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing6-82x40.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing6-600x295.jpg 600w" sizes="(max-width: 690px) 100vw, 690px" /></p>
<p>When both <strong>S2</strong> and <strong>S3</strong> become unavailable, <strong>Syntax #2</strong> tells the Availability Group to go and redirect read-only workloads to <strong>S4 </strong>and only <strong>S4, </strong>not <strong>S5</strong>. It&#8217;s as if you&#8217;re running SQL Server 2012/2014 with the <strong>READ_ONLY_ROUTING_LIST </strong>containing only <strong>S4</strong> and <strong>S5</strong>. The only time <strong>S5</strong> gets utilized as a readable secondary replica is when all <strong>S2</strong>, <strong>S3</strong> and <strong>S4</strong> become unavailable. Again, similar to the default behavior of read-only routing.</p>
<h3>Nested Parenthesis #3: Using Multiple Groups of Readable Secondary Replicas</h3>
<p>Knowing how we can change the behavior of the read-only routing for load balancing using nested parenthesis, let&#8217;s take the previous scenario &#8211; the one using <strong>Syntax #2</strong> &#8211;  and group readable secondary replicas accordingly.</p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">ALTER </span><span style="color: black;">AVAILABILITY </span><span style="color: blue;">GROUP </span><span style="color: black;">SQL2016AG<br />
MODIFY REPLICA </span><span style="color: blue;">ON<br />
</span><span style="color: red;">N'S1' </span><span style="color: blue;">WITH<br />
</span><span style="color: gray;">(</span><span style="color: black;">PRIMARY_ROLE<br />
</span><span style="color: gray;">(<br />
</span><span style="color: black;">READ_ONLY_ROUTING_LIST</span><span style="color: blue;">=</span><span style="color: gray;">(<code style="font-size: 18px;"><strong>(</strong></code></span><span style="color: red;">'S2'</span><span style="color: gray;">,</span><span style="color: red;">'S3'</span><span style="color: gray;"><span style="color: gray;"><code style="font-size: 18px;"><strong>)</strong></code>,<code style="font-size: 18px;"><strong>(</strong></code><span style="color: red;">'S4'</span><span style="color: gray;">,</span><span style="color: red;">'S5'</span><span style="color: gray;"><span style="color: gray;"><code style="font-size: 18px;"><strong>)</strong></code></span></span></span>)<br />
)<br />
);<br />
</span></code></div>
<p>Pay attention to how the readable secondary replicas are grouped together. Because of the precedence with the first group &#8211; the one including <strong>S2</strong> and <strong>S3</strong> &#8211; all read-only workloads will be redirected and load balanced between those in the first group. If <strong>S2</strong> becomes unavailable, only <strong>S3</strong> will server the read-only workloads. Think of this as using the nested parenthesis but with only <strong>S2</strong> and <strong>S3</strong> in the <strong>READ_ONLY_ROUTING_LIST</strong>.<strong> </strong></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2402" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5.jpg" alt="AG2016_readonly_routing5" width="687" height="365" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5.jpg 687w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-300x159.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-518x275.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-82x44.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing5-600x319.jpg 600w" sizes="(max-width: 687px) 100vw, 687px" /></p>
<p>So, where does <strong>S4</strong> and <strong>S5</strong> come in? This is where the nested parenthesis comes in. Because they are defined in the second group of readable secondary replicas, <strong>S4</strong> and <strong>S5</strong> will start servicing read-only workloads &#8211; while being load balanced between them &#8211; if both <strong>S2</strong> and <strong>S3</strong> become unavailable.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-2405" src="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing7.jpg" alt="AG2016_readonly_routing7" width="684" height="337" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing7.jpg 684w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing7-300x148.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing7-518x255.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing7-82x40.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2016/01/AG2016_readonly_routing7-600x296.jpg 600w" sizes="(max-width: 684px) 100vw, 684px" /></p>
<p>This comes in very handy if <strong>S2</strong> and <strong>S3</strong> are primarily for high availability or maybe running on physical machines versus <strong>S4</strong> and <strong>S5</strong> being for disaster recovery or running on virtual machines.</p>
<p style="text-align: center;"><div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><em><span style="color: #800000;"><strong>NOTE</strong>:</span> <span style="color: #808080;">Only one level of nested parenthesis is supported in SQL Server 2016 as per this <a style="color: #808080;" href="https://msdn.microsoft.com/en-ca/library/hh710054.aspx#loadbalancing" target="_blank">MSDN article</a>. It may change in future versions.</span></em></div></p>
<h2>Summary</h2>
<p>While most people would look at this as simply syntactical differences, the way you implement them has a direct impact on your overall architecture and total cost of ownership. You could also look at it as the expensive <span style="color: #800000;"><strong>US$50,000 nested parenthesis</strong></span> should you fail to consider how this new load balancing of read-only replicas feature behaves when designing and deploying your SQL Server 2016 Availability Group architecture.</p>
<h3>Additional Resources</h3>
<ul>
<li><a href="https://www.edwinmsarmiento.com/introducing-sql-server-2016-availability-groups-load-balancing-of-read-only-replicas/" target="_blank">Introducing the New SQL Server 2016 Availability Groups Load Balancing of Read-Only Replicas</a></li>
<li><a href="https://msdn.microsoft.com/en-ca/library/ff878253.aspx" target="_blank">Configure Read-Only Routing for an Availability Group (SQL Server)</a></li>
<li><a href="http://blog.dbi-services.com/sql-server-2016-availability-groups-and-load-balancing-features/" target="_blank">SQL Server 2016 : availability groups and load balancing features</a></li>
</ul>
<hr />
<h2>Don&#8217;t put your databases at risk when deploying SQL Server Always On Availability Groups</h2>
<p>Did you know that SQL Server Always On Availability Groups depend so much on Windows Server Failover Clustering (WSFC)?  The availability of the SQL Server databases relies heavily on the WSFC. And if you don&#8217;t know these other external dependencies, you are putting your mission-critical SQL Server databases at risk. Don&#8217;t be caught off guard. I&#8217;ve lost count of the number of times that I have had to bring a SQL Server Always On Availability Group online in an emergency just to explain that it was the WSFC that caused the outage.</p>
<p>I’ve been thinking about those heart-pounding moments when I needed to resolve an outage in the middle of the night involving SQL Server Always On Availability Groups. It doesn’t have to be painful and extremely complex.</p>
<p>That’s why I created this training class on <a href="https://learnsqlserverhadr.com/sqlag-ol/" target="_blank" rel="noopener"><strong>SQL Server Always On Availability Groups: The Senior DBA’s Field Guide</strong></a>. Because I hate complicated, complex and confusing documentation from Microsoft. I want to help SQL Server database administrators learn complex technologies in very simple terms, using analogies that anyone can relate to.</p>
<p>So, if you want to be more confident in deploying, implementing and managing SQL Server Always On Availability Groups, sign up for this 3-day, online training class on <span style="color: #0000ff;"><strong>November 28-30, 2017 (Tue-Thur) 9:00-5:00 Eastern</strong></span> (14:00-22:00 UTC). This is a live, online training class, hosted in GoToMeeting.</p>
<p>Use this <strong><a href="https://learnsqlserverhadr.com/sqlag-ol/" target="_blank" rel="noopener">link to register for the training class</a></strong>.</p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"></p>
<p><a href="https://learnsqlserverhadr.com/sqlag-ol"><img loading="lazy" decoding="async" class="size-medium wp-image-26 aligncenter" src="https://learnsqlserverhadr.com/wp-content/uploads/2015/09/WSFC-SQL-Logo-300x224.jpg" alt="" width="300" height="224" /></a></p>
<h2 style="text-align: center;"><a href="https://learnsqlserverhadr.com/sqlag-ol" target="_blank" rel="noopener"><span style="color: #800000;"><strong>SQL Server Always On Availability Groups: The Senior DBA’s Field Guide (US$2995)</strong></span></a></h2>
<p></div>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/the-nested-parenthesis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">2392</post-id>	</item>
	</channel>
</rss>