a1696a81b6
There is a need to limit disk space used by write-cache. It is almost impossible to calculate the value exactly. It is proposed to estimate the size of the cache by the number of objects stored in it. Track amounts of objects saved in DB and FSTree separately. To do this, `ObjectCounters` interface is defined. It is generalized to a store of numbers that can be made persistent (new option `WithObjectCounters`). By default DB number is calculated as key number in default bucket, and FS number is set same to DB since it is currently hard to read the actual value from `FSTree` instance. Each PUT/DELETE operation to DB or FS increases/decreases corresponding counter. Before each PUT op an overflow check is performed with the following formula for evaluating the occupied space: `NumDB * MaxDBSize + NumFS * MaxFSSize`. If next PUT can cause write-cache overflow, object is written to the main storage. By default maximum write-cache size is set to 1GB. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru> |
||
---|---|---|
.docker | ||
.github | ||
cmd | ||
config | ||
docs | ||
misc | ||
pkg | ||
.dockerignore | ||
.gitattributes | ||
.gitignore | ||
.golangci.yml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
CREDITS.md | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md |
NeoFS is a decentralized distributed object storage integrated with the NEO Blockchain.
Overview
NeoFS Nodes are organized in peer-to-peer network that takes care of storing and distributing user's data. Any Neo user may participate in the network and get paid for providing storage resources to other users or store his data in NeoFS and pay a competitive price for it.
Users can reliably store object data in the NeoFS network and have a transparent data placement process due to decentralized architecture and flexible storage policies. Each node is responsible for executing the storage policies that the users select for geographical location, reliability level, number of nodes, type of disks, capacity, etc. Thus, NeoFS gives full control over data to users.
Deep Neo Blockchain integration allows NeoFS to be used by dApp directly from NeoVM on the Smart Contract code level. This way dApps are not limited to on-chain storage and can manipulate large amounts of data without paying a prohibitive price.
NeoFS has native gRPC API and popular protocol gates such as AWS S3, HTTP, FUSE and sFTP allowing developers to easily integrate applications without rewriting their code.
Supported platforms
For now we only support GNU/Linux on amd64 CPUs with AVX/AVX2 instructions. More platforms will be officially supported after '1.0' release.
Latest version of neofs-node works with neofs-contract v0.9.0.
Contributing
Feel free to contribute to this project after reading the contributing guidelines.
Before starting to work on a certain topic, create a new issue first, describing the feature/topic you are going to implement.
Credits
NeoFS is maintained by NeoSPCC with the help and contributions from community members.
Please see CREDITS for details.