SUBJECT : HLD - master slave architecture

image

In the attached picture, I have drawn some servers on which the application code is running. Pls correct me if I have done it incorrectly.

Q - when we follow the Master Slave architecture "at application level", Pls consider the following two cases:
CASE 1 -
does the same [only one] application code instance runs on all the servers Across All the Availability Zones and Across All the Data Centers?
OR
CASE 2 -
Each server runs an application code instance of its own, independently(ISOLATED)?

If the answer is case 2 then how is the concurrency handled?

Bcs the other thread running in other server can't find if the monitor was locked by some thread in the current server instance.

Comments (2)