zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.27k stars 280 forks source link

Perform static resource synchronization on the volumes between multiple servers after load balancing #1173

Closed eugle closed 4 years ago

eugle commented 4 years ago

With two servers deployed, the volumes on each server are configured as follows:

volumes: {
    '/home/wwwroot/meteor/domain/bitcalf.com/data': '/data',
},

There is no master-slave server for load balancing. If you are on a 'one' server, the user uploads the file

When nginx switches to Server ‘two’ next time, server 'two' will not have any uploaded files, which will make users feel that the uploaded files are lost. How to solve this problem of file synchronization?

For the time being, the idea is to use a file detection tool in a third-party directory, such as rsync, to synchronize files. However, this is more complicated. Is there an easier way?

zodern commented 4 years ago

Usually apps use a service such as S3 or B2 to store files when they run on multiple servers.

I don't plan to implement this in Mup.

eugle commented 4 years ago

Thank you for your reply