To create an application profile that balances the HTTP traffic type, specify the name, HTTP redirect URL, and the type of persistence in the profile. Optionally, you can also choose to insert the X-forwarded-for-HTTP header.
Procedure
- Log in to the vSphere Web Client.
- Click Networking & Security > NSX Edges.
- Double-click an NSX Edge.
- Click Manage > Load Balancer > Application Profiles.
- Click Add.
The New Application Profile window opens.
- Specify the properties of the application profile.
- Select the type of profile as HTTP.
- Enter a name for the application profile.
- Enter the URL to which you want to redirect the HTTP traffic.
For example, you can direct traffic from http://myweb.com to https://myweb.com.
- Select a type of persistence.
Persistence tracks and stores session data, such as the specific pool member that serviced a client request. With persistence, client requests are directed to the same pool member throughout the life of a session or during subsequent sessions.
Persistence Description Source IP This persistence type tracks sessions based on the source IP address.
When a client requests a connection to a virtual server that supports a source IP address persistence, the load balancer checks whether that client was previously connected. If yes, the load balancer returns the client to the same pool member.
Cookie This persistence type inserts a unique cookie to identify a session the first time a client accesses the site.
The cookie is referred in subsequent requests to persist the connection to the appropriate server.
- If you selected the Cookie persistence type, enter the cookie name and select the mode of inserting the cookie; else, proceed to the next step.
Mode Description Insert NSX Edge sends a cookie.
If the server sends one or more cookies, the client receives an extra cookie (the server cookies and the Edge cookie). If the server does not send a cookie, the client receives the Edge cookie.
Prefix Select this mode when your client does not support more than one cookie.
All browsers accept multiple cookies. If you have a proprietary application using a proprietary client that supports only one cookie, the Web server sends its cookie as usual. NSX Edge injects its cookie information as a prefix in the server cookie value. This added cookie information is removed when the Edge sends it to the server.
App Session In this mode, the application does not support a new cookie added by the virtual server (insert), and nor does it support a modified cookie (prefix).
The virtual server learns the cookie injected by the back-end server. When the client presents that cookie, the virtual server forwards the client request to the same back-end server. It is not possible to see the App Session persistence table for troubleshooting.
- (Optional) To identify the originating IP address of a client connecting to a Web server through the load balancer, enable the Insert X-Forwarded-For HTTP header option.
- Click Add or OK.