Home > Back-end >  SpringCloud how to make a request to the two nodes in the cluster?
SpringCloud how to make a request to the two nodes in the cluster?

Time:12-14

If a file upload request, simultaneously uploaded to the two files to the backend server, consistency, how to implement? Routing forwarding gateway? Or in the interface call interface?

CodePudding user response:

Is anyone here?? .

CodePudding user response:

The realization of the general can be divided into two steps as follows:
Step 1: build a file server configuration table, a file transfer form, initialize your two back-end server url, file upload, query file server configuration table first, and then through the for using gateway routing forwarding, store-and-forward records, define a set forward if there is a success, and put forward the results recorded forwarding document record, prompt the user to upload success, if all forward failure, don't forward to save the file records, prompt the user to upload fail,
Step 2: set a timer task, timing forward files query form, put forward the success of file synchronization to forward failure on the server,
  • Related