Reputation: 895
We have clustered instances in Google Compute Engine for the app server, i.e. one for master and another for slave. The application accepts the user uploaded files which will be saved in file system. Question is how to synchronize these uploaded files between master and slave instances? Google Compute Engine doesn't allow to attach a persistent disk to multiple instances in read-write mode.
Is there any solution to solve this problem? Thanks in advance!
Upvotes: 0
Views: 352
Reputation: 227
There are several option that come to mind the depend on the level of synchronization you require. rsync is a useful tool for keeping directories in sync across machines, and it will perform incremental diffs to reduce network traffic, but that will lead to periods where one machine has a different view of state than the other machine. You could use NFS to share one of the PDs between the systems. Alternatively, you could try storing the uploaded files in Google Cloud Storage that you access from both systems.
Upvotes: 1