Code Monkey home page Code Monkey logo

Comments (6)

hoytech avatar hoytech commented on June 19, 2024 1

Hey thanks for keeping this issue alive! I still do think it's important, and am trying to consider the best way to do this.

  • AUTH will be useful for a variety of reasons, so it is a feature that can be implemented independently.
  • Resource tracking is a bit more complicated. It already does track bytes up/down and query times, but associating those with AUTHed pubkeys and storing their aggregate sounds more challenging.

from strfry.

hoytech avatar hoytech commented on June 19, 2024

There are some really neat ideas here!

I think we should implement optional AUTH, although I haven't deciedd how the APIs ought to work for this.

The resource tracking is quite an intriguing concept too, I hadn't considered that. Theoretically it could be partially done now by turning on the debug logging -- it logs the microseconds consumed for each query. Also, on disconnect, the total bytes transferred up/down for a connection is logged also. But to do this in production we'd want better hooks for this.

My instinct for the user tiers is that this should be done outside of the core relay, since the policies would likely be highly specific to a given operator.

from strfry.

Giszmo avatar Giszmo commented on June 19, 2024

I think long term operators will have to measure resource use as not doing so will open them up to DOS attacks. If they don't account well for memory use, attackers will design memory-heavy queries etc. So I think in the end, CPU time, memory us (keeping big queries in RAM for hours on end is not free), disk use, bandwidth use at least need to be measured. To tally them up towards the respective users also will be necessary for all operators to detect abuse.

Policies - who gets to use which amount of resources - of course might vary but I suspect relays will converge to some incentive alignment which will be specific to each implementation and server resources but the operator should not have to fine-tune all the tiniest details to run the relay.

from strfry.

Giszmo avatar Giszmo commented on June 19, 2024

Sorry for bumping the issue. Strfry appears to be the best relay right now and I want to go forward with running it but I really see little use without tracking some resource usage and ideally charging for it so it can scale. A relay that works well will get users until it doesn't work well anymore unless one can keep up with the demand and that requires compensation and starting more servers. strfry is good for replication and thus for load balancing but I need some of the above features.

I hereby bump the bounty to $1k and invite anyone to reach out to discuss details or contract work on this.

from strfry.

Giszmo avatar Giszmo commented on June 19, 2024
* Resource tracking is a bit more complicated. It already does track bytes up/down and query times, but associating those with AUTHed pubkeys and storing their aggregate sounds more challenging.

strfry is being praised as the most performant relay by far but by my estimate, even if you would lose 50% of the performance, it would be worth it to be able to associate load with paying customers. If the challenge is to not hit the performance, I would be happy with a hit and award the bounty as nothing is free. I understand though that you wouldn't hack something for my special need if the burden was then carried by all others that don't want that feature.

from strfry.

tannerdsilva avatar tannerdsilva commented on June 19, 2024

Update in #47: expecting NIP-42 PR to be submitted by end of August

from strfry.

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.