We have an API hosted in an application service in two regions - Singapore and Hong Kong. In addition, in Singapore we have a primary SQL database with geographic replication in HK.
We intend to keep two ConnectionString lines in our application service configuration β one for reading and one for writing. Our GetMethods API will use the Read Connection String, and the Update / Add / Delete methods will use the Write Connection String.
The Singapore Application Service will have both connection strings pointing to the main database in Singapore, while the HK Application Service ConnectionString entry will point to the Singapore database, and reading ConnectionString will point to the additional HK database.
Thus, users of the HK App Service will have faster reads (and the database in HK will also be used instead of sitting and waiting for a disaster to occur).
If we use the generated Failover-Group ConnectionStrings, then we do not need to change the configuration on the day of the accident.
Do you see any problems with the above installation? I can think of two a. If geo-replication between Singapore and Hong Kong is slow, it will be a bad user experience. b. Itβs a little difficult to write an API to use the correct connection string in Get / Set methods.
My question is that such use is probably not documented anywhere, so we have to do it or not.
Thanks Ashish
source share