IntersectMBO / IntersectMBO/ouroboros-consensus
Verify and document per-connection resource requirements
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
Resources, e.g., open file handles or cached index files, should be per-client as opposed to global/shared, as it will make it easier to estimate how many resources we will need in practice. The goal is to reject new clients instead of running out of resources while trying to serve a new client. Another guiding principle: the worst case should be as good as the average case.
Document how many resources a client needs:
* The BlockFetchServer will use an ImmutableDB iterator, which will need a file handle for the epoch file.
* Same for the ChainSyncServer.
We can still have some bounded shared resources to optimise things.
Besides documenting the upper bound of resources each server will need, we should also verify this. We can use the `ResourceRegistry` for this: create a `ResourceRegistry` for each server (or, with support from the network, one registry per client), and limit the number of resources it can acquire at the same time.
Contributor guide
Assessment
This issue has not been assessed yet.