Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F8721885B for ; Thu, 21 Jan 2016 00:55:46 +0000 (UTC) Received: (qmail 8421 invoked by uid 500); 21 Jan 2016 00:55:42 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 8386 invoked by uid 500); 21 Jan 2016 00:55:42 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 8376 invoked by uid 99); 21 Jan 2016 00:55:42 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2016 00:55:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C04F4C0B0C for ; Thu, 21 Jan 2016 00:55:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.101 X-Spam-Level: X-Spam-Status: No, score=-0.101 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 7fxCvAZZHq2L for ; Thu, 21 Jan 2016 00:55:34 +0000 (UTC) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id C1FE720CB8 for ; Thu, 21 Jan 2016 00:55:33 +0000 (UTC) Received: by mail-qg0-f47.google.com with SMTP id o11so20663110qge.2 for ; Wed, 20 Jan 2016 16:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+1HjcV5BgKYPf5LaPlBBgMyvwdozgeDkQYYJzDZRC5U=; b=oA8f41715bG1in+ilsEIgyPgPkQp0uv6r5S5Qeh2Ja/a921mx5tphQNTAIiICiO1wl C5c+gu4FtvS7veo0YYk0mZKVfJoWYMbKFrRfHGZTEMtzhUjyglzp3XjaMoI+CzN88c+j OxSaMBY4nTTy3m3cz+87TFCAy6APP3BTWge17mCGAgKEZLJOSbCwjCf4GHC/26lds94r YpyFoNpK/QBpxBvU1FlMFoL5G2EzIBuiyNFVG8CaHRKEeoorNdbfewrfVXgen/u+P+sp hNvIQsnNCKbn61YJZe44TRnEz4lyTI9oaJwScF8aCFqf7Pn8YW/yLsxAa8O7n5w2k54S 4knw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=+1HjcV5BgKYPf5LaPlBBgMyvwdozgeDkQYYJzDZRC5U=; b=M+SjjbkM03FiqctXzZ7REe7GU84brBBEfm9te+iYu4fGHl8sl3yl5eIqdt10tFuMc7 WkIw3kx4TYWlpKNSyfPLIDw6dd//mmGGeFHbEp8edToWa9Cx9E6ZEle+SPTnzeEcfolJ gAuxz4A1V+spThUAYnAs4IBgaR4vandZ4hVRNE9n7glc5XtkrkzCyllkQQTichOvR+Wc 3kszRvs0J+KhlDoYrZLWLlK6LTVCRbEE87s9Qxb1uS6ge3Kz2XGPV9MiGBxWkZPc/LA4 yW6KeVNe2aVZ795+N9iYkNQCszZ2Xi0jUK3D7kCR7i6VAsdsGK5T20itt/Ksw41AXMa/ ZNTw== X-Gm-Message-State: AG10YORvOsrjZKEbnxsmdFqn65E2lAxWlpdfJcv2rcoWnIqwrAl/Cx/OT1/EqFgagnKZpQ6sWMNX/Vi4S86pIg== MIME-Version: 1.0 X-Received: by 10.140.248.213 with SMTP id t204mr39179413qhc.97.1453337732643; Wed, 20 Jan 2016 16:55:32 -0800 (PST) Received: by 10.55.65.85 with HTTP; Wed, 20 Jan 2016 16:55:32 -0800 (PST) In-Reply-To: References: Date: Thu, 21 Jan 2016 01:55:32 +0100 Message-ID: From: Yann Ylavic To: users@httpd.apache.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [users@httpd] Frequently updating static content On Wed, Jan 20, 2016 at 9:36 PM, David Rush wrote: > I'm using Apache 2.4 (on Linux) to serve some static files that are > re-created and re-written every two minutes. The nature of our site is that > we get hammered with high request rates from time to time (thousands of > requests per minute at times). > > Are there any issues with frequently updating a file that's being served? Not that I'm aware of. > What happens if it's updated (re-created) at the same instant that it's > being requested? This should be handled carefuly, the updater and the server should not race on the content of the file but on the file (inode) itself. You could first create the new file with an extension (e.g. ".tmp") and then rename it to the served file using "mv -f servedfile.tmp servedfile", which is usually atomic on Unixes (at least Linux and BSDs afaict). Regards, Yann. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org