Welcome! Log In Create A New Profile

Advanced

How to determine when the response from the cache

May 12, 2012 07:03AM
Hello!

Can you please tell how to cope with this task.
When nginx gives directly the page, add the title "backend_id".
And when it taking from the cache, don't add the header.

The scheme works like this:
Frontend - nginx with proxy_cache, followed by multiple backends (proxy_pass to multiple servers).
I need to distinguish, when a response from the cache and when it from the backend.
If the response from the backend, i need to understand from which backend he came.
Backends configured to add a response header backend_id.
But the frontend caches the entire response, with headers.
As a result, you can understand which backend was generated response.
But i can't see, is it direct response, or from the cache.

Are there ways to cope with this task?
Need your wise advice.
Subject Author Posted

How to determine when the response from the cache

xore May 12, 2012 07:03AM

Re: How to determine when the response from the cache

hexa May 12, 2012 07:20AM

Re: How to determine when the response from the cache

xore May 12, 2012 09:56AM

Re: How to determine when the response from the cache

xore May 14, 2012 03:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 262
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