Azure Auto-Failover Groups Simply | Azure SQL Automatic Failover

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video we are going to learn about auto failover groups on azure auto failure groups are no different to jio replication this basically built on jio replication and geo application usually works on database level but when it comes to auto failover groups it works on database server level so you can replicate multiple databases there and this will simplify deployment and management of jio replicated databases at scale this only supports across region replications if you want to have replicated databases within the same region you can still go with jio replication unlike your replication with auto failure groups you can achieve automatic fellow and one of the most important features of auto failure groups is that this supports read write and read only listener endpoints so basically when there is a failover these listener endpoints the read only and read write listener endpoints will not change and this will increase business continuity and today we are going to implement this basically in southeast asia region i'm going to implement a sql server in that sql server there will be two databases and and then i'm going to create another sql server in east us region and after that i'm going to create a autofiller group and this autofiller group will replicate the databases that i have in southeast asia region to east u.s region with this script i'm going to implement the architecture that i've shown in the diagram first i'm going to create this resource group and then a sql server in southeast asia region and then another sql server in east us region and finally i'm going to create two databases in southeast asia region and here you can see i have added this firewall rule in addition to the server creation because i'm going to connect to these database servers from my local laptop so now let me copy these commands here and i'm going to create these resources all right now all my resources are ready now let me go to my azure portal and show you the resources if we go into this resource group here you can see that i have two database servers and two databases these two databases reside in this primary server as you can see the next thing that i'm going to do is i'm going to connect to both of these servers from my sql management studio now for that let me copy these server names and i'm going to connect to both of them all right here i have logged into both my primary and secondary server if you go here into databases you can see two databases in my primary server and if you go here into my secondary server we don't have any databases there now i'm going to add few sample data here to my primary server i have written this sample script this will create a simple table on my primary server and now it's time for me to configure autofill our groups for that let me go to azure portal and to that resource group and i'm going into this primary database server here and you will find this failover groups tab here you can create failover groups i'm going to add a failover group now now if you look here this failover group name should be a unique one globally unique one and that is because there will be two listeners available for this failover group basically for read write and read operations and those endpoints they should be globally unique and that's why we need to add unique name here let me give that my something like this we can select the secondary server because that is the server that we are going to use to replicate this data to and here you cannot select primary server because you can't create replications if both of these servers are within the same region now i'm going to select the second one here read write failure policy you can configure it to be automatic or manual if you select manual here this option will get disabled and that is because when you enable automatic failover this will automatically fail over to the secondary database and there's a grace period for doing that now if you look here we have two databases eligible and those are the databases that we have just created now let me click on configure as you can see we can select the databases that we want to be replicated i'm going to select both of these databases and then i'm going to click create here failover group is getting created let's wait for around one minute as you can see our failover group is ready now let me go back to ffms and if you refresh this secondary server here as you can see here we have these two databases in my secondary server as well now if i right click and let's query this secondary server and as you can see we have the data there as well now what happens if i try to add something here let's try to do that as you can see we cannot write to this secondary database because it is read only now that we saw how the replication works let me go back to my azure portal and go into this failover group that we have created and as you can see we can create multiple failover groups as well if i go here you will see that this replication has nicely represented with this map here we have the primary server in southeast asia region and we have a secondary in east u.s region as you can see and we have other information as well read write fellow policy and all that and you can do a failover here to see what happens as well we'll do that later and before doing that these are very important endpoints here because as i said before even after a failover happens these endpoints will not change we have one endpoint for read right and one and point four read only so based on your requirements based on your application requirements you can decide which endpoint you want your application to talk to we can connect to these endpoints as well let me do that now let me copy these addresses and let's go and try to connect to these endpoints as you can see i've just connected to my read write endpoint just like that i can just connect to my secondary read-only server as well as you can see even though we have connected to four different servers here basically there are only two database servers now let me go back to my azure portal and let's try to do a forced failover and see what happens i'm going to click on forced failover and now it is giving me a warning saying that i might use some of my session data here because this will cancel all my transport layer sessions now let me click yes right fellow is in progress as you can see this is shown here as well all right my fellow is a success as you can see my primary database server is east u.s now and my secondary one is southeast asia now if you go back to ssmf and here i have connected to the database server that i named earlier i called it my secondary server because it was initially the secondary server but now this is my primary server as you can see the last time that i tried this did not work but let me do that now yeah now we can write data to our secondary database this is because this is the primary database actually now if i go into my secondary database here and this will always be the secondary database because this will always be mapped to that and if i go here and query our this customers table you will see that we have initial data plus the data that we have wrote after doing the failover as well all right now i believe you have an understanding on what auto failure groups are if you have any questions or comments leave them down below and don't forget to subscribe if you learned something new today and thanks for watching
Info
Channel: Meet Kamal Today - Cloud Mastery
Views: 190
Rating: undefined out of 5
Keywords: auto failover groups, auto failover group, auto failover, autofailover groups, auto failover azure, azure auto failover group, azure sql auto failover, azure sql, managed instances, azure sql failover group, failover group, azure failover group, azure geo replication, azure automatic failover
Id: L_7gI5eXw5I
Channel Id: undefined
Length: 9min 14sec (554 seconds)
Published: Wed Oct 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.