Chakri,

Correct - when NiFi instances are clustered, they do not transfer data between 
the nodes. This is very different
than you might expect from something like Storm or Spark, as the key goals and 
design are quite different.
We have discussed providing the ability to allow the user to indicate that they 
want to have the framework
do load balancing for specific connections in the background, but it's still in 
more of a discussion phase.

Site-to-Site is simply the capability that we have developed to transfer data 
between one instance of
NiFi and another instance of NiFi. So currently, if we want to do load 
balancing across the cluster, we would
create a site-to-site connection (by dragging a Remote Process Group onto the 
graph) and give that
site-to-site connection the URL of our cluster. That way, you can push data to 
your own cluster, effectively
providing a load balancing capability.

If you were to just run ListenHTTP without setting it to Primary Node, then 
every node in the cluster will be listening
for incoming HTTP connections. So you could then use a simple load balancer in 
front of NiFi to distribute the load
across your cluster.

Does this help? If you have any more questions we're happy to help!

Thanks
-Mark


> On Oct 7, 2015, at 2:32 PM, Chakrader Dewaragatla 
> <chakrader.dewaraga...@lifelock.com> wrote:
> 
> Mark - Thanks for the notes. 
> 
> >> The other option would be to have a ListenHTTP processor run on Primary 
> >> Node only and then use Site-to-Site to distribute the data to other nodes.
> Lets say I have 5 node cluster and ListenHTTP processor on Primary node, 
> collected data on primary node is not transfered to other nodes by default 
> for processing despite all nodes are part of one cluster? 
> If ListenHTTP processor is running  as a dafult (with out explicit setting to 
> run on primary node), how does the data transferred to rest of the nodes? 
> Does site-to-site come in play when I make one processor to run on primary 
> node ?
> 
> Thanks,
> -Chakri
> 
> From: Mark Payne <marka...@hotmail.com <mailto:marka...@hotmail.com>>
> Reply-To: "users@nifi.apache.org <mailto:users@nifi.apache.org>" 
> <users@nifi.apache.org <mailto:users@nifi.apache.org>>
> Date: Wednesday, October 7, 2015 at 7:00 AM
> To: "users@nifi.apache.org <mailto:users@nifi.apache.org>" 
> <users@nifi.apache.org <mailto:users@nifi.apache.org>>
> Subject: Re: Nifi cluster features - Questions
> 
> Hello Chakro,
> 
> When you create a cluster of NiFi instances, each node in the cluster is 
> acting independently and in exactly
> the same way. I.e., if you have 5 nodes, all 5 nodes will run exactly the 
> same flow. However, they will be
> pulling in different data and therefore operating on different data.
> 
> So if you pull in 10 1-gig files from S3, each of those files will be 
> processed on the node that pulled the data
> in. NiFi does not currently shuffle data around between nodes in the cluster 
> (you can use site-to-site to do
> this if you want to, but it won't happen automatically). If you set the 
> number of Concurrent Tasks to 5, then
> you will have up to 5 threads running for that processor on each node.
> 
> The only exception to this is the Primary Node. You can schedule a Processor 
> to run only on the Primary Node
> by right-clicking on the Processor, and going to the Configure menu. In the 
> Scheduling tab, you can change
> the Scheduling Strategy to Primary Node Only. In this case, that Processor 
> will only be triggered to run on
> whichever node is elected the Primary Node (this can be changed in the 
> Cluster management screen by clicking
> the appropriate icon in the top-right corner of the UI).
> 
> The GetFile/PutFile will run on all nodes (unless you schedule it to run on 
> primary node only).
> 
> If you are attempting to have a single input running HTTP and then push that 
> out across the entire cluster to 
> process the data, you would have a few options. First, you could just use an 
> HTTP Load Balancer in front of NiFi.
> The other option would be to have a ListenHTTP processor run on Primary Node 
> only and then use Site-to-Site
> to distribute the data to other nodes.
> 
> For more info on site-to-site, you can see the Site-to-Site section of the 
> User Guide at
> http://nifi.apache.org/docs/nifi-docs/html/user-guide.html#site-to-site 
> <http://nifi.apache.org/docs/nifi-docs/html/user-guide.html#site-to-site>
> 
> If you have any more questions, let us know!
> 
> Thanks
> -Mark
> 
>> On Oct 7, 2015, at 2:33 AM, Chakrader Dewaragatla 
>> <chakrader.dewaraga...@lifelock.com 
>> <mailto:chakrader.dewaraga...@lifelock.com>> wrote:
>> 
>> Nifi Team – I would like to understand the advantages of Nifi clustering 
>> setup. 
>> 
>> Questions : 
>> 
>>  - How does workflow work on multiple nodes ? Does it share the resources 
>> intra nodes ? 
>> Lets say I need to pull data 10 1Gig files from S3, how does work load 
>> distribute  ? Setting concurrent tasks as 5. Does it spew 5 tasks per node ? 
>>  
>>  - How to “isolate” the processor to the master node (or one node)?
>> 
>> - Getfile/Putfile processors on cluster setup, does it get/put on primary 
>> node ? How do I force processor to look in one of the slave node? 
>> 
>> - How can we have a workflow where the input side we want to receive 
>> requests (http) and then the rest of the pipeline need to run in parallel on 
>> all the nodes ? 
>> 
>> Thanks,
>> -Chakro
>> 
>> The information contained in this transmission may contain privileged and 
>> confidential information. It is intended only for the use of the person(s) 
>> named above. If you are not the intended recipient, you are hereby notified 
>> that any review, dissemination, distribution or duplication of this 
>> communication is strictly prohibited. If you are not the intended recipient, 
>> please contact the sender by reply email and destroy all copies of the 
>> original message.
> 
> The information contained in this transmission may contain privileged and 
> confidential information. It is intended only for the use of the person(s) 
> named above. If you are not the intended recipient, you are hereby notified 
> that any review, dissemination, distribution or duplication of this 
> communication is strictly prohibited. If you are not the intended recipient, 
> please contact the sender by reply email and destroy all copies of the 
> original message.

Reply via email to