Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0BF418127 for ; Tue, 2 Feb 2016 14:22:03 +0000 (UTC) Received: (qmail 3604 invoked by uid 500); 2 Feb 2016 14:21:25 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 3535 invoked by uid 500); 2 Feb 2016 14:21:25 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 3523 invoked by uid 99); 2 Feb 2016 14:21:25 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2016 14:21:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BB6E018062B for ; Tue, 2 Feb 2016 14:21:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.099 X-Spam-Level: X-Spam-Status: No, score=-0.099 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id SdD3oNSkeycu for ; Tue, 2 Feb 2016 14:21:12 +0000 (UTC) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id CCC7C20969 for ; Tue, 2 Feb 2016 14:21:11 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id j78so49539823lfb.1 for ; Tue, 02 Feb 2016 06:21:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=6slnYu0oUZ8AOv6U0kUrp/IAno6rQu/FJB1r/jin3d4=; b=Rojibg5pn8VNmrY+0MMr3FNMC7+M+qd3BEVUzlIuogNL1qH5onycSl9t7kruBHnn7I NMfl91VtdGgEOgNBhAA+4wgTeXLl2GLg75ltq2mVkImWwcpNDPOan7IvU+9qoQO03ZTV 3AxkMl4vCCFWrynI1jydQNUsaq8UT0Tmkx2sroe4HFqMhwZAug8AX3nu72gfwRBv1CmZ JaGSraGSCHxQw3yp5c2i2/rRfEo02pDSelnXNRJpt9uYOb7aSFXCOOvZdF3vyDrcRjma g+wis3uFeu53CngRwMHk9U346p3n90Kw3xzprAZcl+nLH4IC8CUNqxnnun4yHaANsJ8i mU9g== 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=6slnYu0oUZ8AOv6U0kUrp/IAno6rQu/FJB1r/jin3d4=; b=a//3uYJ2jZDHcatVBL4cRPy6R/JUJ3pQUMMSeLqyv1kBCb4ERmX1Slcwc63q2s2dt4 mYELjXBRkUpgedQAgz47xM0UICbFjDPIs2eVoxA6nPNV78ImZVbWR0m8gxJCB3lQXDED u84vstV39TNzOqXEGIhCeCKq6AXQHrFk4rx5C6XfTIOnNd5faCznA4rYCkOZEUXm4hpL zTAPLRudUCUn/fkqA9S7NuNMj4l1jXlWfGFlBE3eN/fEJ8Cu7Ih+3Z9mbZpxyc8Rp5eZ lGc3y6U0EvRnJqPXojfO77LnFRezB0mCHaUUReU/AS6oKvKwJvpNFXc5Ry9F+HSQZ92r xqnw== X-Gm-Message-State: AG10YOSDhb/mAH1XLuBiK24KzaNTdgeFN8Q+TF4x+HuWB8GJsqx2A/ZKB9tabMy77ERY6YGqNVsJyivQm6EWcw== MIME-Version: 1.0 X-Received: by 10.25.158.147 with SMTP id h141mr11275303lfe.147.1454422864304; Tue, 02 Feb 2016 06:21:04 -0800 (PST) Received: by 10.25.84.68 with HTTP; Tue, 2 Feb 2016 06:21:04 -0800 (PST) In-Reply-To: References: <889C21C4-674F-4911-8A41-C16BF81C699C@whitepages.com> Date: Tue, 2 Feb 2016 14:21:04 +0000 Message-ID: Subject: Re: Shard allocation across nodes From: Tom Evans To: solr-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Thank you both, those are exactly what I was looking for! If I'm reading it right, if I specify a "-Dvmhost=foo" when starting SolrCloud, and then specify a snitch rule like this when creating the collection: sysprop.vmhost:*,replica:<2 then this would ensure that on each vmhost there is at most one replica. I'm assuming that a shard leader and a replica are both treated as replicas in this scenario. Thanks Tom On Mon, Feb 1, 2016 at 8:34 PM, Erick Erickson wrote: > See the createNodeset and node parameters for the Collections API CREATE and > ADDREPLICA commands, respectively. That's more a manual process, there's > nothing OOB but Jeff's suggestion is sound. > > Best, > Erick > > > > On Mon, Feb 1, 2016 at 11:00 AM, Jeff Wartes wrote: >> >> You could write your own snitch: https://cwiki.apache.org/confluence/display/solr/Rule-based+Replica+Placement >> >> Or, it would be more annoying, but you can always add/remove replicas manually and juggle things yourself after you create the initial collection. >> >> >> >> >> On 2/1/16, 8:42 AM, "Tom Evans" wrote: >> >>>Hi all >>> >>>We're setting up a solr cloud cluster, and unfortunately some of our >>>VMs may be physically located on the same VM host. Is there a way of >>>ensuring that all copies of a shard are not located on the same >>>physical server? >>> >>>If they do end up in that state, is there a way of rebalancing them? >>> >>>Cheers >>> >>>Tom