[Metric] HTLC Response Time
date
Nov 20, 2021
slug
htlc-response-time
status
Published
tags
Metrics
Liquidity Scan
summary
What does it measure?
type
Post
HTLC Response Time is a measure of the time it takes to respond to a newly offered HTLC (payment attempt) by a peer. To send a payment, Lightning clients send several payment attempts one after the other to find a working route to the payment receiver. Lower response times reduce the time for a successful payment significantly and are especially important for selecting your direct peers.
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2F051879a4-e5c6-48ce-af8e-21eeed2a85f2%2Fd7c5121c-a132-4ae3-951a-f4fa8a388250%2FCleanShot_2021-11-20_at_10.20.042x.png%3Ftable%3Dblock%26id%3D44a2f749-5051-4365-9fb9-563f96e24a63%26spaceId%3D051879a4-e5c6-48ce-af8e-21eeed2a85f2%26expirationTimestamp%3D1725840000000%26signature%3Dif-jC16FsjCqaT1rVwWcaorlfVuIZduEaWP26NcisdA?table=block&id=44a2f749-5051-4365-9fb9-563f96e24a63&cache=v2)
Contributing Factors
The HTLC response time depends on 3 factors:
- Hardware/software of the node.
- Hardware/software of the peer.
- The connection between them.
The response time can therefore vary widely for the same node depending on its peer. Especially TOR nodes can see high response times even though both nodes have great hardware.
Average Channel Response Time
Average channel response time is the average time it takes to forward a payment attempt from the node to one of its peer.
Node Response Time
Due to the fact that the average channel response time is also a function of the nodes peers, it is not a good measure of the nodes response time itself. Therefore, LnRouter uses an average of the best 33% channel response times to approximate the nodes response time.
This response time is close to the response time you get if you open a direct channel to the node with great hardware and good connection.
Measurement
LnRouter measures the response time of several channels during a liquidity scan. At least 10 channels with inbound liquidity are required to make a successful measurement.