{"id":12666,"date":"2019-07-23T15:59:32","date_gmt":"2019-07-23T13:59:32","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/"},"modified":"2023-07-17T15:11:39","modified_gmt":"2023-07-17T13:11:39","slug":"sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/","title":{"rendered":"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing"},"content":{"rendered":"<p><span lang=\"EN-US\"><span style=\"font-family: Calibri;\"><span style=\"color: #000000;\">SQL Server 2019 availability group feature will provide secondary to primary replica read\/write connection redirection. I wrote about it in a previous <\/span><a href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-groups-introduction-to-rw-redirection\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog post<\/a><\/span><span style=\"color: #000000; font-family: Calibri;\"> here. It consists in redirecting client application connections to the primary replica regardless of the target server specified in the connections string. That\u2019s pretty interesting in some scenarios as read scale-out or specific multi-subnet configurations where creating the traditional AG listener is not an viable option. <\/span><\/span><\/p>\n<p><span style=\"font-family: Calibri;\"><span lang=\"EN-US\"><span style=\"color: #000000;\">The new R\/W connection redirection capability does the job but the one-million-dollar question here is what\u2019s happen if one of the replicas specified in my connection string becomes suddenly unavailable? Referring \u00a0to the <\/span><\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/database-engine\/availability-groups\/windows\/secondary-replica-connection-redirection-always-on-availability-groups?view=sqlallproducts-allversions#set-read_write_routing_url-option\" target=\"_blank\" rel=\"noopener noreferrer\"><span lang=\"EN-US\">BOL<\/span><\/a><span lang=\"EN-US\"><span style=\"color: #000000;\">\u00a0 the connection will fail regardless the role that the replica on the target server plays but we can mitigate the issue by introducing the <b><i>failover partner<\/i><\/b> parameter in the connection string. As a reminder, the Failover Partner keyword in the connection string works in a database mirror setup and prevent prolonged application downtime. But from my point of view, we could go likely another way and get benefit to all the power of this new availability group feature by introducing a load balancer on the top of this topology as we could do with Docker Swarm or K8s architectures. Indeed, if we take a look more closely, this new provided mechanism by SQL Server 2019 is pretty similar to the routing mesh capabilities of container orchestrators with the same advantages and weaknesses as well. I wrote a <\/span><\/span><a href=\"https:\/\/www.dbi-services.com\/blog\/load-balancing-with-docker-swarm-mode-and-sql-server-containers\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span lang=\"EN-US\">blog post<\/span><\/a><span lang=\"EN-US\"><span style=\"color: #000000;\"> about Docker Swarm architectures where we need to implement a proxy to load balance the traffic to avoid getting stuck with the routing mesh capability where a node get unhealthy. <\/span><\/span><\/span><\/p>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">I just applied the same kind of configuration by using an HA Proxy (but you can use your own obviously) with my availability group topology and the behavior was basically the same. Here the intended behavior:<\/span><\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-33660 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg\" alt=\"\" width=\"500\" height=\"396\" \/><\/p>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">Here the configuration of my HAProxy including my 3 AG replicas (WIN20191, WIN20192, WIN20193) and a round robin algorithm at the bottom<\/span><\/span>:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\u2026\nbackend rserve_backend\n    mode tcp\n    option tcplog\n    option log-health-checks\n    option redispatch\n    log global\n    balance roundrobin\n    timeout connect 10s\n    timeout server 1m\n    server WIN20191 192.168.40.205:1433 check\n    server WIN20192 192.168.40.206:1433 check\n    server WIN20193 192.168.40.207:1433 check<\/pre>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">Let\u2019s do a try with connections directly to my HAProxy that is listen on port 81 in my test scenario. Note that for this first test I will connect to the master database to force the local connection getting stick to each replica rather than going through the R\/W redirection process. The goal is to check if the round-robin algorithm come into play \u2026<\/span><\/span><\/p>\n<pre class=\"brush: powershell; gutter: true; first-line: 1\">$connectionString = \"Server=192.168.40.14,81;uid=sa; pwd=xxxx;Integrated Security=False;Initial Catalog=master;pooling=false\u201d\n\n$connection = New-Object System.Data.SqlClient.SqlConnection\n$connection.ConnectionString = $connectionString\n$connection.Open()\n\n$sqlCommandText=\"SELECT 'Current server : ' + @@SERVERNAME AS server_name\"\n$sqlCommand = New-Object system.Data.sqlclient.SqlCommand($sqlCommandText,$connection)\n$sqlCommand.ExecuteScalar()\n\n$connection.Close()\n$connection.Dispose()<\/pre>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">\u2026 and that\u2019s the case as show below:<\/span><\/span><\/p>\n<pre class=\"brush: shell; gutter: true; first-line: 1\">Test connexion initial server nb : 0 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 1 - 192.168.40.14,81 - Current server : WIN20192\nTest connexion initial server nb : 2 - 192.168.40.14,81 - Current server : WIN20193\nTest connexion initial server nb : 3 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 4 - 192.168.40.14,81 - Current server : WIN20192\nTest connexion initial server nb : 5 - 192.168.40.14,81 - Current server : WIN20193<\/pre>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">Let\u2019s do a try by forcing the R\/W redirection now. This time I set up the correct target database name named dummy2 for my availability group AG2019.<\/span><\/span><\/p>\n<pre class=\"brush: powershell; gutter: true; first-line: 1\">$connectionString = \"Server=192.168.40.14,81;uid=sa; pwd=xxxx;Integrated Security=False;Initial Catalog=dummy2;pooling=false\u201d\n\n$connection = New-Object System.Data.SqlClient.SqlConnection\n$connection.ConnectionString = $connectionString\n$connection.Open()\n\n$sqlCommandText=\"SELECT 'Current server : ' + @@SERVERNAME AS server_name\"\n$sqlCommand = New-Object system.Data.sqlclient.SqlCommand($sqlCommandText,$connection)\n$sqlCommand.ExecuteScalar()\n\n$connection.Close()\n$connection.Dispose()<\/pre>\n<p>&#8230;<\/p>\n<pre class=\"brush: shell; gutter: true; first-line: 1\">Test connexion initial server nb : 0 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 1 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 2 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 3 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 4 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 5 - 192.168.40.14,81 - Current server : WIN20191<\/pre>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">This time the R\/W redirection is taking effect and each established connection is redirected to my primary replica \u2013 WIN20191 this time. <\/span><\/span><\/p>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">Finally, let\u2019s simulate an outage of one of my replicas, let\u2019s say the WIN20193 replica with a turn off operation and let\u2019s see what\u2019s happen below:<\/span><\/span><\/p>\n<pre class=\"brush: shell; gutter: true; first-line: 1\">Test connexion initial server nb : 32 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 33 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 34 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 35 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 36 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 37 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 38 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 39 - 192.168.40.14,81 - Current server : WIN20191\nTest connexion initial server nb : 40 - 192.168.40.14,81 - Current server : WIN20191<\/pre>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">Well, from a connection perspective nothing has changed and the HAProxy continues to load balance connections between the remaining healthy replicas. The R\/W connection redirection mechanism still continue to come into play as well. A quick look at the HAProxy indicates the WIN20193 replica got unhealthy and the HAProxy has evicted this replica from the game. <\/span><\/span><\/p>\n<pre class=\"brush: shell; gutter: true; first-line: 1\">[WARNING] 203\/063813 (1772) : Health check for server rserve_backend\/WIN20193 failed, reason: Layer4 timeout, check durati               on: 2001ms, status: 2\/3 UP.\n[WARNING] 203\/063818 (1772) : Health check for server rserve_backend\/WIN20193 failed, reason: Layer4 timeout, check durati               on: 2002ms, status: 1\/3 UP.\n[WARNING] 203\/063822 (1772) : Health check for server rserve_backend\/WIN20193 failed, reason: Layer4 timeout, check durati               on: 2001ms, status: 0\/2 DOWN.\n[WARNING] 203\/063822 (1772) : Server rserve_backend\/WIN20193 is DOWN. 2 active and 0 backup servers left. 2 sessions activ               e, 0 requeued, 0 remaining in queue.\n[WARNING] 203\/063848 (1772) : Health check for server rserve_backend\/WIN20193 failed, reason: Layer4 connection problem, i               nfo: \"No route to host\", check duration: 4ms, status: 0\/2 DOWN.<\/pre>\n<p><span lang=\"EN-US\"><span style=\"color: #000000; font-family: Calibri;\">The new R\/W redirection capability provided by Microsoft will extend possible scenarios with availability groups for sure. With previous versions of SQL Server, using a load balancer was limited to R\/O workloads but SQL Server 2019 will probably change the game on this topic. Let\u2019s see what\u2019s happen in the future! <\/span><\/span><\/p>\n<p><span style=\"float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none;\">By David Barbarin<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server 2019 availability group feature will provide secondary to primary replica read\/write connection redirection. I wrote about it in a previous blog post here. It consists in redirecting client application connections to the primary replica regardless of the target server specified in the connections string. That\u2019s pretty interesting in some scenarios as read scale-out [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":12667,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,99],"tags":[1348,84,1645,1076,1457],"type_dbi":[],"class_list":["post-12666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","category-sql-server","tag-haproxy","tag-high-availability","tag-load-balancing","tag-read-scale","tag-sql-server-2019"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing\" \/>\n<meta property=\"og:description\" content=\"SQL Server 2019 availability group feature will provide secondary to primary replica read\/write connection redirection. I wrote about it in a previous blog post here. It consists in redirecting client application connections to the primary replica regardless of the target server specified in the connections string. That\u2019s pretty interesting in some scenarios as read scale-out [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-23T13:59:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-17T13:11:39+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"396\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Microsoft Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/\"},\"author\":{\"name\":\"Microsoft Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"headline\":\"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing\",\"datePublished\":\"2019-07-23T13:59:32+00:00\",\"dateModified\":\"2023-07-17T13:11:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/\"},\"wordCount\":613,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg\",\"keywords\":[\"HAProxy\",\"High availability\",\"load balancing\",\"read-scale\",\"SQL Server 2019\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/\",\"name\":\"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg\",\"datePublished\":\"2019-07-23T13:59:32+00:00\",\"dateModified\":\"2023-07-17T13:11:39+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg\",\"width\":500,\"height\":396},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4\",\"name\":\"Microsoft Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"caption\":\"Microsoft Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing","og_description":"SQL Server 2019 availability group feature will provide secondary to primary replica read\/write connection redirection. I wrote about it in a previous blog post here. It consists in redirecting client application connections to the primary replica regardless of the target server specified in the connections string. That\u2019s pretty interesting in some scenarios as read scale-out [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/","og_site_name":"dbi Blog","article_published_time":"2019-07-23T13:59:32+00:00","article_modified_time":"2023-07-17T13:11:39+00:00","og_image":[{"width":500,"height":396,"url":"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg","type":"image\/jpeg"}],"author":"Microsoft Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Microsoft Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/"},"author":{"name":"Microsoft Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"headline":"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing","datePublished":"2019-07-23T13:59:32+00:00","dateModified":"2023-07-17T13:11:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/"},"wordCount":613,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg","keywords":["HAProxy","High availability","load balancing","read-scale","SQL Server 2019"],"articleSection":["Database Administration &amp; Monitoring","SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/","name":"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg","datePublished":"2019-07-23T13:59:32+00:00","dateModified":"2023-07-17T13:11:39+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/158-0-infra-ag-haproxy-e1563896938859.jpg","width":500,"height":396},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2019-availability-group-r-w-connection-redirection-routing-mesh-and-load-balancing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2019 availability group R\/W connection redirection, routing mesh and load balancing"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4","name":"Microsoft Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","caption":"Microsoft Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=12666"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12666\/revisions"}],"predecessor-version":[{"id":26749,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12666\/revisions\/26749"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/12667"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=12666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=12666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=12666"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=12666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}