Giter Site home page Giter Site logo

Comments (10)

cazala avatar cazala commented on August 16, 2024

I see, so 1 tcp connection per websocket kills the pool, and 1 tcp connection per address doesn't work at scale.. I dunno if should I optimize somehow the single tcp connection or have a configurable pool of tcp connections that get reused (say, no more than 100 websockets sharing the same tcp connection).. ideas?

from coin-hive-stratum.

justnx avatar justnx commented on August 16, 2024

How about TCP fastopen Support?

from coin-hive-stratum.

korzhyk avatar korzhyk commented on August 16, 2024

Looks great to share 1 socket connection for limited users. Also we need to keep in mind that pool DIFF is matter and when DIFF is low (< 2000) there are too many messages will be sent to pool and when DIFF is large there are no heavy load. So maybe a better way to implement a rate-limiter for socket connection? When messages to pool over 200-400 (depending on latency) per second we can create a new socket instance and push new messages to new socket.

from coin-hive-stratum.

korzhyk avatar korzhyk commented on August 16, 2024

And I prefer for easy solution of limit miners per socket.
For example: 3000 ws connections can be handled by 60 tcp sockets (50 ws/tcp) and there are 98% profit of saved tcp connections.

from coin-hive-stratum.

korzhyk avatar korzhyk commented on August 16, 2024

@justnx TFO is not about of "speedup" data transmission this is for fast TCP connection (handshake).

from coin-hive-stratum.

cazala avatar cazala commented on August 16, 2024

okay, when I have some time I'll try to refactor the code to at least initially have a configurable maximum amount of miners per socket. If this solves the problem then I can implement some logic to figure out this number automatically (ie, messages per second as you suggested)

from coin-hive-stratum.

justnx avatar justnx commented on August 16, 2024

yes but Perfect for proxies saving you latency and connection sockets

from coin-hive-stratum.

procloud avatar procloud commented on August 16, 2024

i did notice that xmrig proxy claims 100k miners at ~350 connects to pool, which is about 285 miners per pool connect. you may be able to look through that projects code to see how they are distributing this algo.

from coin-hive-stratum.

sunk818 avatar sunk818 commented on August 16, 2024

Does it make sense to allocate TCP sockets for specific roles? One TCP socket for authorization & hash submission. Another TCP socket for new difficulty and new block announcements? If either socket exceeds the messages/second threshold, then create another socket...

from coin-hive-stratum.

cazala avatar cazala commented on August 16, 2024

This can be configured now with maxMinersPerConnection (programatically) or --max-miners-per-connection (cli)

from coin-hive-stratum.

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.