PHP File Upload in Sharded Server Configuration
===

We use multiple servers to handle incoming web requests which are load-balanced in a round-robin fashion. I've run into an issue that I'm not sure how to solve. 

Using AJAX ([qqFileUploader][1]), I am uploading a file. By default it goes into the **/tmp** folder which is fine. The problem is when I try to retrieve that file, that retrieval request gets handled by the next server in line which **does not** have the file I uploaded. If I keep repeating the request over and over again, it will eventually reach the original server (via round robin load balancing) where the file was stored and then I can open it. Obviously that is not a good solution. 

Here is *essentially* the code: [http://jsfiddle.net/Ap27Z/][2]. I removed some of it for brevity. You will see that the uploader object makes a call to a PHP file to do the file upload and then after the file upload is complete, another AJAX call is made to a script to process the .csv file. This is where the process is getting lost in the round-robin.

I read a few questions here on SO relating to uploading files to memory and it seems that it is essentially not currently feasible. Is there another option I can use to upload a file and handle it all within the same request?


  [1]: http://valums.com/ajax-upload/
  [2]: http://jsfiddle.net/Ap27Z/