Welcome! Log In Create A New Profile

Advanced

Re: STALE responses taking as much as MISS responses

All files from this thread

File Name File Size   Posted by Date  
badge-and-logo.png 10.4 KB open | download Joan Tomàs i Buliart 02/12/2019 Read message
February 12, 2019 05:54AM
Hi Peter and Reinis,

I do have have a lot of cache, currently I have ~45 millions of keys and its the beginning of our tests which I believe will get close to the 80 million you say.

I will add some tests I have done, I set up flash (a python framework) that delays a response for 5 second then I do the request using my nginx as a proxy.
The max-age is set to 1 second to force nginx to go to the backend, this plus the 5 seconds delay allow me to see both STALE and an UPDATING responses.
What I can see is that, the first request after max-age expiration is a STALE and it takes much more time than the next request which is an UPDATING.

See bellow:

root@ip-127.0.0.1:~# curl -w "%{time_connect}:%{time_appconnect}:%{time_pretransfer}:%{time_redirect}:%{time_starttransfer}:%{time_total}\n" -D - -s -o /dev/null -H "host: flask-instance.com" -H "origin: flask-instance.com" http://localhost:6081/flask-instance.com/flask
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 12 Feb 2019 10:29:36 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 12
Connection: keep-alive
Device: Mobile
CDNOrigin: Mobile
Cache-Control: max-age=1, stale-while-revalidate=60
X-MShield-Cache-Status: STALE

0.004329:0.000000:0.004364:0.000000:0.212526:0.212644
root@ip-127.0.0.1:~# curl -w "%{time_connect}:%{time_appconnect}:%{time_pretransfer}:%{time_redirect}:%{time_starttransfer}:%{time_total}\n" -D - -s -o /dev/null -H "host: flask-instance.com" -H "origin: flask-instance.com" http://localhost:6081/flask-instance.com/flask
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 12 Feb 2019 10:29:38 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 12
Connection: keep-alive
Device: Mobile
CDNOrigin: Mobile
Cache-Control: max-age=1, stale-while-revalidate=60
X-MShield-Cache-Status: UPDATING

0.004289:0.000000:0.004315:0.000000:0.004574:0.004691

The request is always returning a '200' with 5 seconds delay, which mean that both responses would have (in theory) the same response time.
Subject Author Posted

STALE responses taking as much as MISS responses

joao.pereira February 11, 2019 09:59AM

Re: STALE responses taking as much as MISS responses

joao.pereira February 11, 2019 10:06AM

Re: STALE responses taking as much as MISS responses

Peter Booth via nginx February 11, 2019 02:02PM

Re: STALE responses taking as much as MISS responses

Peter Booth via nginx February 11, 2019 02:28PM

Re: STALE responses taking as much as MISS responses

joao.pereira February 12, 2019 05:54AM

RE: STALE responses taking as much as MISS responses

Reinis Rozitis February 12, 2019 07:08AM

Re: STALE responses taking as much as MISS responses Attachments

Joan Tomàs i Buliart February 12, 2019 01:32PM

RE: STALE responses taking as much as MISS responses

Reinis Rozitis February 12, 2019 03:10PM

Re: RE: STALE responses taking as much as MISS responses

joao.pereira February 15, 2019 12:54PM

Re: RE: STALE responses taking as much as MISS responses

Maxim Dounin February 18, 2019 07:46AM

RE: STALE responses taking as much as MISS responses

Reinis Rozitis February 11, 2019 02:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 102
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready