How to Close Connections Between Requests Using Content Rules



This can result in sub-optimal load balancing. By using Content Rules we can force the Client to close the connection between requests resulting in unique sessions for each request.


The content rule to force new connections will add a header called "connection" to HTTP responses and use the Value Close in this.

To do this you must create the content rule:

Rule Name Connclose
Rule Type
Add Header
Header Field to be Added Connection
Value of Header Field to be Added close
Perform If Flag Set

This rule Can then be applied under

Virtual Services-View/Modify Services-Advanced Properties-HTTP Header Modifications-Response Rules
In some scenarios, it may be only applicable to apply this rule for specific requests. For example, Requests that use the method "GET" or possibly matching on a specific string in the request. In this scenario, a similar rule can be used.
In this case, the Rule should be modified to be performed only if a flag is set. (Under perform if flag set option".  A second Content Matching rule can then be created to matching this specific traffic and set the corresponding flag. This content rule would be applied in either the HTTP Request or Response.
Was this article helpful?

0 out of 0 found this helpful