Backpressure mechanism overview
What is the backpressure mechanism?

It is a simple backpressure mechanism that is applicable to notaries and nodes above minimum platform version 4. Using a configured retry threshold we compare the measured throughput and determine if the request is going to take more than that, which if true - we respond with a backpressure message.
How is the retry time calculated?

By inspecting the amount of states in the request queue and comparing that to the throughput measured in states per minute, the number of seconds until a new request can be processed is calculated.
Why is there a backpressure mechanism?

Like any other form of backpressure, it is to prevent queuing redundant requests by retrying requests before the expected time of handling the original request. Queuing additional redundant requests creates unnecessary work for the notary service using up resources for processing these redundant requests that could otherwise be used for new requests. Retrying the requests too eagerly prevents the notary from running at peak throughput.
What happens if I just invoke FinalityFlow again after getting told to wait?

If a Corda node is told to wait, its state machine will handle the wait and nothing will be visible to the CorDapp. Even if a client runs a modified Corda node he’ll get cut off by the ETA once again and hardly see any benefit. While the ETA can hardly be accurate, it is a close approximation of the time when response will arrive. The backpressure mechanism is in place to maximize the throughput of the notary service assuming clients wait before retrying their requests as intended.
How can I configure backpressure threshold?

In the notary config - notaryConfig.etaMessageThresholdSeconds
.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.