lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.71k stars 2.09k forks source link

Unclear state of clustering feature in documentation #6887

Open gcool-info opened 2 years ago

gcool-info commented 2 years ago

Background

Hey there - I'd like to ask if clustering is considered "mainnet-ready"? I find the docs a bit confusing on the topic. In https://github.com/lightningnetwork/lnd/blob/master/docs/etcd.md, it's stated that:

... It is therefore highly recommended to not use LND on etcd in any kind of production environment especially not on bitcoin mainnet.

However, in https://github.com/lightningnetwork/lnd/blob/master/docs/leader_election.md, there's no warning about using this feature.

Could you help clarify, please?

alexbosworth commented 2 years ago

There are two types of etcd, one is for all of the data in lnd and the other is just for leader election

gcool-info commented 2 years ago

Great, thanks. So, just to make sure:

This example config in leader_election.md, will set etcd only for the leader election or also for the data?

alexbosworth commented 2 years ago

You can configure your db backend to use postgres for example, there are separated options

alexbosworth commented 2 years ago

At least I think that's how it works, I'm not 100% sure

gcool-info commented 2 years ago

I think you're right.

Running with --db.backend=etcd produces:

2022-09-05 17:24:07.153 [INF] LTND: Using remote etcd database! Creating graph and channel state DB instances

Running with --db.backend=bolt produces:

2022-09-05 17:22:08.921 [INF] LTND: Opening bbolt database, sync_freelist=false, auto_compact=false

Maybe it's worth updating leader_election.md, to warn people that using --db.backend=etcd is not "mainnet-ready" and should therefore use --db.backend=bolt?