Jump to content

Need help Sql database fail over


Recommended Posts

Posted

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 ?

Posted
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

Posted

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.

  • Upvote 1
Posted
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..

Posted
5 hours ago, erragulabi said:

check sql alwayson availability groups 

i did not understand.. is there a separate group/forum..

Posted
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

ha-config-replica.svg

 

  • Upvote 1
Posted
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

ha-config-replica.svg

 

It is a stand alone... we just hosted windows server on cloud and we access it as normal sql server.

Posted
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

Posted

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 ??

 

Posted
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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...