Code Monkey home page Code Monkey logo

Comments (3)

spalger avatar spalger commented on May 17, 2024

Sounds like before ES2 goes down the client sniffs the cluster and sees that it's made up of one node (ES2), causing it to remove all other connections. Then, when ES2 goes down, the client keeps trying to connect to the only node it knows of (EC2).

The simplest answer is probably to add nodes to your cluster, this could prevent your entire cluster from falling over and therefore prevent this issue.

If plan to keep your cluster at two nodes, I'd suggest disabling sniffing. With sniffing disabled, connections won't be removed dynamically and your original host list will always be used.

Finally, increasing the sniffInterval should make this less likely but it won't actually prevent it from happening.

from elasticsearch-js.

krishnakumar85 avatar krishnakumar85 commented on May 17, 2024

Yes, That works. Thank you. 👍
Shouldn't the sniffInterval update the list of hosts and add to the connectionPool?

from elasticsearch-js.

spalger avatar spalger commented on May 17, 2024

Yes, but it relies on the cluster to define the current list of nodes.

from elasticsearch-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.