Welcome! Log In Create A New Profile

Advanced

Cache Hit Latency for large responses.

May 01, 2014 06:27PM
Context:
I am currently using nginx to serve as a Response Cache Proxy in order to shim-out (isolate) network latency while running some performance related tests.

The Perf Tests are comprised of 50 repetitions of the same set of requests.
=> I have been able to successfully set-up the proxy_cache so that it would Cache the requests.
(I'm using the request_uri and request_body as the cache_key, since I need to Cache POST Requests as well)
(Our POST Requests are not necessarily Write Requests since our API is using the POST Params for cases where we need to specify longer Params that exceed the limit on GET)
=> I am logging the Cache HIT Status and Request_time in the access_log and basically, I am seeing a variance between 500 ms ~ 2 seconds for the Same Request being Served from the Cache even when it's both a HIT. The Size of the Response is around 170K, and the request_body length is 65k. Most of the other HITS are like 0~100ms for request_time and only the ones that are made around that huge request seems to have some latency.

Question:
#1 I'm using proxy_cache_path. Is it possible that disk I/O is causing this latency? I thought the Filesystem Cache was able to handle these Cache HITs in memory.

#2 When I set the cache_key to be a combination of the request_body and request_uri itself, when it does the lookup, would it automatically pull those and to the lookup as expected?
Subject Author Posted

Cache Hit Latency for large responses.

lovekmla May 01, 2014 06:27PM

Re: Cache Hit Latency for large responses.

Maxim Dounin May 08, 2014 09:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready