Compression Profile
--> As we are compressing the file or packet size on the server and sending the compressed file to the client will enhance the performance.
--> You might be thinking how does the compression is working, Basically, Each and every filetype contains wasted space used for redundancy.
--> Compression works on how to minimize the wasted space on each and every file type without affecting the quality of the file.
--> Compression is divided into two types based upon the filetype being used:
1) Lossless Compression:
--> Does not modify or change the data before compressing it.
--> There is no loss of the data.
--> File types such as gif and PNG are compatible for lossless compression
2) Lossy Compression
--> Modify or change the data before compressing it.
--> There is little bit loss of the data.
--> File types such as jpeg/mp3/avi are compatible for lossless compression.
--> Now you have understood what are the different types of compression methods being used, Its time to know what are the different compression algorithms used on the server.
--> There are basically two types of compression algorithms used by almost all the servers:
1) gzip
2) Deflate
--> Usually the web browser acts as the client and the device which hosts/stores the content acts as the server in the compression.
--> There are three HTTP headers are used by a web browser to select the compression algorithm and size of the file:
1) Accept-Encoding: It does tell the compression algorithm supported by the web browser to the server.
2) Character Encoding: It tells the compression algorithm selected by the server to the client after receiving the request
3) Content-Length: tells the size of the compression file after compression is done by the server.
--> F5 LTM implements compression by using a compression profile which will be attached to the virtual server after creating it.
S1: Whenever the client sends the traffic to F5 LTM by mentioning the compression algorithm in the accept-encoding HTTP header.
S2: The F5 BIG IP system then removes the Accept-Encoding header which has been received from the client before sending it to the backend servers so that the backend servers do not perform the compression.
S3: The backend server responds to the request from F5 LTM and sends data/response to F5 LTM.
S4: Now F5 LTM compresses the information received from the backend server using the compression algorithm selected in the profile.
HTTP Compression Profile Pre-requistes
--> Requires HTTP Compression Add-On License ( #tmsh show /sys license detail | grep perf_http_compression_Mbps --> perf_http_compression_Mbps [100])
--> The rate at which maximum compression is performed on F5 LTM depends upon the system.
--> Compression Method is hardware or software based on the F5 LTM
HTTP Compression Profile Recommendations
--> Compression Type: F5 implements the compression based upon one of the below things:
1) File Type: You can specify the file types such as text/CSS in the compression profile, If the client request contains the mentioned file type in the request then F5 LTM will perform compression before sending the response to the client.
2) URI List: You can specify the list of URLs in the compression profile, If the client request contains the mentioned URL in the request then F5 LTM will perform compression before sending the response to the client.
1) gzip
2) deflate
--> Compression Level: The level starts from 1 to 9. The lowest value performs the compression faster and the highest value performs the compression at a slower rate. Higher the value the more content can be compressed.
--> Minimum Content-Length: Minimum size of the content needs to match in order to F5 performs compression
--> Selective Compression:
1) Enabled: Compression is performed based upon Irules
2) Disabled: Compression is performed based upon the HTTP profile.
Reference:F5.com
Md.Kareemoddin,
CCIE# 54759
very nice article mohamed, keep it up
ReplyDeleteJazak allah khayran