[File Upload] Serious problem using a load balanced application

[File Upload] Serious problem using a load balanced application

  
Forge Component
(10)
Published on 16 Feb by Pedro Oliveira
10 votes
Published on 16 Feb by Pedro Oliveira
All,

Firstly, love the widget - its extremely useful.

We have a load balancer sitting on top of two application servers and our application utilises the File Upload widget to split large files into 1Mb chunks. 

For some reason, small files were working fine but larger files were not running through properly.
After a lot of testing it appears that there the File Upload widget randomly chooses which application server to save the current "chunk" to, so we end up with some chunks on Server A and some chunks on Server B.

I am therefore faced with the prospect of having to write some logic and web services to pull together these chunks into a single file and store in a table so that it can be accessed by both application servers. 

Im not really keen on this approach - it seems overly complex.

Has anybody else stumbled across similar problems?

Im not sure if this is an issue with the app, or an Outsystems/AWS compatibility issue?

Thanks
Tom
I know nothing about your network configuration except what you have stated in this post but I would bet serious money it's the load balancer.  The goal of the load balancer is to distribute the transactions across the application servers.  Since files that are less than 1 mb are done in one transmission, they work.  Files that require multiple transmissions for multiple chunks of the file are being distributed across the application servers, exactly as expected.

The fix is a bit more challenging.  You need to find someone that knows how to configure your load balancer.  Typically, you can make sessions 'sticky' such that, once a session is established with a user the user stays on one application server until the session ends or there is some type of failure.  If changing the load balancer cannot be done then you'll have to invent some workaround for this but it'll be challenging for sure.  Unfortuately, I can't provide any more help than that.

Curt