Welcome Guest Search | Active Topics | Sign In | Register

AJAX Uploader issue on web farm Options
Fabio
Posted: Thursday, April 21, 2016 7:13:14 AM
Rank: Member
Groups: Member

Joined: 1/9/2008
Posts: 27
Hello,

We have a web farm with 3 nodes sitting behind a load balancing Windows server. AJAX Uploader works fine in this setup, but we are looking to replace NLB with NginX or HAProxy configured to do load balancing. During our tests we discovered that uploader reports progress erratically, but when upload is finished the uploaded file seems to be fine. Here is what I managed to find from network logs.

When we use NLB, upload session can be established on one node and then actual upload can go to another node, but while sending chunks of file upload will stick to the same node and progress is reported as expected.

When we switch to a proxy requests keep hopping between nodes and in the beginning responses come back like below:

<Data><Command>GetProgress</Command><SessionID>3b228fba-1798-4273-9078-22d1c44ce634</SessionID><AppID>/LM/W3SVC/6/ROOT-1-131057049221910853</AppID><Total>-1</Total><Received>2</Received><TotalFiles>1</TotalFiles><TransferredFiles>-1</TransferredFiles><CurrentFileName></CurrentFileName></Data>

<Data><Command>GetProgress</Command><SessionID>3b228fba-1798-4273-9078-22d1c44ce634</SessionID><AppID>/LM/W3SVC/6/ROOT-2-131057049001639404</AppID><Total>-1</Total><Received>2</Received><TotalFiles>1</TotalFiles><TransferredFiles>-1</TransferredFiles><CurrentFileName></CurrentFileName></Data>

<Data><Command>GetProgress</Command><SessionID>3b228fba-1798-4273-9078-22d1c44ce634</SessionID><AppID>/LM/W3SVC/6/ROOT-1-131057049109904995</AppID><Total>-1</Total><Received>2</Received><TotalFiles>1</TotalFiles><TransferredFiles>-1</TransferredFiles><CurrentFileName></CurrentFileName></Data>

However, approximately midway through a 35MB file we begin seeing correct counters and progress report appears fine.

I'd appreciate if you could help to figure that out.

Thanks,
Artem
Fabio
Posted: Thursday, April 21, 2016 7:17:53 AM
Rank: Member
Groups: Member

Joined: 1/9/2008
Posts: 27
I should add that temporary and final file locations are on a separate file server that all nodes write to.
eo_support
Posted: Thursday, April 21, 2016 8:54:31 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You will need to make sure all subsequent requests from the same session goes back to the same server. For example, if the "start uploading" request goes to one server and "update status" request goes to another server, then you will run into this kind of problems.

Thanks!
Fabio
Posted: Thursday, April 21, 2016 10:04:47 AM
Rank: Member
Groups: Member

Joined: 1/9/2008
Posts: 27
Thanks for your reply. Can you suggest a way to implement it? As far as I understand, upload sessions are your proprietary concept and load balancers wouldn't be aware of it. Not sure how NLB works.

Maybe you could explain how the upload progress is being reported.
eo_support
Posted: Thursday, April 21, 2016 10:29:33 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
No. This is session affinity. It is not our proprietary concept, it is one of the basic concept that all load balancers should support. You will want to consult your load balancer vendor for how to implement that.
Fabio
Posted: Thursday, April 21, 2016 11:36:03 AM
Rank: Member
Groups: Member

Joined: 1/9/2008
Posts: 27
Ok. The response to the first request in upload sequence looks like this:
<Data><Command>NewSession</Command><SessionID>2b7fcc29-978e-40b3-9fc5-e8824542e5b6</SessionID></Data>
So I thought you mean this session.

We'd like to avoid setting client affinity if possible. NLB worked for us without it. HAProxy works on approximately half of requests.
Can you explain in the sample response below where Total = -1 and Received = 2 come from? How do you store current upload progress?

<Data><Command>GetProgress</Command><SessionID>3b228fba-1798-4273-9078-22d1c44ce634</SessionID><AppID>/LM/W3SVC/6/ROOT-1-131057049221910853</AppID><Total>-1</Total><Received>2</Received><TotalFiles>1</TotalFiles><TransferredFiles>-1</TransferredFiles><CurrentFileName></CurrentFileName></Data>
eo_support
Posted: Thursday, April 21, 2016 12:41:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
You really do need session affinity for the uploader to work. It's designed to work this way. So we are really not in a position to help you hack our product to make it work in ways it's not intended to. I hope you understand.
Fabio
Posted: Friday, April 22, 2016 5:39:44 AM
Rank: Member
Groups: Member

Joined: 1/9/2008
Posts: 27
I understand your position.

We have a number of large customers sitting behind corporate firewalls. Enabling affinity might create uneven load distribution but we'll have to see what actually happens when we do it. We might stick with NLB instead, which we were hoping to get rid of. At least it works without affinity. Both outcomes are less than optimal but I realize you are unable to help with that. Thanks anyway.
eo_support
Posted: Friday, April 22, 2016 10:18:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
You are very welcome and thanks for understanding!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.