Skip to content
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

Disable reload_connections behavior? #164

Closed
simpsora opened this issue May 8, 2015 · 5 comments
Closed

Disable reload_connections behavior? #164

simpsora opened this issue May 8, 2015 · 5 comments
Labels

Comments

@simpsora
Copy link

simpsora commented May 8, 2015

Hi,

Is is possible with the gem to entirely disable sniffing / reload_connections? I see in base.rb that the config option can either be a number, or 10000 -- there's no way to set false.

Use case: we run ES on AWS, and access it through an ELB. We can't access individual machines from the other side of the load balancer, so we want to disable sniffing altogether and force all connections to go via the hostname we give to the client explicitly.

Thanks!

karmi added a commit that referenced this issue May 19, 2015
@karmi
Copy link
Contributor

karmi commented May 19, 2015

@simpsora Hi, sorry for the delay! The reload_connections option can be set to false of course, the code you point to only handles the number after which the reload should occur. So this should be perfectly fine:

client = Elasticsearch::Client.new reload_connections: false
# ...

But I think the code was really confusing in that place, so I've refactored that in the attached commit. Please let me know if you can work with it like this on AWS. Thanks!

@karmi karmi added the waiting label May 19, 2015
@simpsora
Copy link
Author

Thanks @karmi! I misread the code there, it makes sense now. I will investigate further and see if setting the parameter to false does what we need.

@karmi
Copy link
Contributor

karmi commented May 24, 2015

@simpsora Great!, let me know when you try it, please.

@simpsora
Copy link
Author

@karmi we've now set reload_connections to false and it's looking good. Thanks the clarification!

@karmi
Copy link
Contributor

karmi commented May 25, 2015

Glad to hear that!

On 25. 5. 2015, at 13:32, Ross Simpson notifications@github.com wrote:

@karmi we've now set reload_connections to false and it's looking good. Thanks the clarification!


Reply to this email directly or view it on GitHub.

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

2 participants