“The Always Highly Available Failover Cluster On Instance”. The project Stephanie was working on was nearly finished. Her new architecture was built, scripts were being created and databases were migrated. She was doing a wrap up for herself. It had been a great experience, working with Richard and Marc. Two people she would not soon forget. She had learned a ton of new things from them. On her way to the machine pouring black gold, she heard on of the developers talking about Always On. She stopped and eavesdropped. Technically it was not eavesdropping as the developer was sitting in the middle of the room talking loudly.
She listened for a while and interrupted him. “Dave, sorry to interrupt but I think you’re mixing up two things here.” Dave stopped and said: “Oh really, yeah well, I’ve never quite understood the differences actually. I’m not a DBA kinda person.”
Stephanie chuckled: “haha, that is happening al the time. I’ll explain you if you want.”
“Ow yeah sure thing”, said Dave. He always loved it when Stephanie was explaining something.
“Ok here we go”, Stephanie said. She picked up a white board marker and started her story. After one sentence she stopped. Be right back she shouted and vanished.
2 minutes later she arrived with a big cup of coffee, no coffee no SQL she smiled.
“Basically”, Stephanie started, “we have 2 different options under the umbrella what we call Always On. We have on one side Always On Availability Groups and on the other side we have Always On Failover Cluster Instances. Hence the confusion. Microsoft has put both solutions under the same name, but they are totally different when setting these up.”
Everybody with me, lets get into this.
“Always On Failover Cluster Instances is actually the fancy name of the traditional failover clusters as we know them,” Stephanie said. “The most basic outline for guaranteeing high availability is a 2 node cluster. I’m not going into details about all the technical specifications but in short. You have 2 SQL server instances running both sharing the same storage. When one node goes down, the other node will be automatically started and the shared storage will be ‘moved’ to that node. Almost instant, given the time for the SQL services to start up, the other node will take over the queries and load from the first node. This is what an Always On Failover Cluster Instance is doing.”
Dave who was all ears nodded enthousiastic: “Yeah, that make sense. I’ve built a lot of those back in the early 2005 days. oh boy. “
Stephanie smiled and continued. “Now since SQL server 2012, Microsoft introduced something they called Always On High Avaibility groups.”
“Basically”, Stephanie said and sipped her coffee, “it boils down to this. In its simplest form for high availability, you have 2 separate SQL servers which are being installed. We put a Windows Failover Cluster on top of them to make sure they can communicate and we enable the Always On High Availability feature, but for the story, this is not important.
In this scenario, we have a primary replica and a secondary replica. In the end they actually act like two separate SQL servers. They have their own storage, their own jobs,… but what makes it a piece of art is the fact that we can group databases in an availability group and that we can query the secondary replica for read-only queries. We have a so called readable secondary.
From the moment on that databases are participating in a group and something happens, the group will failover to the secondary replica instantaneous. From now on, the secondary replica became the primary replica and the applications are happily working further.”
“Euuurhhm”, Dave said, “how does the application know that the group just moved to the secondary replica as you call it…”
“Aha that, my dear Watson is a very good question”, Stephanie smiled. “We create a so called Listener. A listener is nothing more than a virtual name that will always guide you to the primary replica. He knows who is acting as primary and who is acting as secondary. We can even force read-only connection to always be rerouted to the readable secondaries. And with the introduction of SQL 2017 we can have up to 3 synchronous replica’s and we can even load balance among our replica!”
“Cool he! I could go on and talk for ages about Always On Availability Groups, but I really need to continue my script. I’m trying to automate a virtual machine deployment in Azure hence the amount of coffee I’m drinking today”, Stephanie said smiling.
“Thanks for the small update Stephanie”, Dave said and raised his cup of coffee!
“Always a pleasure Dave!” Stephanie smiled.
See you all on a next adventure about the three headed dog called kerberos!
Cookie | Duration | Description |
---|---|---|
ARRAffinity | session | ARRAffinity cookie is set by Azure app service, and allows the service to choose the right instance established by a user to deliver subsequent requests made by that user. |
ARRAffinitySameSite | session | This cookie is set by Windows Azure cloud, and is used for load balancing to make sure the visitor page requests are routed to the same server in any browsing session. |
cookielawinfo-checkbox-advertisement | 1 year | Set by the GDPR Cookie Consent plugin, this cookie records the user consent for the cookies in the "Advertisement" category. |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | CookieYes sets this cookie to record the default button state of the corresponding category and the status of CCPA. It works only in coordination with the primary cookie. |
elementor | never | The website's WordPress theme uses this cookie. It allows the website owner to implement or change the website's content in real-time. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Cookie | Duration | Description |
---|---|---|
__cf_bm | 30 minutes | Cloudflare set the cookie to support Cloudflare Bot Management. |
pll_language | 1 year | Polylang sets this cookie to remember the language the user selects when returning to the website and get the language information when unavailable in another way. |
Cookie | Duration | Description |
---|---|---|
_ga | 1 year 1 month 4 days | Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors. |
_ga_* | 1 year 1 month 4 days | Google Analytics sets this cookie to store and count page views. |
_gat_gtag_UA_* | 1 minute | Google Analytics sets this cookie to store a unique user ID. |
_gid | 1 day | Google Analytics sets this cookie to store information on how visitors use a website while also creating an analytics report of the website's performance. Some of the collected data includes the number of visitors, their source, and the pages they visit anonymously. |
ai_session | 30 minutes | This is a unique anonymous session identifier cookie set by Microsoft Application Insights software to gather statistical usage and telemetry data for apps built on the Azure cloud platform. |
CONSENT | 2 years | YouTube sets this cookie via embedded YouTube videos and registers anonymous statistical data. |
vuid | 1 year 1 month 4 days | Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. |
Cookie | Duration | Description |
---|---|---|
ai_user | 1 year | Microsoft Azure sets this cookie as a unique user identifier cookie, enabling counting of the number of users accessing the application over time. |
VISITOR_INFO1_LIVE | 5 months 27 days | YouTube sets this cookie to measure bandwidth, determining whether the user gets the new or old player interface. |
YSC | session | Youtube sets this cookie to track the views of embedded videos on Youtube pages. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt-remote-device-id | never | YouTube sets this cookie to store the user's video preferences using embedded YouTube videos. |
yt.innertube::nextId | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
yt.innertube::requests | never | YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen. |
Cookie | Duration | Description |
---|---|---|
WFESessionId | session | No description available. |