Working on a load balancer/middleware service for lightning nodes that can handle failovers, caching and rate limiting to protect your production nodes.

Currently only supports LND but will be adding CLN support as well. Very much work in progress.

Will be using it for nodeless but anyone else is welcome to it under MIT license.

https://github.com/nodeless-io/node-cluster

Reply to this note

Please Login to reply.

Discussion

What sort of things would be cached?

Invoice state, so if your clients are polling invoice status they don't hit the node directly, node only populates the cache internally, and caches which invoices are from which node

I assume that's a pretty quick cache invalidation time? How will you determine that timing? User Configurable?

Yes very short, only a few seconds that the cluster owner can configure. But it disconnects the client from the node, so no matter what the end-user tries they can only ever read from the cache, and populating the cache happens based on internal logic.

It should make API calls way faster to get a response but the data is sometimes stale and make the load on the nodes more consistent and predictable.

🫡

Brave man for working on a caching service.

highly interested in a load balancer. that would be fantastic.