CDK currently supports LDK through an in-process ldk-node backend. This gives operators a simple deployment model: run one cdk-mintd binary and get both the mint and Lightning node.
The downside is that CDK also owns more Lightning node operational surface than it does for other backends. For example, CDK has had to maintain its own LDK node dashboard and manage the node lifecycle inside the mint process.
ldk-server now provides an ldk-node based daemon with a gRPC API. This would make LDK work more like CDK's CLN, LND, and external payment processor integrations: the mint connects to a separate Lightning service.
This raises the question: what should CDK's long-term LDK support look like?
Options
1. Keep only the current embedded ldk-node backend
Pros:
- one binary for operators
- simple local development and testing
Cons:
- CDK keeps maintaining node management UI and lifecycle code
- mint upgrades stop the Lightning node
- can not run multiple mint instances against one node
2. Support both embedded ldk-node and ldk-server
Pros:
- preserves the simple single-binary option
- adds a service-separated option for production deployments
- gives CDK time to evaluate
ldk-server as it matures
Cons:
- two LDK backends to maintain
- more docs, config, tests, and support complexity
3. Add ldk-server support and eventually remove embedded ldk-node
Pros:
- aligns LDK with CDK's other Lightning backends
- removes CDK's need to maintain an LDK dashboard
- separates mint and node lifecycles
- enables multiple mint instances to share one Lightning node
Cons:
- removes the current one-binary deployment model
- may be premature while
ldk-server APIs are still stabilizing
Open questions
- Should
ldk-server be an optional backend, a future replacement, or out of scope for now?
- If both are supported, which should CDK recommend for production?
- Should CDK keep maintaining the embedded LDK dashboard long term?
Possible conservative path
Add ldk-server as an experimental backend while keeping embedded ldk-node. Once ldk-server is more mature and CDK has integration experience, revisit whether the embedded backend and dashboard should be deprecated.
My current preference
I am leaning toward adding ldk-server support and removing support for the integrated ldk-node backend over time.
The main reason is that it removes the need for CDK to maintain a CDK-specific Lightning node dashboard. If ldk-server becomes the LDK deployment target, CDK can lean on LDK-native tools and other operational tooling instead of owning that surface itself.
I also think separating the mint and Lightning node is the better model at scale. It allows the mint layer to be horizontally scaled while sharing one underlying node, and it keeps the mint and Lightning node as separate services with separate lifecycles. They are distinct pieces of infrastructure, and treating them that way seems like the cleaner long-term architecture.
Already a PR adding support for it here: #2164
CDK currently supports LDK through an in-process
ldk-nodebackend. This gives operators a simple deployment model: run onecdk-mintdbinary and get both the mint and Lightning node.The downside is that CDK also owns more Lightning node operational surface than it does for other backends. For example, CDK has had to maintain its own LDK node dashboard and manage the node lifecycle inside the mint process.
ldk-servernow provides anldk-nodebased daemon with a gRPC API. This would make LDK work more like CDK's CLN, LND, and external payment processor integrations: the mint connects to a separate Lightning service.This raises the question: what should CDK's long-term LDK support look like?
Options
1. Keep only the current embedded
ldk-nodebackendPros:
Cons:
2. Support both embedded
ldk-nodeandldk-serverPros:
ldk-serveras it maturesCons:
3. Add
ldk-serversupport and eventually remove embeddedldk-nodePros:
Cons:
ldk-serverAPIs are still stabilizingOpen questions
ldk-serverbe an optional backend, a future replacement, or out of scope for now?Possible conservative path
Add
ldk-serveras an experimental backend while keeping embeddedldk-node. Onceldk-serveris more mature and CDK has integration experience, revisit whether the embedded backend and dashboard should be deprecated.My current preference
I am leaning toward adding
ldk-serversupport and removing support for the integratedldk-nodebackend over time.The main reason is that it removes the need for CDK to maintain a CDK-specific Lightning node dashboard. If
ldk-serverbecomes the LDK deployment target, CDK can lean on LDK-native tools and other operational tooling instead of owning that surface itself.I also think separating the mint and Lightning node is the better model at scale. It allows the mint layer to be horizontally scaled while sharing one underlying node, and it keeps the mint and Lightning node as separate services with separate lifecycles. They are distinct pieces of infrastructure, and treating them that way seems like the cleaner long-term architecture.
Already a PR adding support for it here: #2164