If I create an Geo-replicated sql database in azure, what database does the user connect to?

239 views Asked by At

For example, if I have a database in North America and replicate it in Europe, will a European user automatically connect to the replicated database in Europe?

1

There are 1 answers

1
4c74356b41 On

Short answer: No.
Long answer: If you use Active Geo-Replication you can use replica DB for reads (only), but it won't magically happen on its own.
What you have to do - implement some logic on your application to forward requests to the appropriate DB (or if its a WebApp, provide different connection strings to different instances of your WebApp).

Further reading: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-overview