Comments (6)
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.
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.
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.
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.
* 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.
Update in #47: expecting NIP-42 PR to be submitted by end of August
from strfry.
Related Issues (20)
- Dockerfile build fails HOT 1
- MDB_MAP_FULL: Environment mapsize limit reached HOT 5
- Work to change database HOT 2
- NWC events are no longer sent HOT 1
- Crash: page allocation failure HOT 2
- Ubuntu docker build is broken HOT 2
- A question regarding the sync command HOT 2
- Up-to-date docker image in dockerhub HOT 1
- Cron deletes events that are not expired HOT 1
- Importing events from another relay using .jsonl import HOT 4
- Feature: retention period HOT 5
- Feature request: NIP-45 Event Count HOT 6
- Build Error HOT 6
- Favicon for relay HOT 1
- Cryptic error messages returned in OK messages HOT 1
- logging controls not documented/working
- docker-compose not working HOT 4
- REQ limit is too low HOT 1
- strify crashes on start HOT 2
- OSX build error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strfry.