MegaPowerRockstar Posted June 1, 2021 Report Share Posted June 1, 2021 Hello All, I need advice/suggestions, we have a web service which connects with single sql server and there are 4 databases. I need to implement fail over mechanism in my web service. Is there any in-built feature that we can use ? Or Do we need to keep 2 connection strings and check if the connection is not established then use second connection string ? Any better options that i can use ? Quote Link to comment Share on other sites More sharing options...
shenkar Posted June 1, 2021 Report Share Posted June 1, 2021 Just now, MegaPowerRockstar said: Hello All, I need advice/suggestions, we have a web service which connects with single sql server and there are 4 databases. I need to implement fail over mechanism in my web service. Is there any in-built feature that we can use ? Or Do we need to keep 2 connection strings and check if the connection is not established then use second connection string ? Any better options that i can use ? persistence layer with redis Quote Link to comment Share on other sites More sharing options...
Spartan Posted June 1, 2021 Report Share Posted June 1, 2021 where is ur SQL hosted.. if AWS or Azure, u can do Cluster Mode,,which will do auto-failover in multiple availablity zones. if u want cross region, u can use multi-master-multi-region setup. 1 Quote Link to comment Share on other sites More sharing options...
erragulabi Posted June 1, 2021 Report Share Posted June 1, 2021 check sql alwayson availability groups Quote Link to comment Share on other sites More sharing options...
MegaPowerRockstar Posted June 2, 2021 Author Report Share Posted June 2, 2021 5 hours ago, Spartan said: where is ur SQL hosted.. if AWS or Azure, u can do Cluster Mode,,which will do auto-failover in multiple availablity zones. if u want cross region, u can use multi-master-multi-region setup. SQL is hosted on google cloud.. But how does my application/service know to point to fail over server instance.. Quote Link to comment Share on other sites More sharing options...
MegaPowerRockstar Posted June 2, 2021 Author Report Share Posted June 2, 2021 5 hours ago, erragulabi said: check sql alwayson availability groups i did not understand.. is there a separate group/forum.. Quote Link to comment Share on other sites More sharing options...
Spartan Posted June 2, 2021 Report Share Posted June 2, 2021 18 minutes ago, MegaPowerRockstar said: SQL is hosted on google cloud.. But how does my application/service know to point to fail over server instance.. Google CLoud lo...did u do standalone SQL or Cloud SQL. Cloud SQL is nothing but Clustered SQL Server in Amazon. it out of the box provides the reliability and failover...nuvvu select chesetappudu enni instances select chestavo adi decide chestadi.. lets assume u deploy a CLoud SQL on GCP with 3 instances.. neeku oka Cluster/SQL endpoint istadu. you use that endpoint in ur application. Assume ur master instance in that cluster fails, Cloud SQL automatically promotes one of the other instance as master and ur application will still function normally. with no downtime . https://cloud.google.com/sql/docs/mysql/high-availability  1 Quote Link to comment Share on other sites More sharing options...
MegaPowerRockstar Posted June 2, 2021 Author Report Share Posted June 2, 2021 12 hours ago, Spartan said: Google CLoud lo...did u do standalone SQL or Cloud SQL. Cloud SQL is nothing but Clustered SQL Server in Amazon. it out of the box provides the reliability and failover...nuvvu select chesetappudu enni instances select chestavo adi decide chestadi.. lets assume u deploy a CLoud SQL on GCP with 3 instances.. neeku oka Cluster/SQL endpoint istadu. you use that endpoint in ur application. Assume ur master instance in that cluster fails, Cloud SQL automatically promotes one of the other instance as master and ur application will still function normally. with no downtime . https://cloud.google.com/sql/docs/mysql/high-availability  It is a stand alone... we just hosted windows server on cloud and we access it as normal sql server. Quote Link to comment Share on other sites More sharing options...
Spartan Posted June 2, 2021 Report Share Posted June 2, 2021 2 minutes ago, MegaPowerRockstar said: It is a stand alone... we just hosted windows server on cloud and we access it as normal sql server. own installtuon ante u need to have multiple servers on two instances and put them behind load balancer adanta pedda maintainance lolli Quote Link to comment Share on other sites More sharing options...
MegaPowerRockstar Posted June 2, 2021 Author Report Share Posted June 2, 2021 that is how they set up here.. one instance on cloud another fall over is different location/region.. but they are under load balancer.. how do i solve it from my web service ?? Â Quote Link to comment Share on other sites More sharing options...
Spartan Posted June 2, 2021 Report Share Posted June 2, 2021 22 minutes ago, MegaPowerRockstar said: that is how they set up here.. one instance on cloud another fall over is different location/region.. but they are under load balancer.. how do i solve it from my web service ?? Â ne web service ki a load balancer endpoint ivvu..instead of direct connection string... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.