Open hayletdomybest opened 1 month ago
1,EngineSnapshotThread will periodically create snapshots for the matching engine and save them in MongoDB. When the matching engine starts, it will read the snapshot from MongoDB and restore it.
2,The matching engine supports deploying multiple instances simultaneously, but only one instance will be active while the others will wait. Once the active instance exits, another instance will immediately start working.
I have reviewed the materials and have the following questions:
I noticed that each time the matching consumer is executed, it starts by sending a CommandStartMessage with an incremented Sequence number. During the process, entities that appear to be updated also use this Sequence number as a base for incremental updates. Finally, a CommandEndMessage is sent. What is the main purpose of this Sequence, and why is it implemented this way?
When multiple matching engines are started, only one leader node consumes messages due to Kafka's characteristics. Each node initializes by dumping data from MongoDB into memory. I'm wondering: since other slave nodes don't participate in the consumption process, will their data become out of sync? If the leader node fails, will the slave nodes have missing data? Or is there a mechanism in place to ensure synchronization across all nodes?
Hi,
I have two questions regarding the system:
Data Reload on Program Restart: When the program is closed and then reopened, where does it reload the orderbook, account, and other relevant data from the last session? Is there a specific mechanism in place to persist and restore this data on startup?
High Availability Support: Does the system support high availability? If so, could you provide details on how this is implemented and what strategies are recommended to ensure redundancy and minimal downtime?
Thanks in advance for your help!