Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-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 11D5D10CB5 for ; Thu, 29 May 2014 19:32:49 +0000 (UTC) Received: (qmail 98332 invoked by uid 500); 29 May 2014 19:22:08 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 98304 invoked by uid 500); 29 May 2014 19:22:08 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 98293 invoked by uid 99); 29 May 2014 19:22:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2014 19:22:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gaurav.cs.sharma@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vc0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2014 19:22:04 +0000 Received: by mail-vc0-f171.google.com with SMTP id lc6so928990vcb.2 for ; Thu, 29 May 2014 12:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=I6pPKmSNMXumHDlkiTUr945a/qEDOl4I8ieKjP0k+xo=; b=nOtmtawABWhofup6sxpYUhFz24na1nqD6QoRd1jgrMmpP21/dFHfDHLSErKetKOJeg wwADa4PEQ5ZL0LZkgsWSg4jKESib3AUA6h+7zIjLQSQQcJGSvebd3o69OLtrwvnGHH8p 8fZUOvvc/NFBAEy62P2qxNnXZtENjmoLvNKxTXl2GEGu765h1dvAP4xbGDl9GXbYuxNO nFWTHjMtRL2pMI9UrnD6sconbQcs/GsN4Rl2O5n1ndQhSMjz3SoWJQSDOERdZA0oHhsq ioGv66BjyjfNqV8yTzvGdEFo+TXN1FtA55oWqZpD0KG+2ZFthrdM7dLcCJ6OkkfIlBr3 ABsg== X-Received: by 10.52.27.115 with SMTP id s19mr3911097vdg.51.1401391303440; Thu, 29 May 2014 12:21:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.161.14 with HTTP; Thu, 29 May 2014 12:21:03 -0700 (PDT) In-Reply-To: References: From: Gaurav Sharma Date: Thu, 29 May 2014 12:21:03 -0700 Message-ID: Subject: Re: 1M queues? To: "users@activemq.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Without knowing much about the domain, now that doesn't seem like the best way to attack this problem. If you were hoping to do any sort of secondly or few-secondly moving windows, the rpc/remoteness alone would negate the use of such a system. A remote system for rate throttling is better suited for more granular time windows. Also, a busy system running on a decent machine with 32 or 48 cores, even with H/T on, juggling 1M or even 100K persistent queues on a single machine, is not going to work very cleanly and you might end up not hitting even the internal sla's. If you absolutely must, partition it away and then replicate the partitions. In the system being throttled, can you assume some kind of fair load balancing across machines receiving the to-be-throttled requests? If yes, then a much more scalable option is to keep an in-memory rate throttler implementation on all of the nodes with periodic snapshotting of data points to disk/db if absolutely needed. You can implement one easily using a deque or let me know and I can share my implementation. On May 29, 2014, at 11:19, Kevin Burton wrote: How would activemq handle a lot of queues per box? Like 1M =E2=80=A6 I'm doing this to implement throttling. and since we can get stats on each queue, I can see if we're massively backlogged on one of the queues. AIs each queue its own database? --=20 Founder/CEO Spinn3r.com Location: *San Francisco, CA* Skype: *burtonator* blog: http://burtonator.wordpress.com =E2=80=A6 or check out my Google+ profile War is peace. Freedom is slavery. Ignorance is strength. Corporations are people.