SShortSingh.
Back to feed

SQL Server AG Read Routing Fails Without a Primary-Side Routing List

0
·19 views

A database engineer diagnosed early-morning dashboard timeouts caused by all read queries hitting an Always On Availability Group primary replica, while two healthy secondaries sat idle. The root cause was a commonly skipped second configuration step: although the secondaries were marked readable and the app used ApplicationIntent=ReadOnly, no read-only routing list had been defined on the primary replica. In SQL Server Always On AGs, the primary is responsible for redirecting read-intent connections to secondaries, and without a routing list it simply handles those connections itself. Administrators must use ALTER AVAILABILITY GROUP to set both the secondary READ_ONLY_ROUTING_URL and the primary PRIMARY_ROLE routing list, and must repeat the routing list definition on every replica since any node can become primary after a failover. SQL Server 2016 and later also support round-robin load balancing across multiple secondaries using nested parentheses syntax in the routing list.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Claude SEO: open-source plugin brings automated SEO audits to Claude Code

Claude SEO is a free, MIT-licensed open-source plugin for Claude Code, created by Agrici Daniel. It runs SEO audits from the terminal using 26 sub-skills and 19 specialized agents. The tool covers technical SEO, content and E-E-A-T analysis, Schema.org structured data, local and e-commerce SEO, and readiness for AI search and AI agents. It is aimed at SEO agencies, developers and marketers, and is installed by cloning its GitHub repository and running an install script.

0
ProgrammingDEV Community ·

Why AI coding agents' plans should be committed to the repo, not left in session folders

A developer argues that the plans AI coding agents generate are part of the deliverable and should live in a committed file on the task branch. Claude Code stores its plans in ~/.claude/plans/, a folder cleaned up automatically after 30 days by default, while GitHub Copilot CLI saves plan.md under a per-session folder. Codex's documentation does not say where its plans are stored, so they are assumed to live in the chat itself. Keeping plans with the session means reviewers typically cannot see the reasoning behind a change in the pull request. The author suggests committing the plan so reviewers and agents from any vendor can read and check the code against it.

0
ProgrammingDEV Community ·

Developer swaps headless Chrome for a lightweight Mermaid renderer to cut deploy size and cold starts

A developer needed flowcharts and sequence diagrams rendered as images within an agent pipeline. Their first approach used Puppeteer with headless Chrome, which added about 300MB to every container rebuild. The setup also slowed cold starts to several seconds and caused memory spikes that got smaller worker instances killed mid-render. They replaced it with a single-purpose endpoint that converts Mermaid syntax into base64 PNG or SVG output, requiring no local rendering stack. The developer concludes that the cost of general-purpose tools should be measured per deployment before adopting them as defaults, and reports that cold starts returned to acceptable levels.

0
ProgrammingDEV Community ·

Flutter ZIP-Code Autofill: Avoiding Common Bugs in Production

A developer built ZIP-code autofill for AI US Citizenship Test 2026, a Flutter app for green card holders, to replace a set of state-specific dropdowns during onboarding. The first version suffered from bugs found by real users, including treating ZIP codes as integers, which dropped leading zeros, and firing lookup requests on every keystroke. The article describes a hardened pattern that keeps ZIP codes as strings, accepts ZIP+4 input by normalizing to five digits, and debounces lookups until the input is complete and valid. It also covers a race condition where a stale response overwrote a corrected lookup, which is fixed with a generation counter that discards outdated results. The developer shares the approach so other engineers can avoid these pitfalls.