From dev-return-95909-archive-asf-public=cust-asf.ponee.io@httpd.apache.org Tue Jun 22 07:23:10 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 64F4B180669 for ; Tue, 22 Jun 2021 09:23:10 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id DDE786127B for ; Tue, 22 Jun 2021 07:23:03 +0000 (UTC) Received: (qmail 16641 invoked by uid 500); 22 Jun 2021 07:22:55 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 16539 invoked by uid 99); 22 Jun 2021 07:22:54 -0000 Received: from spamproc1-he-de.apache.org (HELO spamproc1-he-de.apache.org) (116.203.196.100) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jun 2021 07:22:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-de.apache.org (ASF Mail Server at spamproc1-he-de.apache.org) with ESMTP id 62F511FF4C4 for ; Tue, 22 Jun 2021 07:22:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-de.apache.org X-Spam-Flag: NO X-Spam-Score: -0.2 X-Spam-Level: X-Spam-Status: No, score=-0.2 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamproc1-he-de.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=suse.cz header.b=rDYuXQKh; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=suse.cz header.b=IbalruLQ; dkim=pass (1024-bit key) header.d=suse.cz header.b=KSXxmhP+; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=suse.cz header.b=7VwJYHg8 Received: from mx1-he-de.apache.org ([116.203.227.195]) by localhost (spamproc1-he-de.apache.org [116.203.196.100]) (amavisd-new, port 10024) with ESMTP id TlbN_3ybFpWd for ; Tue, 22 Jun 2021 07:22:51 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=195.135.220.28; helo=smtp-out1.suse.de; envelope-from=pgajdos@suse.cz; receiver= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id E11457FFE2 for ; Tue, 22 Jun 2021 07:22:51 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F37EE2199A for ; Tue, 22 Jun 2021 07:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624346565; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kT5j5JYldxhzEQ6G8T0+VbJyPwX1iLPr0bAKeQbbAOw=; b=rDYuXQKh5qKaogRAYmt9uRvtjOLY8llip2WFXqPAiD2mAc+MKwDzR7jFKdER8yln1ZkJXP eIF03g9G7zk7xuOgj4+tFtiFxbOAUD6T4rIfL9vZoQ6yrv4k/wBSy9far4VVYNW91mwsMT rylQCHl2ECsS9lGCmfAh7Z4gDgLBUwk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624346565; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kT5j5JYldxhzEQ6G8T0+VbJyPwX1iLPr0bAKeQbbAOw=; b=IbalruLQXPgneK1Fi7wnGJ07N8snO472mcujr2FHw5+SBkPlF8mxWkfUUFHBoutfDUU6QF jZg/+7L4UhAiUnAA== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id DEDFF118DD for ; Tue, 22 Jun 2021 07:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624346564; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kT5j5JYldxhzEQ6G8T0+VbJyPwX1iLPr0bAKeQbbAOw=; b=KSXxmhP+gLwhAj+S40R929l9PMs87kYmvZUYz6/6bT1J5XTTPRXCfp+0uZ3V90R/n3TZ7k P3BBZibdJaVsukxtmied62cm1SsbJDuwBIPbgLqk/h7LpTrr5SdmUcLIIbZm2nuBOHZ4RK ieehEPiD/bmiHwbxxXAltu5W5S0xOis= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624346564; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kT5j5JYldxhzEQ6G8T0+VbJyPwX1iLPr0bAKeQbbAOw=; b=7VwJYHg8WpgGOL6nUBCs10tJkg++/8OQyD662lDOcpsu8CjyQrq9o28DkIdsckEobmuTKE y8dvdolZlUeJLTCg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id nOpQNsSP0WDwZgAALh3uQQ (envelope-from ) for ; Tue, 22 Jun 2021 07:22:44 +0000 Date: Tue, 22 Jun 2021 09:22:44 +0200 From: pgajdos To: dev@httpd.apache.org Subject: Re: often mod_proxy cache revalidates Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jun 21, 2021 at 03:06:38PM +0200, pgajdos wrote: > --------------------------------8<------------------------------------ > mkdir -p /tmp/apache-rex/mod_proxy-cache/htdocs-backend > echo 'Backend for reverse' > /tmp/apache-rex/mod_proxy-cache/htdocs-backend/index.html > > sleep 1 > > echo "[2] forward proxy with cache" > for i in $(seq 1 10); do > curl -s -v --proxy http://localhost:60083/ http://localhost:60081/ 2>&1 | grep 'X-Cache' > sleep 0.1 > done > -------------------------------->8------------------------------------ > > gives: > > $ sh run.sh > [2] forward proxy with cache > < X-Cache: MISS from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > < X-Cache: REVALIDATE from test > $ > > Altering (or touching) the the index file is essential, as well as the > sleep afterwards. In other words, when I remove the sleep, I get, without restaring httpd: [2] forward proxy with cache < X-Cache: MISS from test < X-Cache: HIT from test < X-Cache: HIT from test < X-Cache: HIT from test < X-Cache: HIT from test < X-Cache: HIT from test < X-Cache: HIT from test < X-Cache: HIT from test < X-Cache: HIT from test < X-Cache: HIT from test Furthermore: When I add the sleep now and do not restart httpd, I get the same output, 9xHIT. I need to restart httpd first to get 9xREVALIDATE again. Petr -- Have a lot of fun!