[imp] Attachments with a load-balanced web cluster

Anil Madhavapeddy anil@recoil.org
Thu, 10 May 2001 16:16:29 +0100


Matt Flaherty wrote:
>
> 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