Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5CC5CE72B for ; Fri, 21 Dec 2012 19:05:00 +0000 (UTC) Received: (qmail 84407 invoked by uid 500); 21 Dec 2012 19:04:59 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 84362 invoked by uid 500); 21 Dec 2012 19:04:59 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 84354 invoked by uid 99); 21 Dec 2012 19:04:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Dec 2012 19:04:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Chiradeep.Vittal@citrix.com designates 66.165.176.63 as permitted sender) Received: from [66.165.176.63] (HELO SMTP02.CITRIX.COM) (66.165.176.63) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Dec 2012 19:04:53 +0000 X-IronPort-AV: E=Sophos;i="4.84,331,1355097600"; d="scan'208";a="1514047" Received: from sjcpmailmx02.citrite.net ([10.216.14.75]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 21 Dec 2012 19:04:31 +0000 Received: from SJCPMAILBOX01.citrite.net ([10.216.4.72]) by SJCPMAILMX02.citrite.net ([10.216.14.75]) with mapi; Fri, 21 Dec 2012 11:04:31 -0800 From: Chiradeep Vittal To: CloudStack DeveloperList Date: Fri, 21 Dec 2012 11:04:28 -0800 Subject: Re: [DISCUSS]API request throttling Thread-Topic: [DISCUSS]API request throttling Thread-Index: Ac3frgF2Fzjw/+q4S9OeAhO6kAlglw== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.13.0.110805 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org The other usecase for throttling is during system instability and recovery operations. E.g. Let's say there is maintenance going on in a part of the cloud and so the operator knows that API requests are going to fail on the backend / or create further pressure on the physical resources that they cannot manage. In this case it is better to throttle the API requests upfront. Requiring the admin to change a global setting via the DB does not make sense: it has to be an admin API that can throttle everybody. Which brings me to another question: what is the response: is it a HTTP error code or a normal response that has to be parsed? The reaction of most users to an error from the cloud is to re-try -- thereby making the problem worse. On 12/20/12 10:10 AM, "Min Chen" wrote: >That is a good thought. Currently we haven't thought of automatically >trigger those blocked requests, and still expect users to manually trigger >it.=20 > >Thanks >-min > >On 12/20/12 7:52 AM, "Pranav Saxena" wrote: > >>Amazon uses API throttling but from what I know they leverage the leaky >>bucket algorithm and have some kind off a "back-off" algorithm for few >>of their tasks in which the API requests which were throttles are >>automatically triggered depending upon what the use case is . Hence I >>thought that perhaps , we might also encounter a similar scenario in >>cloudstack as well . Can anyone think off a certain use case pertaining >>to Cloudstack which might require such a functionality ? >> >>Regards, >>Pranav >> >>-----Original Message----- >>From: John Kinsella [mailto:jlk@stratosec.co] >>Sent: Thursday, December 20, 2012 9:05 PM >>To: cloudstack-dev@incubator.apache.org >>Subject: Re: [DISCUSS]API request throttling >> >> >>On Dec 20, 2012, at 2:20 AM, Pranav Saxena >> wrote: >>> Also are we planning to build the code in such a way that when we take >>>into consideration the "throttling time " , do we have some kind off a >>>back-off algorithm to trigger the request again automatically ( may be >>>in some scenarios , not sure though ) , when we're being throttled (like >>>come back after a "restore rate" period, specific to the type of API >>>request one is making ) or the user has to make the request again >>>manually every time once he is throttled. This might sound vague but I >>>am just curious to know if such a scenario can exist or not . >> >>Good point. >> >> >