Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CDDE11591 for ; Fri, 27 Jun 2014 09:50:01 +0000 (UTC) Received: (qmail 325 invoked by uid 500); 27 Jun 2014 09:50:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 274 invoked by uid 500); 27 Jun 2014 09:50:00 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 99897 invoked by uid 99); 27 Jun 2014 09:49:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 09:49:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of suraj.kumar@inmobi.com designates 209.85.213.174 as permitted sender) Received: from [209.85.213.174] (HELO mail-ig0-f174.google.com) (209.85.213.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 09:49:55 +0000 Received: by mail-ig0-f174.google.com with SMTP id l13so1769636iga.7 for ; Fri, 27 Jun 2014 02:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inmobi.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=NmMB/eLD/6urNQM+JJgOW/WgAOdLWH5yslvKjQUSrQA=; b=nCiEew6uwZofxZPkLUNAIT0g87Ku8bSfYETwYLuY7ODNviZV8sKDYCC1EeZxkgXkqx 3/sqkD1IbwN02K1kmcW1QZkcy69JgZA7zicMbTDOrUNnjycmQMqUI+zNsT5Q/7f7k+4z tXhD9pguZWK1CtOq7aCW8QWuUZ2D8yEPwZxKc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=NmMB/eLD/6urNQM+JJgOW/WgAOdLWH5yslvKjQUSrQA=; b=Pb4FMIWNcIy/sTZ1Ll8bUyfAJ/Oplv2MNs8QtSzGK802KB/tpnepzGo2H3vsa6Gfxf bwplS+rfICllkL70Go8r60296/SlF3EwxVeiGUOJWeA6XUdxH6gfJ/mrIBYtUwdadG4m Pyssmeau2xfpe/9gFY6nHxBIGZVrZdZ/4z6E/gdv7oZv41r9AO+J5LXqpKzhk3HlcPWl U/15JSZDl/lopS/RhfRDlRVOp8hZgnQqN0rjRjc2+ATSMFAxylQSXZlWhTuWX7vCfri3 3RiU/02aZ3BTYoWx7pTCrpNprClXZZ9XxadPh7aHPOndc4Ga6PtqeTVW15kkxbP8wm3K xksA== X-Gm-Message-State: ALoCoQlQzU+aPDUJcCCGZCEzC5Le1gnXxI3HAyHu3PgseXwLojHPG+bRPP//X8S60yfKEVQ1gjI11sD0hIYDFldH+BcnIZ9adlws5lhtpDzf2FrBf9bbAhs= MIME-Version: 1.0 X-Received: by 10.42.25.19 with SMTP id y19mr19467898icb.45.1403862570433; Fri, 27 Jun 2014 02:49:30 -0700 (PDT) Received: by 10.64.15.197 with HTTP; Fri, 27 Jun 2014 02:49:30 -0700 (PDT) Date: Fri, 27 Jun 2014 15:19:30 +0530 Message-ID: Subject: Per-user rate-limiting of writes From: Suraj Kumar To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf3042745ad3280a04fcce392e X-Virus-Checked: Checked by ClamAV on apache.org --20cf3042745ad3280a04fcce392e Content-Type: text/plain; charset=UTF-8 Hi, We use CouchDB's _users DB extensively for authentication. We'd like to rate-limit the number of writes to CouchDB per user. How can this be achieved? One way is to make a web-server do the rate-limiting. But we're really looking for rate limiting how many docs a given user can have in the system beyond which writes should 'fail'. How can this be done? I can think of ways to 'keep no more than N docs per user' but I'd ideally like to inform the user via HTTP response then and there when write rate-limit threshold has crossed. Is this possible? Thanks, -Suraj -- An Onion is the Onion skin and the Onion under the skin until the Onion Skin without any Onion underneath. -- _____________________________________________________________ The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The firm is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. --20cf3042745ad3280a04fcce392e--