bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 52쪽 중 34쪽
nt queries the indexer using a CID or multihash, the indexer then responds to the client with the provider data record, which tells the client where and how the content can be retrieved.
As a storage provider, you will need to run an indexer in your setup so that your clients know where and how to retrieve data. For more information on how to create an index provider, see the [IPNI documentation](https://github.com/ipni/storetheindex/blob/main/doc/creating-an-index-provider.md).
[Was this page helpful?](https://airtable.com/apppq4inOe4gmSSlk/pagoZHC2i1iqgphgl/form?prefill_Page+URL=https://docs.filecoin.io/storage-providers/architecture/network-indexer)
# Infrastructure
Hardware, networking, and disaster recovery planning for storage provider infrastructure.
This section covers the physical and network infrastructure needed to operate a storage provider, including storage systems, networking, and recovery planning.
## Table of contents
* [Storage](/provide-storage/infrastructure/storage) — RAID configurations, I/O behavior, and disk performance for sealed sectors
* [Network](/provide-storage/infrastructure/network) — bandwidth requirements, VLANs, redundancy, and network topologies
* [Backup and disaster recovery](/provide-storage/infrastructure/backup-and-disaster-recovery) — strategies to protect data and ensure business continuity
* [Reference architectures](/provide-storage/infrastructure/reference-architectures) — example infrastructure designs for different scales
[Was this page helpful?](https://airtable.com/apppq4inOe4gmSSlk/pagoZHC2i1iqgphgl/form?prefill_Page+URL=https://docs.filecoin.io/storage-providers/infrastructure)
# Storage
This page covers RAID configurations, performance implications and availability, I/O behavior for sealed and unsealed sectors, and read/write performance considerations.
## RAID configurations
Storage systems use RAID for protection against data corruption and data loss. Since cost is an important aspect for storage providers, and you are dealing with cold storage mostly, you will be opting for SATA disks is RAID configurations that favor capacity (and read performance). This leads to RAID5, RAID6, RAIDZ and RAIDZ2. Double parity configurations like RAID6 and RAIDZ2 are preferred.
The *width of a volume* is defined by how many spindles (SATA disks) there are in a RAID group. Typical configurations range between 10+2 and 13+2 disks in a group (in a VDEV in the case of ZFS).
## RAID implications
Although RAIDZ2 provides high fault tolerance, configuring wide VDEVs also has an impact on performance and availability. ZFS performs an automatic healing task called *scrubbing* which performs a checksum validation over the data and recovers from data corruption. This task is I/O intensive and might get in the way of other tasks that should get priority, like *storage proving* of sealed sectors.
Another implication of large RAID sets that gets aggravated with very large capacity per disk is the time it takes to rebuild. Rebuilding is the I/O intensive process that takes place when a disk in a RAID group is replaced (typically after a disk failed). If you choose to configure very wide VDEVs while using very large spindles (20TB+) you might experience very long rebuild times which again get in the way of high priority tasks like storage proving.
It is possible though to configure wider VDEVs (RAID groups) for the unsealed sectors. Physically separating sealed and unsealed copies has other advantages, which are explained in [Custom Storage Layout](https://lotus.filecoin.io/storage-providers/operate/custom-storage-layout/).
## I/O Behavior
Storage providers keep copies of sealed sectors and unsealed sectors (for fast retrieval) on their storage systems. However the I/O behavior on sealed sectors is very different from the I/O behavior on unsealed sectors. When [storage proving](/provide-storage/filecoin-economics/storage-proving) happens only a very small portion of the data is read by WindowPoSt. A large storage provider will have many sectors in multiple partitions for which WindowPoSt requires fast access to the disks. This is unusual I/O behavior for any storage system.
The unsealed copies are used for fast retrieval of the data towards the customer. Large datasets in chunks of 32 GiB (or 64 GiB depending on the configured sector size) are read.
In order to avoid different tasks competing for read I/O on disk it is recommended to create separate disk pools with their own VDEVs (when using ZFS) for sealed and unsealed copies.
## Write performance
Write access towards the storage also requires your attention. Depending how your storage array is connected (SAS or Ethernet) you will have different transfer speeds towards the sealed storage path. At a sealing capacity of 6 TiB/day you will effectively be writing 12 TiB/day towards the storage (6 TiB sealed, 6 TiB unsealed copies). Both your storage layout and your network need to be able to handle this.
If this 12 TiB were equally spread across the 24 hrs of a day, this would already require 1.14 Gbps.
> 12 TiB *1024 / 24 hr / 3600 sec* 8 = 1.14 Gbps
The sealing pipeline produces 32 GiB sectors (64 GiB depending on your configured sector size) which are written to the storage. If you configured *batching* of the commit messages (to reduce total gas fees) then you will write multiple sectors towards disk at once.
A minimum network bandwidth of 10 Gbps is recommended and write cache at the storage layer will be beneficial too.
## Read performance
Read performance is optimal when choosing for RAIDZ2 VDEVs of 10 to 15 disks. RAID-sets using parity like RAIDZ and RAIDZ2 will employ all spindles for read operations. This means read throughput is a lot better compared to reading from a single or a few spindles.
There are 2 types of read operations that are important in the context of Filecoin:
* random read I/O:
When storage proving happens, a small portion of a sector is read for proving.
* sequential read I/O:
When retrievals happens, entire sectors are read from disk and streamed towards the customer via Boost.
[Was this page helpful?](https://airtable.com/apppq4inOe4gmSSlk/pagoZHC2i1iqgphgl/form?prefill_Page+URL=https://docs.filecoin.io/storage-providers/infrastructure/storage)
# Network
This page covers topics related to internet bandwidth requirements, LAN bandwidth considerations, the use of VLANs for network traffic separation, network redundancy measures, and common topologies.
## Internet bandwidth
The amount of internet bandwidth required for a network largely depends on the size of the organization and customer expectations. A bandwidth between 1 Gbps and 10 Gbps is generally sufficient for most organizations, but the specific requirements should be determined based on the expected traffic. Workloads with high-throughput retrieval services may require 10 Gbps or more.
## LAN bandwidth
The bandwidth between different components of a network is also important, especially when transferring data between servers. The internal connectivity between servers should be at least 10 Gbps to ensure that planned sealing capacity is not limited by network performance. It is important to ensure that the servers and switches are capable of delivering the required throughput, and that firewalls are not the bottleneck for this throughput.
## VLANs
Virtual Local Area Networks (VLANs) are commonly used to separate network traffic and enhance security. However, if firewall rules are implemented between VLANs, the firewall can become the bottleneck. To prevent this, it is recommended to keep all sealing workers, Lotus miners, and storage systems in the same VLAN. This allows for data access and transfer without involving routing and firewalls, thus improving network performance.
## Redundancy
Network redundancy is crucial to prevent downtime and ensure uninterrupted operations. By implementing redundancy, individual networking components can fail without disrupting the entire network. Common industry standards for network redundancy include NIC (network interface card) bonding, LACP (Link Aggregation Control Protocol), or MCLAG (Multi-Chassis Link Aggregation Group).
## Common topologies
Depending on the size of the network, different network topologies may be used to optimize performance and scalability. For larger networks, a spine-leaf architecture may be used, while smaller networks may use a simple two-tier architecture.
Spine-leaf architectures provide predictable latency and linear scalability by having multiple L2 leaf switches that connect to the spine switches. On the other hand, smaller networks can be set up with redundant L3 switches or a collapsed spine/leaf design that connect to redundant routers/firewalls.
It is important to determine the appropriate topology based on the specific needs of the organization.
[Was this page helpful?](https://airtable.com/apppq4inOe4gmSSlk/pagoZHC2i1iqgphgl/form?prefill_Page+URL=https://docs.filecoin.io/storage-providers/infrastructure/network)
# Backup and disaster recovery
This page covers the basics of backups and disaster recovery for storage providers. A backup strategy is only as good as the last successful restore.
It is crucial to have a backup of any production system. It is even more crucial to be able to restore from that backup. These concepts are vital to a Filecoin storage provider because not only are you storing customer data for which you have (on-chain) contracts, you have also pledged a large amount of collateral for that data.
If you are unable to restore your Lotus miner and start proving your storage on-chain, you risk losing a lot of money. If you are unable to come back online in 6 weeks, you are losing **all** of your collateral, which will most likely lead to bankruptcy.
As such it matters less what kind of backup you have, as long as you are able to restore from it fast.
## High availability (HA) versus Disaster recovery (DR)
It is a common misconception to assume you are covered against any type of failure by implementing a highly available (HA) setup. HA will protect against unplanned unavailability in many cases, such as a system failure. It will **not** protect you against data corruption, data loss, ransomware, or a complete disaster at the datacenter level.
Backups and (tested) restores are the basis for a DR (disaster recovery) plan and should be a major point of attention for any Filecoin storage provider, regardless of your size of operation.
## Recovery Time Objective (RTO) and Recovery Point Objective
When planning for backup and recovery, the terms RPO and RTO are important concepts to know about.
* **Recovery Time Objective (RTO)** is the time taken to recover a certain application or dataset in the event of a failure. Fast recovery means a shorter RTO (typically measured in hours/minutes/seconds). Enterprises plan for very short RTOs when downtime is not acceptable to their business. Application and file system snapshots typically provide the lowest possible RTO.
* **Recovery Point Objective (RPO)** is the last known working backup from which you can recover. A shorter RPO means the time between the last backup and the failure is short. Enterprises plan for very short RPOs for systems and data that changes very often (like databases). Synchronous replication of systems and data typically provides the lowest possible RPO.
### RPO/RTO for storage providers
Although ‘RPO zero’ and ‘RTO zero’ are the ideal, in practice it is rarely economical. DR planning requires compromises and if you are a storage provider you need to consider cost versus RPO.
RTO is typically less concerning for storage providers. The most critical parts to recover are your sealed storage and your wallets. Wallet addresses typically do not change, so the only thing to worry about is your sealed storage. With storage level snapshots (such as ZFS snapshots), you can reduce your RTO to almost zero.
For RPO, although synchronous replication, together with snapshots, can reduce RPO to nearly zero, that is not a cost-efficient solution. Asynchronous replication of sealed storage is the most viable option if you are running at small-to-medium scale. Once you grow beyond 10PB of storage, even replicating the data will become an expensive solution.
In such cases you might want to look into *storage cluster* solutions with built-in redundancy. Very large storage providers will operate [Ceph clusters](https://en.wikipedia.org/wiki/Ceph_\(software\)) or other solutions with built-in *erasure coding*. Although this does more become more like a HA setup than a DR setup, at scale, it becomes the only economically viable option.
Running a storage cluster comes with its own operational challenges though, which does not make this a good fit for small-to-medium setups.
### RPO/RTO for customers
Both storage providers and data owners (customers) should look at RPO and RTO options. As a customer, you can achieve HA/DR by having multiple copies of your data stored (and proven) across multiple storage providers. In the event of data loss at one provider, other providers will hold a copy of your data from which you can retrieve. As a customer, you choose how much redundancy you need, by doing storage deals with more providers.
RTO for data owners is a matter of how fast the storage provider(s) can provide you the data.
* Do your storage providers offer “fast retrieval” of the data through unsealed copies? If not, the unsealing process (typically multiple hours) must be calculated into the RTO.
* Do your storage providers offer dedicated retrieval infrastructure or caching for ultra-fast retrieval?
* Do your storage providers pin your data on IPFS, in addition to storing it on Filecoin?
RPO for data owners is less of a concern, especially once the data is sealed. The Filecoin blockchain will enforce availability and durability of the data being stored, once it is sealed. It is therefore important, as a data owner, to know how fast your storage provider can prove the data on-chain.
## Backup techniques
* A first level of protection comes from ZFS (if you are using ZFS as the file system for your storage). Having ZFS snapshots available protects you against data loss caused by human error or tech failure, and potentially even against ransomware. Other file systems typically also have a way to make snapshots, albeit not as efficiently as ZFS.
* A second level of defense comes from a dedicated backup system. Not only should you have backup storage (on a different storage array than the original data), you also need to have a backup server that can at a minimum run the Lotus daemon, Lotus miner and 1 WindowPoSt worker (note: this requires a GPU). With that you can sync the chain, offer retrievals and prove your storage on-chain, from your backup system, whilst you bring your primary back online.
* An alternative technique to having a dedicated backup system and copy is to have a storage cluster. This still requires a backup system to run the Lotus daemon, Lotus miner and PoST worker on. Implementing a storage cluster is usually only done for large-scale deployments as it comes with additional operational tasks.
For maximum resilience, you could host your backup system (server + storage) in a different datacenter than your primary system.
## DR failover techniques
One way to prepare for an easy failover of the software components in the event of a failure is to configure floating IP addresses. Instead of pinning lotus daemon and lotus-miner to the host IP address of the server they are running on, you can configure a secondary IP address and pin the daemon to its own IP, and lotus-miner to yet another IP.
This helps to reduce the amount of manual tasks for a failover drastically. If the recovered daemon or miner instance changes IP address it requires quite a lot of reconfiguration in various places.
Having the services on a floating IP allows to assign this IP to another machine and start the service on it.
## No Penalty for Recovered Faults
Note that as of [FIP006: No repay debt requirement for DeclareFaultsRecovered](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0006.md), storage providers are no longer required to pay [fee debt](/provide-storage/filecoin-economics/slashing) prior to recovering a new storage fault. This enables a storage provider that currently has accrued fee debt to recover faults without being further penalized with additional fees.
[Was this page helpful?](https://airtable.com/apppq4inOe4gmSSlk/pagoZHC2i1iqgphgl/form?prefill_Page+URL=https://docs.filecoin.io/storage-providers/infrastructure/backup-and-disaster-recovery)
# Reference architectures
This page contains some reference architectures that storage providers can use to build out their infrastructure.
## 1 PiB raw architecture
<figure><img src="https://3376433986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxNWFG7bQkjLkl5BBGjbD%2Fuploads%2Fgit-blob-97e474db6cd249151ddb4ac07715b19b53092247%2Fstorage-provider-infrastructure-reference-architectures-1PIB.png?alt=media" alt=""><figcaption><p>1 PiB raw reference architecture.</p></figcaption></figure>
The following reference architecture is designed for 1 PiB of raw sectors or raw data to be stored. Let’s discuss the various design choices of this architecture.
### Virtual machines
* 32 CPU Cores
* 512 GB RAM
* 8x 2 TB SSD storage
* 2x 10 GbE ethernet NICs
Lotus daemon and Boost run as Virtual Machines in this architecture. The advantages of virtualization are well-known, including easy reconfiguration of parameters (CPU, memory, disk) and portability. The daemon is not a very intensive process by itself, but must be available at all times. We recommend having a second daemon running as another VM or on backup infrastructure to which you can fail over.
Boost is a resource-intensive process, especially when deals are being ingested over the internet. It also feeds data payload of the deals into the Lotus miner.
We recommend 12-16 cores per VM and 128 GiB of memory. Lotus daemon and Boost need to run on fast storage (SSD or faster). The capacity requirements of Boost depend on the size of deals you are accepting as a storage provider. Its capacity must be sufficient to be landing space for deals until the data can be processed by your sealing cluster in the backend.
Both Lotus daemon and Boost require public internet connectivity. In the case of Boost you also need to consider bandwidth. Depending on the deal size you are accepting, you might require 1 Gbps or 10 Gbps internet bandwidth.
### Lotus miner
* 16 CPU Cores
* 256 GB RAM
* 2x 1TB SSD storage
* 2x 10 GbE ethernet NICs
Lotus miner becomes a less intensive process with dedicated PoST workers separated from it (as in this design). If you use a dedicated storage server or NAS system as the storage target for your sealed and unsealed sectors, Lotus miner eventually could also become a VM. This requires additional CPU and memory on the hypervisor host.
We opted for a standalone Lotus miner in this design and gave it 256 GiB of memory. This is because we operate ZFS at the storage layer, which requires a lot of memory for caching. Lotus miner has enough with 128 GiB of memory when you opt for a dedicated storage server or NAS system for your storage.
### SATA Storage
In this architecture we have attached storage shelves to the Lotus miner with 2.4 PiB of usable capacity. This is the capacity after the creation of a RAIDZ2 file system (double parity). We recommend vdevs of 12 disks wide. In RAIDZ2 this results in 10 data disks and 2 parity disks. Storage systems also don’t behave well at 100% used capacity, so we designed for 20% extra capacity.
### PoST workers
* 16 CPU Cores
* 128 GB RAM
* 2x 1TB SSD storage
* 1x GPU 10+ GB memory, 3500+ CUDA cores
* 2x 10 GbE ethernet NICs
We have split off the Winning PoST and Window PoS프로젝트로 돌아가기