Manual Chapter :
Configuring Content Adaptation for HTTP Requests and Responses
Applies To:
Show VersionsBIG-IP AAM
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP APM
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP Analytics
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP Link Controller
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP LTM
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP PEM
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP AFM
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP DNS
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
BIG-IP ASM
- 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
Configuring Content Adaptation for HTTP Requests and Responses
Overview: Configuring HTTP Request and Response Adaptation
This implementation describes how to configure the BIG-IP® content
adaptation feature for adapting HTTP requests and responses. With this feature, a BIG-IP system
virtual server can conditionally forward HTTP requests and HTTP responses to a pool of Internet
Content Adaptation Protocol (ICAP) servers for modification, before sending a request to a web
server or returning a response to the client system. There is support for secure connectivity for
ICAP between a BIG-IP system internal virtual server and a pool of ICAP servers.
In this implementation, you create a standard HTTP virtual server and pool of web servers for
processing client requests. The HTTP virtual server accepts each client request in the normal
way, but before load balancing the request to the pool of web servers, the virtual server
forwards the HTTP request to a special internal virtual server.
The
internal virtual server
receives the HTTP request from the standard virtual
server, and load balances the request to a pool of ICAP servers for modification. After the ICAP
server modifies the request, the BIG-IP system sends the request to the appropriate web server
for processing. When the web server sends the HTTP response back to the HTTP virtual server, the
BIG-IP system sends the response to a second internal virtual server, which in turn load balances
the response to the pool of ICAP servers for modification. After the ICAP server modifies the
response, the BIG-IP system sends the response back to the client system.The internal virtual server references the pool of content adaptation servers, including the load
balancing method to use for those servers. The internal virtual server also
references an ICAP profile, which includes specific instructions for how the BIG-IP system should
modify each request or response. You can create two separate ICAP profiles, one for wrapping the HTTP
request in an ICAP message for adaptation, and one for wrapping the HTTP response in an ICAP
message for adaptation.
Optionally, each internal virtual server can
reference:
- Any persistence method that you would like the BIG-IP system to use when load balancing traffic to the ICAP pool.
- Any health or performance monitor that you would like the BIG-IP system to use when load balancing traffic to the ICAP pool.
- Any iRules® related to the content adaptation.
Task summary
for content adaptation for HTTP requests and responses
Complete the tasks in this implementation to create a BIG-IP®
configuration that performs content adaptation for HTTP requests and responses.
Creating a custom client-side ICAP profile
You create this ICAP profile when you want to use an ICAP server to wrap an HTTP request in an
ICAP message before the BIG-IP system sends the request to a
pool of web servers. The profile specifies the HTTP request-header values that
the ICAP server uses for the ICAP message.
You can use macro expansion for all ICAP header values. For
example, if an ICAP header value contains
${SERVER_IP}
, the BIG-IP
system replaces the macro with the IP address of the ICAP server selected from the
pool assigned to the internal virtual server. If an ICAP header value contains
${SERVER_PORT}
, the BIG-IP system replaces the macro with the
port of the ICAP server selected from the pool assigned to the internal virtual
server. For example, you can set the URI
value in an ICAP profile to
icap://${SERVER_IP}:${SERVER_PORT}/virusScan
.- On the Main tab, click.
- ClickCreate.
- In theNamefield, type a unique name for the profile.
- For theParent Profilesetting, retain the default value,icap.
- On the right side of the screen, select theCustomcheck box.
- In theURIfield, type a URI in this format:icap://hostname:port/path.For example, using macro expansion, you can set theURIvalue to:
.icap://${SERVER_IP}:${SERVER_PORT}/virusScan - In thePreview Lengthfield, type a length or retain the default value0.This value defines the amount of the HTTP request or response that the BIG-IP system offers to the ICAP server when sending the request or response to the server for adaptation. This value should not exceed the length of the preview that the ICAP server has indicated it will accept.
- In theHeader Fromfield, type a value for theFrom:ICAP header.
- In theHostfield, type a value for theHost:ICAP header.
- In theRefererfield, type a value for theReferer:ICAP header.
- In theUser Agentfield, type a value for theUser-Agent:ICAP header.
- ClickFinished.
After you create the ICAP profile, you can assign it to an internal virtual server
so that the HTTP request that the BIG-IP system sends to an ICAP server is wrapped in an
ICAP message, according to the settings you specified in the ICAP profile.
Creating a custom server-side ICAP profile
You create this ICAP profile when you want to use an ICAP server to wrap an HTTP response in an
ICAP message before the BIG-IP system sends the response back
to the client. The profile specifies the HTTP response-header values that the ICAP
server uses for the ICAP message.
Optionally, you can use macro expansion for all ICAP header
values. For example, if an ICAP header value contains
${SERVER_IP}
,
the BIG-IP system replaces the macro with the IP address of the ICAP server selected
from the pool assigned to the internal virtual server. If an ICAP header value
contains ${SERVER_PORT}
, the BIG-IP system replaces the macro with
the port of the ICAP server selected from the pool assigned to the internal virtual
server. For example, you can set the URI
value in an ICAP profile to
icap://${SERVER_IP}:${SERVER_PORT}/videoOptimization
.- On the Main tab, click.
- ClickCreate.
- In theNamefield, type a unique name for the profile.
- For theParent Profilesetting, retain the default value,icap.
- On the right side of the screen, select theCustomcheck box.
- In theURIfield, type a URI in this format:icap://hostname:port/path.For example, using macro expansion, you can set theURIvalue to:icap://${SERVER_IP}:${SERVER_PORT}/videoOptimization
- In thePreview Lengthfield, type a length or retain the default value0.This value defines the amount of the HTTP request or response that the BIG-IP system offers to the ICAP server when sending the request or response to the server for adaptation. This value should not exceed the length of the preview that the ICAP server has indicated it will accept.
- In theHeader Fromfield, type a value for theFrom:ICAP header.
- In theHostfield, type a value for theHost:ICAP header.
- In theRefererfield, type a value for theReferer:ICAP header.
- In theUser Agentfield, type a value for theUser-Agent:ICAP header.
- ClickFinished.
After you create the ICAP profile, you can assign it to an internal virtual server
so that the HTTP response that the BIG-IP system sends to an ICAP server is wrapped in
an ICAP message, according to the settings you specified in the ICAP profile.
Creating a pool of ICAP servers
You perform this task to create a pool of ICAP servers that perform content
adaptation on HTTP requests.
- On the Main tab, click.The Pool List screen opens.
- ClickCreate.The New Pool screen opens.
- In theNamefield, type a unique name for the pool.
- For theHealth Monitorssetting, from theAvailablelist, select thehttpmonitor and move the monitor to theActivelist.
- From theLoad Balancing Methodlist, select how the system distributes traffic to members of this pool.The default isRound Robin.
- For thePriority Group Activationsetting, specify how to handle priority groups:
- SelectDisabledto disable priority groups. This is the default option.
- SelectLess than, and in theAvailable Membersfield type the minimum number of members that must remain available in each priority group in order for traffic to remain confined to that group.
- Using theNew Memberssetting, add each resource that you want to include in the pool:
- (Optional) In theNode Namefield, type a name for the node portion of the pool member.
- In theAddressfield, type an IP address.
- In theService Portfield, type a port number, or select a service name from the list.
- (Optional) In thePriorityfield, type a priority number.
- ClickAdd.
- ClickFinished.
The pool of ICAP load balancing servers appears in the Pools list.
Creating an internal virtual server for forwarding requests to an ICAP server
A virtual server of type
internal
provides a destination that a
standard
type of virtual server can use when forwarding
HTTP requests slated for ICAP-based content adaptation.- On the Main tab, click.The Virtual Server List screen opens.
- ClickCreate.The New Virtual Server screen opens.
- In theNamefield, type a unique name for the virtual server.
- In theDescriptionfield, type a description of the virtual server.For example:This virtual server ensures HTTP request modification through the use of the.service_nameICAP service.
- From theTypelist, selectInternal.
- For theStatesetting, verify that the value is set toEnabled.
- From theConfigurationlist, selectAdvanced.
- From theICAP Profilelist, select the ICAP profile that you previously created for handling HTTP requests.
- From theDefault Poollist, select the pool of ICAP servers that you previously created.
- ClickFinished.
After you perform this task, a standard type of virtual server can forward HTTP
requests to an internal type of virtual server. The internal virtual server then sends
the request to a pool of ICAP servers, before sending the request back to the standard
virtual server for forwarding to the pool of web servers.
Creating an internal virtual server for forwarding responses to an ICAP server
A virtual server of type
internal
provides a destination that a
standard
type of virtual server can use when forwarding
HTTP responses slated for ICAP-based content adaptation.- On the Main tab, click.The Virtual Server List screen opens.
- ClickCreate.The New Virtual Server screen opens.
- In theNamefield, type a unique name for the virtual server.
- In theDescriptionfield, type a description of the virtual server.For example:This virtual server ensures HTTP response modification through the use of the.service_nameICAP service.
- From theTypelist, selectInternal.
- For theStatesetting, verify that the value is set toEnabled.
- From theConfigurationlist, selectAdvanced.
- From theICAP Profilelist, select the ICAP profile that you previously created for handling HTTP responses.
- From theDefault Poollist, select the pool of ICAP servers that you previously created.
- ClickFinished.
After you perform this task, a standard type of virtual server can forward an HTTP
response to an internal type of virtual server. The internal virtual server then sends
the response to a pool of ICAP servers before sending the response back to the standard
virtual server for forwarding to the client system.
Creating a custom Request Adapt profile
You create a Request Adapt type of profile when you want a standard HTTP virtual
server to forward HTTP requests to an internal virtual server that references a pool of
ICAP servers. A Request Adapt type of profile instructs the HTTP virtual server to send
an HTTP request to a named internal virtual server for possible request
modification.
- On the Main tab, click.
- ClickCreate.
- In theNamefield, type a unique name for the profile.
- For theParent Profilesetting, retain the default value,requestadapt.
- On the right-side of the screen, clear theCustomcheck box.
- For theEnabledsetting, retain the default value,Enabled.When you set this value toEnabled, the BIG-IP system forwards HTTP requests to the specified internal virtual server for adaptation.
- From theInternal Virtual Namelist, select the name of the internal virtual server that you previously created for forwarding HTTP requests to the pool of iCAP servers.
- In thePreview Sizefield, type a numeric value.This specifies the maximum size of the preview buffer. This buffer holds a copy of the HTTP request header and the data sent to the internal virtual server, in case the adaptation server reports that no adaptation is needed. Setting the preview size to0disables buffering of the request and should only be done if the adaptation server always returns a modified HTTP request or the original HTTP request.
- In theTimeoutfield, type a numeric value, in seconds.If the internal virtual server does not return a result within the specified time, a timeout error occurs. To disable the timeout, use the value0.
- From theService Down Actionlist, select an action for the BIG-IP system to take if the internal virtual server returns an error:
- SelectIgnoreto instruct the BIG-IP system to ignore the error and send the unmodified HTTP request to an HTTP server in the HTTP server pool.
- SelectDropto instruct the BIG-IP system to drop the connection.
- SelectResetto instruct the BIG-IP system to reset the connection.
- ClickFinished.
After you perform this task, the BIG-IP system contains a
Request Adapt profile that a standard HTTP virtual server can use to forward an HTTP
request to an internal virtual server for ICAP traffic.
Creating a custom Response Adapt profile
You create a Response Adapt type of profile when you want a standard HTTP virtual
server to forward HTTP responses to an internal virtual server that references a pool of
ICAP servers. A Response Adapt type of profile instructs the HTTP virtual server to send
an HTTP response to a named internal virtual server for possible response
modification.
- On the Main tab, click.
- ClickCreate.
- In theNamefield, type a unique name for the profile.
- For theParent Profilesetting, retain the default value,responseadapt.
- On the right-side of the screen, select theCustomcheck box.
- For theEnabledsetting, retain the default value,Enabled.When you set this value toEnabled, the BIG-IP system forwards HTTP responses to the specified internal virtual server for adaptation.
- From theInternal Virtual Namelist, select the name of the internal virtual server that you previously created for forwarding HTTP responses to the pool of iCAP servers.
- In thePreview Sizefield, type a numeric value.This specifies the maximum size of the preview buffer. This buffer holds a copy of the HTTP response header and the data sent to the internal virtual server, in case the adaptation server reports that no adaptation is needed. Setting the preview size to0disables buffering of the response and should only be done if the adaptation server always returns a modified HTTP response or the original HTTP response.
- In theTimeoutfield, type a numeric value.If the internal virtual server does not return a result within the specified time, a timeout error occurs. To disable the timeout, use the value0.
- From theService Down Actionlist, select an action for the BIG-IP system to take if the internal virtual server returns an error:
- SelectIgnoreto instruct the BIG-IP system to ignore the error and send the unmodified HTTP response to an HTTP server in the HTTP server pool.
- SelectDropto instruct the BIG-IP system to drop the connection.
- SelectResetto instruct the BIG-IP system to reset the connection.
- ClickFinished.
After you perform this task, the BIG-IP system contains a
Response Adapt profile that a standard HTTP virtual server can use to forward an HTTP
response to an internal virtual server for ICAP traffic.
Creating a custom HTTP profile
An HTTP profile defines the way that you want the BIG-IPsystem to manage HTTP traffic.
Other HTTP profile types
(HTTP Compression and Web Acceleration) enable you to configure compression and
cache settings, as required. Use of these profile types is
optional.
- On the Main tab, click.The HTTP profile list screen opens.
- ClickCreate.The New HTTP Profile screen opens.
- In theNamefield, type a unique name for the profile.
- From theParent Profilelist, selecthttp.
- Select theCustomcheck box.
- Modify the settings, as required.
- ClickFinished.
The custom HTTP profile now appears in the HTTP profile list screen.
Creating a pool to process HTTP traffic
You can create a pool of web servers to process HTTP requests.
- On the Main tab, click.The Pool List screen opens.
- ClickCreate.The New Pool screen opens.
- In theNamefield, type a unique name for the pool.
- For theHealth Monitorssetting, from theAvailablelist, select thehttpmonitor and move the monitor to theActivelist.
- From theLoad Balancing Methodlist, select how the system distributes traffic to members of this pool.The default isRound Robin.
- For thePriority Group Activationsetting, specify how to handle priority groups:
- SelectDisabledto disable priority groups. This is the default option.
- SelectLess than, and in theAvailable Membersfield type the minimum number of members that must remain available in each priority group in order for traffic to remain confined to that group.
- Using theNew Memberssetting, add each resource that you want to include in the pool:
- Type an IP address in theAddressfield.
- Type80in theService Portfield, or selectHTTPfrom the list.
- (Optional) Type a priority number in thePriorityfield.
- ClickAdd.
- ClickFinished.
The new pool appears in the Pools list.
Creating an HTTP
virtual server for enabling request and response adaptation
You perform this task to create a standard virtual server that can
forward an HTTP request or response to an internal virtual server. The internal
virtual server then sends the request or response to a pool of ICAP servers before
the BIG-IP system sends the request or
response to the client or web server. There is support for secure connectivity for
ICAP between a BIG-IP system internal virtual server and a pool of ICAP servers.
- On the Main tab, click.The Virtual Server List screen opens.
- ClickCreate.The New Virtual Server screen opens.
- In theNamefield, type a unique name for the virtual server.
- In theDestination Addressfield, type the IP address that you want to use as a destination for client traffic destined for a pool of HTTP web servers.The supported format is address/prefix, where the prefix length is in bits. For example, an IPv4 address/prefix is10.0.0.1or10.0.0.0/24, and an IPv6 address/prefix isffe1::0020/64or2001:ed8:77b5:2:10:10:100:42/64. When you use an IPv4 address without specifying a prefix, the BIG-IP system automatically uses a/32prefix.The IP address you type must be available and not in the loopback network.
- In theService Portfield, type80, or selectHTTPfrom the list.
- From theConfigurationlist, selectAdvanced.
- From theHTTP Profilelist, select the name of the HTTP profile that you created previously.
- From theRequest Adapt Profilelist, select the name of the Request Adapt profile that you previously created.
- From theResponse Adapt Profilelist, select the name of the Response Adapt profile that you previously created.
- From theSource Address Translationlist, selectAuto Map.
- From theDefault Poollist, select the name of the HTTP server pool that you previously created.
- ClickFinished.
After you create the virtual server, the BIG-IP system can forward an HTTP request or response to a pool of ICAP
servers before sending the request or response to the client or web server,
respectively.
Implementation result
After performing the tasks in this implementation, the BIG-IP® can
perform content adaptation on HTTP requests and responses as they pass through the BIG-IP system
during normal HTTP processing. The new objects that this implementation creates are:
- Two custom ICAP profiles (for requests and responses)
- One pool of ICAP content adaptation servers
- Two separate internal virtual servers. One internal virtual server load balances HTTP requests to the ICAP pool , while the other load balances responses to the ICAP pool.
- Two custom adaptation profiles (a Request Adapt profile and a Response Adapt profile) that each reference a separate internal virtual server (for requests and responses, respectively)
- A custom HTTP profile
- A standard HTTP pool of web servers
- A standard HTTP virtual server that sends HTTP requests and responses to an internal virtual server for content adaptation, load balances HTTP requests to the web pool, and forwards HTTP responses to the relevant client