Oddbean new post about | logout
 You are offering relay hosting so I guess you might be well informed overall ...
Is there a relay already where I can provide metered read access? My dream is a relay where I open the websocket with some e-cash attached and that socket then serves queries until the funds run out, no questions asked. This should be the most DOS secure way of doing things. 
 With that existing, I would be curious to get involved in providing a big relay. 
 Curious, what would you meter? Would you base it on events? Bandwidth? 
 probably # of reqs/subscriptions 
 Anything that  costs real resources. And make it dynamic. So:

* RAM seconds
* CPU seconds
* bandwidth
* HDD MB hours
* ...

With surge pricing during DOS attacks.

The idea is to make the relay pay for itself so the operator can scale it up without fear of increased cost. 
 My idea of an ideal client-server interaction is that the server commits to a certain price for the next hour and the client sends ecash for the expected use, maybe 5min at a time. And the client should know the user's preferences, so if the price surges, the user gets asked to confirm this or to delay the use of this relay accordingly, with the client handling delays gracefully. 
 for strfry specifically, it can "log" the performance metrics but this does not easily equate to being able to measure them from external systems unless you were to ingest the logs and turn them into metrics.  That being said, you could ingest process metrics, disk metrics etc, and use this.  Right now the focus is to use the data currently accessible via the interceptor-proxy such as #REQs/second, #subscriptions and #events, use that to surface the information about how much a particular login/pubkey is 'using' vs other usages, display that to the relay operator so they can make a decision about allowing or blocking.  once this is done, then i can think about cost tiers or etc.. 
 an interesting idea, yeah.. i will keep this in mind as im filling out the NIP42 auth stuff.. still very early on that but I've got auth working with strfry now and one-time-pay to read, so in theory it could be done. 
 Can this issue be closed? https://github.com/hoytech/strfry/issues/47

This is what I want: https://github.com/hoytech/strfry/issues/17 
 I've had to implement NIP-42 auth separate from strfry, it can actually layer on top of any relay implementation.  I am currently filling it out to match basic use cases like private inbox style relays, and also more general use like groups and basic REQ rate limiting of the websockets themselves.  So, I don't think it can be closed.  Thanks for the links I'm reading them over.

https://github.com/relaytools/interceptor-proxy