Using SignalR in an ARR cluster

My team ran into an issue when deploying an application which uses SignalR on a clustered environment using Application Request Routing (ARR). We created a simple three server setup with one server as an ARR node and 2 servers running the application. When accessing the site we saw some odd behavior.

1. All SignalR requests fail to use the more efficient transports (ServerSentEvents/ForeverFrame) and fall back to using Long Polling

2. Some messages get replayed multiple times in IE9

After looking into the issue for a while we figured out it was caused by a setting in ARR called Response Buffer Threshold.

Response buffer threshold (KB)

Lists the size of the buffer, in kilobytes, that ARR uses to retain a response before sending it to the client. Content that is smaller in size than the threshold can be cached.

By default this is set to 256kb which means that it will buffer responses until they reach that amount. By setting this to 0 ARR will no longer buffer and SignlR will function correctly.

clip_image002

 
  • Pingback: The Morning Brew - Chris Alcock » The Morning Brew #1330()

  • http://www.zarria.co.za Quinton

    Thanks for sharing your findings, will definitely save me some time in the near future.

    • http://www.vpillsgold.web.tr article

      Thanks for your post. Good article.

  • http://www.technicalfinancialservices.co.za Bob

    I ran into the same issue, luckily I found your post and resolved it in no time.