Code Monkey home page Code Monkey logo

Comments (4)

ayeowch avatar ayeowch commented on July 20, 2024

@ptschip Bitnodes uses up to 2 connection slots:

  1. crawl.py - Connects to your node and disconnects after completing a handshake. This repeats after the full network snapshot is taken which happens approximately every 5 minutes given the current network size.

  2. ping.py - Maintains open connection with your node to get latency data. The latency data is used to generate data for the leaderboard https://bitnodes.21.co/nodes/leaderboard/ and it is also presented in the individual node status page, e.g. https://bitnodes.21.co/nodes/62.63.157.78-8333/

From your description, it sounds like you are talking about ping.py? If so, this is currently an expected behavior from the crawler.

from bitnodes.

ptschip avatar ptschip commented on July 20, 2024

ok, yeah i see it actually disconnecting after about 30 seconds...what was happening is that when we have no connection slots available the least useful connection gets evicted...so during that 30 second or so interval your connection gets evicted. I do wonder though why it's taking 30 seconds...i see the ping getting done but the connection still open for a while..are you sure you'r disconnecting right after the ping? Or maybe the ping received on your side from us is coming back much slower than the ping that we receive from you? Ok, that's probably what it is...but still seems like long time.

EDIT: I'm watching it a little more, sometimes it's about 15 seconds to get the disconnect, so it varies...I think yesterday it must have been a much slower day....Anyway, it looks like it's working the way you say it should. Sorry for the bother, just trying to understand.

from bitnodes.

ptschip avatar ptschip commented on July 20, 2024

Taking a look through your code a bit, I'm wondering if the longer than expected connection times are due to the KeepAlive that you use and maybe you're not issuing an explicit disconnect and just allowing the connections to time out? What I see is that the ping, at least the one we receive from you, usually takes about 1 second but then it take 15 to 30 seconds for the connection to drop.

from bitnodes.

ayeowch avatar ayeowch commented on July 20, 2024

@ptschip Connection from ping.py will drop only when there is network issue. It is not expected to disconnect from your node, i.e. it takes up 1 connection slot indefinitely.

from bitnodes.

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.