On January 23, 2012 9:35 , Roland RoLaNd <r_o_l_a_...@hotmail.com> wrote:
i've successfully setup web clustering between 7 web servers.
How did you set up clustering? There are several ways, and which one
you chose can affect the answer to your question below.
now i'm having a prob where a user uploads a file, and it only exists
on the server that his session landed on.
I'm seeking your help in possible ways to propagate files uploaded
across servers.
Let's assume your web servers are running under Linux.
The easiest way (ignoring what you've already done to set up clustering)
is to use NFS to share the document root directories for your web
virtual hosts and/or to share the upload directories. That is, one of
your machines will be a fileserver and export these directories to all
of the other web servers in your cluster. If you need fault tolerance,
you can have multiple front-end servers with heartbeat and automatic
failover, possibly backed by a SAN.
Another option is to have all web servers in your cluster periodically
(say, once every 5 minutes) synchronize their upload directories with
one another -- or, better and easier, a central host -- via rsync.
What may be the best way is to not store the files in a filesystem, but
instead store them in a database -- preferably a NoSQL database such as
MongoDB or Cassandra -- so that all web servers can access them. This
would require changing any script that uses the uploaded files to
retrieve them from the database instead of from the filesystem.
--
Mark Montague
m...@catseye.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org