[imp] Attachments with a load-balanced web cluster

Matt Flaherty matt@boltbluecorp.com
Thu, 10 May 2001 17:10:39 +0100


> > I've got a site with serveral Linux web servers
> > sitting behind a load-balancer. Uploaded attachments
> > are often lost because sequencial requests will span
> > different physical machines. I've got an NFS mounted
> > partition that I'd like to use as the upload_tmp_dir.
> > I'm wondering if this is safe, though. How are the
> > .att filenames formed? Will they still be unique when
> > created by a fleet of webservers?
>
> It should be safe, since it is created using the PHP temporary file
> generation functions.  Doesn't your load balancer allow 'sticky'
> connections, like most Level 4 switches do?  That way you don't need to
> NFS mount a temporary directory.
>
> Anil

We're already using an NFS mount for another application, so that's okay.
The load balancer does allow sticky connections; however, I'd rather that
the physical layout of the site were transparent to the client session. So
the question is, is the output from the PHP temporary file generation
functions unique when generated from different systems? If they use the time
and the process id, it might not be.

-Matt