# An ICN-Based IPFS High-Availability Architecture
## 3 Design Overview
### Enhanced Node Performance Analysis  
#### 3.2.1 Resolution Performance Analysis  
First we define that each retrieval behavior of the IPFS node is independent and that the underlying DHT resolution success rate is 1. Without considering the DHT mechanism, the protocol lab gives the resolution success rate of IPFS through the Bitswap mechanism as \(P_{Bitswap}\)[26]:  
\[P_{Bitswap}=\frac{\gamma*l*(1-\alpha)}{n} \tag{5}\]  
where \(n\) denotes the total number of nodes in the IPFS network, \(\gamma\) denotes the popularity of the data blocks retrieved by the IPFS node in the network, which is related to the number of replicas \(r\), while \(l\) denotes the number of peers of IPFS nodes, and \(\alpha\) denotes the degree of overlap of peer connections. From the above equation, we can see that in the case of a determined network size, the resolution success rate of the Bitswap mechanism is mainly affected by both the popularity of the retrieved content and the number of nodes in the peer list. However, the Protocol Lab analyzes the success rate formula for the Bitswap mechanism from the perspective of the whole network and does not give a detailed construction process for the above formula. Our architecture introduces the design of resolution domains, so we further analyze IPFS using a combinatorial model within a limited number of resolution domains. With Equation (5), it is clear that the success rate of information retrieval by the Bitswap mechanism within the public network, \(n\gg r\), \(n\gg l\), depends on the retrieval by the DHT. However, considering a limited organizational LAN or IPFS cluster environment, e.g., enterprises, neighborhoods, schools, etc., the retrieved data of users within these local networks may be highly repetitive. ICN networks can be divided into separate resolution domains and use ENRS to improve the sensitivity of IPFS nodes to data within the local network. Assume that there are \(n\) IPFS nodes in the IPFS network in the resolution domain and the number of replicas in the IPFS network is \(r\). All IPFSs store \(l\) peers through the Bitswap mechanism, and \(L_{max}\) is the capacity of the peer list for Bitswap in IPFS. Since in the real case, IPFS nodes may store nodes outside the resolution domain, there exists \(l\leq L_{max}\). Let \(B\) denote the event of a successful information retrieval by IPFS nodes in the resolution network through the Bitswap mechanism, whose probability is denoted as \(P_{B}\). \[P_{B}=1-P_{\overline{B}} \tag{6}\]  
where \(P_{\overline{B}}\) denotes the probability of a failure in information retrieval of the IPFS node through the Bitswap mechanism, and we can obtain \(P_{B}\) by calculating:  
\[P_{B}=1-\frac{C_{n-r}^{l}}{C_{n}^{l}}=1-\prod_{i=n-r+1}^{n}(1-\frac{l}{i}) \tag{7}\]  
From the above equation we find that \(P_{B}\) is related to the size of the IPFS network, the number of peers of Bitswap, and the number of replicas in the network. In turn, we analyze the resolution success rate of the enhanced node, which is set to \(P_{M}\). The resolution success rate of the enhanced node consists of the success probability of the two-part resolution mechanism. \[P_{M}=P_{E}+(1-P_{E})*P_{B} \tag{8}\]  
where \(P_{M}\) denotes the resolution success rate of the enhanced node under the hybrid resolution mechanism and \(P_{E}\) denotes the resolution success rate of the enhanced node through the ENRS system in the resolution domain, which can be expressed as follows:\[P_{E}=1-\prod_{i=n-r+1}^{n}(1-\frac{m}{i}) \tag{9}\]  
where \(m\) is denoted as the number of deployed enhanced nodes in the IPFS network. Thus, it is known that the resolution success rate of the enhanced nodes is related to the size of the IPFS network, the number of peers of Bitswap, the number of replicas in the network, and the number of enhanced nodes deployed in the network. In a limited local network, the number of replicas r in the network is critical to the success rate of IPFS information retrieval, and it a dynamic variable that is related to the interest of users in the network.