Error uploading pictures to group chat (again the cookies)

– A Lync enterprise deployment (with one or more servers), with persistent chat;
– Web Services behind a Hardware Load Balancer (HLB);
– the HLB is configured for cookie affinity (persistent);
– you try to upload a file greater than ~50kb, but it fails with an ‘Error in transfer’ message (as the picture on the right).

File upload to group chats was introduced February 2014 Update for the Lync Desktop Client (CU5/SP1). Mastering Lync has a great description on how the process works.
What I have found is that the Lync client (or just the group chat component) doesn’t honour/supports the set-cookie sent by the HLB. Since no cookie is sent the HTTP Post requests, the HLB might send some file chunk packets to the next available front-end server (depends on the balancer algorithm) and the server will drop with an 500 error.

Change the HLB internal Web Service VIP address to ‘IP source’ affinity. This way the HLB will send all client traffic to the same Front-end server.

Considerations and notes
There is some confusing documentation about Load Balancing internal services:

  • The main MS reference identifies the Ports if Using Only Hardware Load Balancing, but not the affinity type;
  • The Hardware load balancer requirements for Lync Server 2013 is not quite clear about External and Internal settings and how it supports cookie affinity:
    > forcing the cookie to MS-WSMAN will not change the observed client behaviour;
    > but then we find a line stating: ‘for internal Web Services VIPs, set Source_addr persistence (internal port 80, 443) on the hardware load balancer
    > Barracuda ADC doesn’t specify this particular MS requirement. F5 overcomes HTTP persistence with a technique called OneConnect.

Since most of the companies provide private IP for each user client, there’s no issue on load distribution and this configuration is acceptable.
But if a lot of your user clients are behind NATed subnetworks, this configuration is not so much preferable (and that’s the reason to user cookie-based affinity).

As a final thought: Could the MS ‘requirement’ regarding HLB IPsrc persistence be a workaround to a client limitation? It would not be the first cookie handling issue found…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.