Introduction to Caching in F5 LTM
--> Before understanding what is the Web Acceleration Profile and How it works, You need to understand the concept of HTTP Caching in general.
--> HTTP Caching is a method that stores the most used HTTP content in the RAM so that the responses from the server can be provided quickly.
--> The main thing in HTTP Caching is the device that implements the cache need to check is the data which is stored in the RAM is up to date or not.
--> HTTP headers being used by the cache device to check the cache data is up to date or not.
--> HTTP header cache-control:max-age and expires used to check the content provided by the server are modified or not modified.
--> Whenever the server is sending an HTTP response to the client, The server is going to add the Cache-control:max-age header by specifying the time till which the content is valid.
--> If the client tries to access the same content within the time provided by cache-control:max-age then the browser would not send any request to the server and shows the same content.
--> If the client tries to access the content after the time provided by cache-control:max-age then the browser is going to validate by sending the request to the server asking does the content changed or not.
--> If the content in the server has not been changed then the server is going to send 304 Not modified response to the client and the browser would show the same content.
--> If the content in the server has been changed then the server is going to send the new content to the client and the browser is going to show the new content.
--> Proxies are the devices that implement HTTP Caching in general.
--> Proxy devices generally take the content from origin servers ( The server where the data is hosted originally) and responds to client requests for the content which reduces the load the origin servers.
--> The main goal of caching is to reduce the number of requests sent on the origin servers ( The servers which own the content) for the same content.
--> You need to understand two terms when we use caching in general:
1) Hits: If the requested data by the client is present on the Server RAM then it is called a Cache hit
2) Miss: If the requested data by the client is not present on the Server RAM then it is called as Cache Miss
--> F5 also does implement caching functionality using Web Acceleration Profile which is then attached to the Virtual Server.
--> The default cache configuration in BIG IP System caches only responses to HTTP GET requests. we can configure the Web Acceleration profile to cache other requests, including non-HTTP requests.
--> The F5 does not cache everything. Below is a list of HTTP content it can cache:
i) 200, 203, 300, 301, and 410 HTTP responses
ii) Responses to the HTTP GET requests
iii) The list of URLs which we can mention in the Web Acceleration Profile to cache the content
--> The F5 does not cache the content if the headers such as cache-control: private,no-store,no-cache added to the Server responses.
--> The F5 also does not cache the content if the headers such as PUT, HEAD, DELETE, TRACE, and Connect are used.
--> The most important thing is the memory assigned to the RAM Cache that tells the F5 how much content can be cached.
--> It is recommended to use the default memory 100 MB assigned to the RAM Cache.
--> Caching is useful if a site contains a large amount of static content such as CSS files, JavaScript files, or images.
Reference: F5.com,
Md.Kareemoddin
CCIE #54759
0 comments:
Post a Comment