Open Max-Levitskiy opened 2 years ago
Uhm, to be more specific - point 2. from https://github.com/warp-contracts/gateway/issues/96#issuecomment-1239077478 If there's a gateway.lock present, the node does not run the syncing transaction tasks - but it still serves both the POST and GET requestes.
If the 'replica' parameter is being used - the node only serves the GET requests and does not run any syncing tasks.
The current functionality of the gateway node is based on "gateway.lock" file. When a node starts it tries to create the lock file. If it is successful, the node takes a "writer" role, "reader" role otherwise.
To run gateway nodes on different machines we introduce RUN_MODE parameter. If this parameter exists, the node skips the lock file logic and uses the parameter to decide about the role. If the parameter is not set or empty, a node use lock file logic for backward compatibility.