I have following question :
There is service MyService
(with REST API written asp.net core ) calling some external service ExtS
. Based on the call of ExtS
some table on DB ( SQL based ) is updated.
There is possible that more than 1 instances of MyService
is running. But all instances access same DB. What is preferred method to ensure that 2 (or more) instances will not update same record in the DB after call of ExtS
? As I understand there locking mechanism on DB to prevent multiple updates simultaneously but I am not sure that it is enough
Thanks in advance