0

we have 3 web servers with load balancer.for example 192.168.1.1,192.168.1.2,192.168.1.3.now if i upload a file or directory in 192.168.1.1,it should be reflected in other webservers. samewise if i upload a file or a directory in 192.168.1.2 or 192.168.1.3 which should be reflected in other two servers automatically.how can i do that?

i read some of the websites,they said rsync will help you but when i search about rsync it uses main server and uses client server concepts.this means i can upload a file or a directory in any one of the server all the time and then do rsync.

is there any solution to solve this problem in easy way?

1
  • NFS could be an answer here: Mount the same NFS export on all three web servers - so on all three IPs you see the same FS on the same time.
    – vautee
    Oct 30, 2014 at 13:49

2 Answers 2

1

Something like clusterfs would be the ideal solution to your problem (assuming you run Linux).

1

Your options are typically:

  • provide a file-share and mount that on each web server and store your files there.

  • Do not store files on a file-system but use a (highly available) database and store them as BLOB's instead. A very common approach. Often your application already uses a database anyway and this makes application servers almost stateless, solves a lot of locking, replication, HA, consistency and access problems by shifting them to the database layer, where a lot of those problems are old news, well understood and solved. It can be expensive to maintain though once you reach (a sizeable fraction of) the petabyte range.

  • A proper clustered file-system, that allows concurrent read-write block-level access to your shared storage over Fiber Channel or iSCSI. Enterprise storage arrays tend to be pretty expensive but this can scale very well. Often the cluster file system requires (expensive) licensing for each node for the cluster FS software. Also a quite common solution found in enterprise environments for specialised applications.

  • Use a distributed object store. This is the more open source solution, with low-end commodity hardware, creating redundancy and scalability in the software. This is a common "cloud" approach, where often the object store is an online service such as Aamzon S3 instead of building one yourself.

1
  • Many of those "enterprise cluster file systems" suck donkey balls whenever your filesystem contains (tens of) millions of small files, they start spending all the time just synchronizing the state and the performance drop is abysmal. Just a warning. Oct 31, 2014 at 6:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .