We need to make HAProxy ignore SignalR request, when counting connections to server.
Problem is that sometimes we send a lot of messages over SignalR. HAProxy see these messages, and make solution, that server is very busy, so redirect users to another server. But these messages are very lighweight, and server is not busy to process them. So, we want count business of the server only by usual http requests, excluding signalr requests. How can we configure this?
P.S. We use sticky sessions.
Did you try create an Access Control List and identify if it's an Signal or regular HTTP request ?
The
acl is_signalr path_beg -i /signalrline creates an ACL namedis_signalrthat matches requests whose path begins with "/signalr". Adjust this path according to your SignalR endpoint. Thestick on src if !is_signalrline configures HAProxy to use the client's source IP address for stickiness, but only if the request is not a SignalR request.The
stick store-response src if !is_signalrline makes sure that the stickiness information is stored based on the source IP address for responses of non-SignalR requests.