Skip to content

Verify this plugin round-robins for every bulk request #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
suyograo opened this issue Oct 16, 2015 · 3 comments
Closed

Verify this plugin round-robins for every bulk request #274

suyograo opened this issue Oct 16, 2015 · 3 comments
Labels

Comments

@suyograo
Copy link
Contributor

The elasticsearch-ruby client is supposed to round-robin requests to the nodes specified in the hosts setting. From internal testing it seems like one of the node is getting hit more often than the other. The setting used in testing was [localhost:9200, localhost:9201]

round-robin

y-axis in the graph is the bytes-in to a port. Data in bulk request used for testing was the same size, so we should not see 2:1 requests distribution to hosts, should have almost equal distribution

@suyograo suyograo added the bug label Oct 16, 2015
@suyograo suyograo changed the title Verify round-robin requests happen for every bulk request Verify we round-robin for every bulk request Oct 16, 2015
@suyograo suyograo changed the title Verify we round-robin for every bulk request Verify this plugin round-robin for every bulk request Oct 16, 2015
@suyograo suyograo changed the title Verify this plugin round-robin for every bulk request Verify this plugin round-robins for every bulk request Oct 16, 2015
@gingerwizard
Copy link

The following test was performed:

  1. Two node cluster running on 9202 and 9201 respectively.
  2. Logstash configuration indexed data over HTTP. Following output configuration:

output {
elasticsearch {
host => ["localhost:9202","localhost:9201"]
cluster => "test-cluster"
protocol => "http"
workers => 1
index => "test"
flush_size => 500
}
}

  1. Packetbeat monitoring HTTP ports 9202, 9201. Packetbeat configured to index into separate Elastic cluster on 9200 so as to not skew results.
  2. Kibana configured to use 9200 packetbeat index. Only requests with HTTP path path:"/_bulk" considered in the following visuals.
  3. 4 visuals as shown below.
    • Sum of bytes over time per port
  4. Total requests over time per port
  5. Total Requests port 9201
  6. Total Requests port 9202
  7. Sum of bytes port 9201
  8. Sum of bytes port 9201
  9. The same log line was sent to logstash using nc from a file containing 1m duplicate lines. Ensures packet data is of equal size. No filters in logstash.

image

The above shows a balance of requests. Issue can be closed.

Thanks
Dale

@gingerwizard
Copy link

Wrong image.

image

@TinLe
Copy link

TinLe commented Mar 8, 2016

There is a related bug where in the first two hosts listed in hosts => get more connections and consumed lots more filehandles.

It's easily reproduced in logstash versions 2.1.0 - 2.1.3, and logstash versions 2.2.0 - 2.2.2

jakommo added a commit that referenced this issue May 3, 2019
I've seen the question, on how the output load balances, coming up every now and then and the docs should have the answer.
I'd still like a logstash developer to review and double check that it still is Round-robin per bulk in the current version of the plugin. 
My assumption is based on #274 and #493 (comment), but the first one is from 2015 and the second onw is from 2018, but with Logstash 2.4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants