aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/redundancy.md
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-24 13:07:33 +0200
committerChocobozzz <me@florianbigard.com>2018-09-24 13:38:39 +0200
commite5565833f62b97f62ea75eba5b479963ae78b873 (patch)
tree835793ce464f9666b0ceae79f3d278cc4e007b32 /support/doc/redundancy.md
parentd1a63fc7ac58a1db00d8ca4f43aadba02eb9b084 (diff)
downloadPeerTube-e5565833f62b97f62ea75eba5b479963ae78b873.tar.gz
PeerTube-e5565833f62b97f62ea75eba5b479963ae78b873.tar.zst
PeerTube-e5565833f62b97f62ea75eba5b479963ae78b873.zip
Improve redundancy: add 'min_lifetime' configuration
Diffstat (limited to 'support/doc/redundancy.md')
-rw-r--r--support/doc/redundancy.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/support/doc/redundancy.md b/support/doc/redundancy.md
new file mode 100644
index 000000000..62c6365a9
--- /dev/null
+++ b/support/doc/redundancy.md
@@ -0,0 +1,46 @@
1# Redundancy
2
3A PeerTube instance can cache other PeerTube videos to improve bandwidth of popular videos or small instances.
4
5## How it works
6
7The instance administrator can choose between multiple redundancy strategies (cache trending videos or recently uploaded videos etc), set their maximum size and the minimum duplication lifetime.
8Then, they choose the instances they want to cache in `Manage follows -> Following` admin table.
9
10Videos are kept in the cache for at least `min_lifetime`, and then evicted when the cache is full.
11
12When PeerTube chooses a video to duplicate, it imports all the resolution files (to avoid consistency issues) using their magnet URI and put them in the `storage.videos` directory.
13Then it sends a `Create -> CacheFile` ActivityPub message to other federated instances. This new instance is injected as [WebSeed](https://github.com/Chocobozzz/PeerTube/blob/develop/FAQ.md#what-is-webseed) in the magnet URI by instances that received this ActivityPub message.
14
15## Stats
16
17See the `/api/v1/server/stats` endpoint. For example:
18
19```
20{
21 ...
22 "videosRedundancy": [
23 {
24 "totalUsed": 0,
25 "totalVideos": 0,
26 "totalVideoFiles": 0,
27 "strategy": "most-views",
28 "totalSize": 104857600
29 },
30 {
31 "totalUsed": 0,
32 "totalVideos": 0,
33 "totalVideoFiles": 0,
34 "strategy": "trending",
35 "totalSize": 104857600
36 },
37 {
38 "totalUsed": 0,
39 "totalVideos": 0,
40 "totalVideoFiles": 0,
41 "strategy": "recently-added",
42 "totalSize": 104857600
43 }
44 ]
45}
46``` \ No newline at end of file