"Flume" Flume load Balancing Environment construction Load_balance

Source: Internet
Author: User

Flume load Balancing is the choice of a certain algorithm per sink output to the specified place, if the file output is very large, load balancing is still necessary, through the output of multiple channels to alleviate the output pressure

Flume built-in load balancing algorithm by default is round robin, polling algorithm, ordered selection

Here's a look at the specific examples:

# Name The components in this agenta1.sources = R1a1.sinks = K1 k2a1.channels = C1 # describe/configure the SOURCEA1.SOURC Es.r1.type = execa1.sources.r1.channels=c1a1.sources.r1.command=tail-f/root/dev/biz/logs/bizlogic.log #define Sinkgroupsa1.sinkgroups=g1a1.sinkgroups.g1.sinks=k1 K2a1.sinkgroups.g1.processor.type=load_ Balancea1.sinkgroups.g1.processor.backoff=truea1.sinkgroups.g1.processor.selector=round_robin#define the sink 1a1.sinks.k1.type=avroa1.sinks.k1.hostname=192.168.11.179a1.sinks.k1.port=9876  #define The sink 2a1.sinks.k2.type=avroa1.sinks.k2.hostname=192.168.11.178a1.sinks.k2.port=9876# use a channel which buffers events in Memorya1.channels.c1.type = memorya1.channels.c1.capacity = 1000a1.channels.c1.transactioncapacity = # Bind The Source and sink to the Channela1.sources.r1.channels = C1a1.sinks.k1.channel = C1a1.sinks.k2.channel=c1

The above is the Flume Agent client configuration, server-side configuration is the same as the previous article http://blog.csdn.net/simonchi/article/details/42494461


Also through the script to simulate the generation of file content, trigger Tail-f, execute two times, found the first output in 179, the second output in 178, indicating that load balancing has taken effect!!


Very simple!!

"Flume" Flume load Balancing Environment construction Load_balance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.