Add hosting guidelines
This commit is contained in:
1 parent
e66a52e648
commit
7c0dcfb08f
6 files changed
+158
-7
No files matched your search
@@ -0,0 +1 @@
|
||||
<svg width="100%" height="100%" viewBox="0 0 1240 1097" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="logo"><g id="arc"><path d="M1182.67,1082.21c-6.429,-1.18 -14.805,-3.632 -21.44,-6.276c-12.913,-5.145 -32.103,-15.268 -46.746,-24.659c-20.255,-12.99 -50.992,-36.477 -73.104,-55.863c-3.29,-2.885 -8.358,-7.301 -11.261,-9.814c-2.902,-2.513 -7.423,-6.55 -10.045,-8.971c-2.623,-2.422 -7.855,-7.232 -11.627,-10.689c-26.05,-23.878 -75.652,-73.851 -99.043,-99.785c-2.859,-3.17 -8.417,-9.257 -12.35,-13.527c-13.04,-14.153 -17.403,-19.275 -17.281,-20.287c0.108,-0.894 0.522,-0.961 6.64,-1.086l6.524,-0.132l1.778,1.561c0.978,0.858 4.794,4.995 8.481,9.192c6.44,7.331 10.539,11.791 18.405,20.028c2.004,2.098 5.976,6.39 8.828,9.537c11.619,12.822 48.028,49.61 63.062,63.717c3.736,3.506 9.54,8.95 12.895,12.097c37.558,35.222 80.989,69.119 111.932,87.361c16.318,9.62 23.214,12.884 36.934,17.485c11.114,3.726 16.434,4.781 24.08,4.774c5.264,-0.008 6.786,-0.187 10.09,-1.206c10.953,-3.377 17.234,-10.471 20.633,-23.301c3.796,-14.331 3.018,-31.528 -2.609,-57.678c-6.795,-31.578 -23.443,-77.615 -43.716,-120.892c-2.212,-4.72 -5.822,-12.445 -8.023,-17.165c-4.545,-9.747 -21.466,-43.465 -25.245,-50.305c-1.376,-2.491 -4.648,-8.499 -7.272,-13.351c-8.798,-16.272 -18.711,-33.913 -27.062,-48.159c-14.167,-24.167 -19.474,-33.054 -21.216,-35.523c-3.073,-4.358 -4.159,-6.82 -4.416,-10.013c-0.18,-2.246 -0.066,-3.026 0.516,-3.509c1.645,-1.365 1.636,-1.379 20.235,29.734c5.965,9.98 19.057,32.733 27.023,46.967c2.568,4.589 5.366,9.524 6.217,10.967c0.85,1.442 3.643,6.592 6.204,11.443c2.562,4.852 6.211,11.718 8.109,15.259c48.522,90.491 80.415,170.506 87.739,220.119c2.287,15.497 2.623,29.728 0.962,40.79c-0.837,5.582 -2.008,9.178 -4.793,14.723c-1.725,3.434 -2.859,4.925 -6.209,8.165c-7.078,6.846 -12.987,9.008 -24.392,8.928c-3.319,-0.024 -7.512,-0.313 -9.437,-0.656Z" style="fill:#626f70;"/><path d="M588.063,443.903c-0.708,-1.145 -1.96,-3.14 -2.782,-4.434c-0.823,-1.294 -3.534,-5.847 -6.026,-10.118c-7.15,-12.257 -21.519,-36.069 -22.399,-37.119c-0.439,-0.524 -2.126,-3.259 -3.749,-6.077l-2.951,-5.124l0.126,-15.818l0.126,-15.818l3.062,5.684c1.685,3.126 5.295,9.725 8.023,14.664c2.728,4.94 5.882,10.733 7.009,12.874c2.031,3.859 8.439,14.924 13.163,22.728c1.349,2.229 3.773,6.308 5.386,9.063c1.613,2.756 3.637,6.024 4.498,7.261c2.074,2.981 6.43,10.487 6.448,11.108c0.011,0.428 -7.269,11.69 -8.273,12.795c-0.202,0.223 -0.925,-0.496 -1.661,-1.669Z" style="fill:#626f70;"/><path d="M802.601,314.172c-1.073,-1.125 -4.059,-4.513 -6.635,-7.529c-2.577,-3.016 -7.088,-8.166 -10.026,-11.444c-2.937,-3.278 -9.652,-10.788 -14.923,-16.688c-18.819,-21.07 -29.091,-32.124 -51.383,-55.296c-16.983,-17.653 -51.487,-51.616 -56.828,-55.938c-1.043,-0.844 -4.982,-4.431 -8.753,-7.972c-3.771,-3.54 -10.698,-9.763 -15.393,-13.828c-4.695,-4.064 -10.487,-9.081 -12.871,-11.147c-4.014,-3.479 -14.043,-11.639 -25.04,-20.373c-24.496,-19.456 -56.664,-40.02 -74.187,-47.425c-24.39,-10.308 -40.852,-12.41 -52.363,-6.685c-7.905,3.931 -13.5,11.43 -16.311,21.861c-2.065,7.664 -2.75,26.237 -1.235,33.491c0.274,1.312 0.965,5.995 1.535,10.409c0.907,7.012 0.951,8.111 0.346,8.716c-0.744,0.743 -18.602,8.297 -19.587,8.285c-1.326,-0.016 -1.934,-1.092 -4.464,-7.899c-4.963,-13.35 -7.769,-22.212 -9.019,-28.493c-0.688,-3.452 -1.55,-7.349 -1.915,-8.66c-0.634,-2.273 -2.261,-13.101 -3.115,-20.742c-0.22,-1.967 -0.429,-8.726 -0.464,-15.02c-0.057,-10.093 0.057,-12.006 0.966,-16.212c2.517,-11.648 6.159,-18.437 12.67,-23.618c6.117,-4.867 11.937,-6.638 21.859,-6.651c9.197,-0.013 15.793,1.285 26.8,5.273c31.003,11.233 67.392,34.36 109.821,69.796c5.353,4.47 11.052,9.2 12.665,10.512c1.613,1.311 6.745,5.817 11.404,10.013c4.659,4.196 9.271,8.273 10.248,9.06c2.853,2.295 29.287,27.143 41.765,39.256c6.302,6.119 16.58,16.418 22.841,22.888c6.26,6.469 12.188,12.514 13.173,13.432c0.985,0.918 5.723,5.853 10.528,10.967c4.805,5.113 11.77,12.516 15.478,16.45c3.708,3.934 9.834,10.578 13.613,14.766c3.78,4.187 8.481,9.341 10.448,11.453c3.381,3.631 13.116,14.583 20.96,23.582c1.956,2.244 5.389,6.126 7.629,8.626c3.924,4.381 11.46,13.151 22.819,26.557c3.236,3.819 5.334,6.693 5.24,7.182c-0.124,0.65 -0.778,0.842 -3.25,0.952c-3.067,0.137 -3.098,0.136 -5.046,-1.907Z" style="fill:#626f70;"/></g><g id="sia"><path d="M190.408,805.367c-51.817,-3.657 -97.586,-20.004 -143.404,-51.219c-2.688,-1.831 -7.429,-5.265 -10.535,-7.629c-3.107,-2.365 -6.119,-4.622 -6.694,-5.015c-1.058,-0.723 -13.025,-10.742 -16.983,-14.218l-2.146,-1.885l4.286,-4.465c5.041,-5.253 15.403,-15.973 18.125,-18.753c1.049,-1.071 7.164,-7.413 13.589,-14.093c6.425,-6.679 14.886,-15.471 18.802,-19.538c3.916,-4.066 7.483,-7.789 7.927,-8.273c0.773,-0.843 1.122,-0.564 8.377,6.702c17.357,17.383 34.988,29.827 58.699,41.428c5.043,2.467 9.399,4.486 9.679,4.486c0.281,0 1.197,0.355 2.037,0.79c5.138,2.662 24.314,8.577 32.28,9.958c2.492,Line truncated
|
||||
|
After Width: | Height: | Size: 15 KiB |
@@ -38,6 +38,33 @@ spare some coins. Possible methods for donating are:
|
||||
href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WU49A5NHPAZ9G&source=url">
|
||||
Donate with PayPal</a>
|
||||
|
||||
## How does pixeldrain store files?
|
||||
|
||||
Pixeldrain uses a few different techniques to store files cheaply, efficiently
|
||||
and performantly. The servers which accept files from users have a hard disk
|
||||
drive cache of typically a few terabytes (4 to 16). This is where most of the
|
||||
files are kept. When a file is requested from another server it will look up
|
||||
where the file is stored using a lookup table in the shared database. It will
|
||||
then try to contact that server to request the file and proxy the data directly
|
||||
to the requesting user.
|
||||
|
||||
Each server keeps track of which files are popular with its own userbase. This
|
||||
includes files which it is not storing locally. It does this using a popularity
|
||||
score. Every time a request to read a file comes in it will add 1 to the score
|
||||
of that file. This score will slowly degrade over time. Periodically the server
|
||||
will request all files with a high popularity score so it can store them locally
|
||||
to save bandwidth. If there is not enough space available to store these popular
|
||||
files it will move some less popular files to the next storage medium to make
|
||||
space available for the more popular files.
|
||||
|
||||
The next storage medium is Sia. This is where all the files live which are not
|
||||
requested frequently, but are still occasionally needed. Sia is a storage
|
||||
marketplace where anyone can sell their storage space for financial compensation
|
||||
in Siacoins. If you have storage space available and would like to provide it to
|
||||
pixeldrain and other services you should read our [Sia hosting
|
||||
guidelines](/hosting). There we explain which requirements we are setting for
|
||||
hosts and some handy tips for getting started with hosting.
|
||||
|
||||
## Do I need to register an account?
|
||||
|
||||
Not if you don't want to. You're free to use pixeldrain completely anonymously.
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
# Sia hosting guidelines
|
||||
|
||||
Pixeldrain uses [Sia](https://sia.tech) to offload files which are not requested
|
||||
often, but still need to be kept. Sia is a free storage market where any host
|
||||
can choose their own pricing. Because of this the users of the network need to
|
||||
be careful when choosing the hosts to make contracts with.
|
||||
|
||||
Because pixeldrain is fairly cost-constrained we are forced to set some hard
|
||||
requirements on storage and bandwidth pricing for Sia hosts.
|
||||
|
||||
## Rates
|
||||
|
||||
We will only make contracts with hosts that fullfill all these requirements.
|
||||
Keep in mind that these are maximums, you are allowed to go lower.
|
||||
|
||||
| Requirement | Max rate |
|
||||
|--------------------------|----------------|
|
||||
| Contract formation price | €0.001 |
|
||||
| Storage price per month | €2.00 / TB |
|
||||
| Download price | €1.00 / TB |
|
||||
| Upload price | €0.50 / TB |
|
||||
| RPC price | €0.0001 |
|
||||
| Sector access price | €0.0001 |
|
||||
| Collateral per month | €6.00 / TB |
|
||||
|
||||
This may seem low, but keep in mind that these prices are before redundancy. We
|
||||
have to upload all our data three times to the Sia network in order to reach
|
||||
high availability. If you multiply everything by three it becomes much more
|
||||
reasonable.
|
||||
|
||||
Other settings we pay attention to:
|
||||
|
||||
| Setting | Recommended value |
|
||||
|-----------------------|-------------------|
|
||||
| Max contract duration | At least 3 months |
|
||||
| Proof window duration | 1 day |
|
||||
| Download batch size | At least 16 MiB |
|
||||
| Revision batch size | At least 16 MiB |
|
||||
|
||||
## Tips and tricks for becoming a better host
|
||||
|
||||
### Use a stable Linux or BSD-based operating system
|
||||
|
||||
Sia is known to run better on Linux or BSD based operating systems. Windows is
|
||||
discouraged due to I/O reliability issues. Windows often sacrifices reliability
|
||||
for better performance, because of this crashes are more common on Windows and
|
||||
also have a greater chance of resulting is data loss. Forced updates and other
|
||||
interruping system processes are also likely to harm hosting uptime and
|
||||
performance.
|
||||
|
||||
We can recommend Debian, CentOS or Ubuntu LTS for hosting. These are systems
|
||||
which are known to be able to run uninterruped for decades at a time. They are
|
||||
also regularly patched with security updates which don't even require restarting
|
||||
most of the time. This makes these systems perfect for the role of hosting on
|
||||
Sia.
|
||||
|
||||
### Enable TCP BBR and other network stack optimizations
|
||||
|
||||
BBR is a new congestion control agorithm which dramatically decreases the time
|
||||
needed for a TCP connection to ramp up to maximum speed. It also contains
|
||||
improvements to counter other problems like router buffer bloat which causes
|
||||
network latency spikes. Here's an [in-depth analysis of the benefits of enabling
|
||||
BBR](https://blog.apnic.net/2017/05/09/bbr-new-kid-tcp-block/).
|
||||
|
||||
To enable BBR you need yo have kernel version 4.9 or higher. See your kernel
|
||||
version with `uname -a`. On Ubuntu you can upgrade to a newer kernel by
|
||||
[enabling HWE](https://wiki.ubuntu.com/Kernel/LTSEnablementStack).
|
||||
|
||||
Create a file called `/etc/sysctl.d/60-bbr.conf` with the following contents:
|
||||
|
||||
```
|
||||
net.core.default_qdisc = fq_codel
|
||||
net.ipv4.tcp_congestion_control = bbr
|
||||
net.ipv4.tcp_notsent_lowat = 16384
|
||||
net.ipv4.tcp_slow_start_after_idle = 0
|
||||
```
|
||||
|
||||
After doing that you can run `sysctl -p` or reboot to apply the changes. Verify
|
||||
that it's working with this command: `sysctl net.ipv4.tcp_congestion_control`.
|
||||
It should return `bbr`.
|
||||
|
||||
Here's a more in-depth [guide to the configuration of the linux network
|
||||
stack](https://www.cyberciti.biz/cloud-computing/increase-your-linux-server-internet-speed-with-tcp-bbr-congestion-control/).
|
||||
|
||||
### Use Sia Host Manager to configure your host
|
||||
|
||||
SiaCentral's [Host Manager](https://siacentral.com/host-manager) is a great tool
|
||||
for monitoring and configuring your host. It explains all the settings in
|
||||
detail, gives an option to set prices in any currency you like and gives
|
||||
detailed insights into your contracts and revenue stream.
|
||||
|
||||
### Sign up for SiaStats host alerts
|
||||
|
||||
When your host is configured properly SiaStats will monitor its uptime and
|
||||
performance. These stats are important for renters to discover good hosts and to
|
||||
get an overview into the state of the hosting network.
|
||||
|
||||
If your host has been online for a while it will show up on SiaStats' [hosting
|
||||
page](https://siastats.info/hosts). If you search for your host there will be an
|
||||
option to sign up for hosting alerts.
|
||||
|
||||
### IPv6 capability is encouraged
|
||||
|
||||
Pixeldrain makes heavy use of IPv6 across its systems. We do this because we
|
||||
believe that IPv6 is a critical component for the free internet. The old IPv4
|
||||
requires terrible hacks like NAT to work at a large scale. IPv4 addresses are
|
||||
also scarce and expensive to rent. All this money is thrown away on a legacy
|
||||
system for which a replacement has already existed for over a decade. NAT limits
|
||||
the growth of peer-to-peer software by making it impossible for applications to
|
||||
communicate freely over the internet. Instead we need to add more hacks on top
|
||||
like port forwarding to make it work. This has harmed the growth of the open
|
||||
internet a lot over the decades and will harm it more if we keep going like
|
||||
this.
|
||||
|
||||
So enable IPv6. If you don't have IPv6, call your ISP and ask them why not.
|
||||
|
||||
<div style="margin-top: 100px; height: 128px; text-align: center;">
|
||||
<a href="https://sia.tech/">{{ template "built-with-Sia-mono.svg" . }}</a>
|
||||
</div>
|
||||
@@ -298,7 +298,11 @@ a:hover {
|
||||
text-align: left;
|
||||
max-width: 40em;
|
||||
}
|
||||
table:not(.form) {border-collapse: collapse; width: 100%;}
|
||||
table:not(.form) {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 14px;
|
||||
}
|
||||
tr:not(.form) {border-bottom: 1px var(--layer_2_color_border) solid;}
|
||||
tr > td, tr > th {padding: 0.3em;}
|
||||
@media(max-width: 30em) {
|
||||
@@ -311,8 +315,8 @@ tr > td, tr > th {padding: 0.3em;}
|
||||
}
|
||||
}
|
||||
|
||||
pre{
|
||||
padding: 2px;
|
||||
pre {
|
||||
margin: 16px;
|
||||
border-bottom: 1px var(--layer_2_color_border) solid;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
@@ -43,10 +43,8 @@ func adType() (i int) {
|
||||
switch i {
|
||||
case 0, 1, 2, 3: // 50% of the traffic
|
||||
return 1
|
||||
case 4:
|
||||
return 2 // 12.5%
|
||||
case 5, 6, 7:
|
||||
return 0 // 37.5%
|
||||
case 4, 5, 6, 7: // 50%
|
||||
return 2
|
||||
default:
|
||||
panic(fmt.Errorf(
|
||||
"random number generator returned unrecognised number: %d", i),
|
||||
@@ -160,6 +158,7 @@ func (wc *WebController) serveFileViewerDemo(w http.ResponseWriter, r *http.Requ
|
||||
"description": "A file to demonstrate the viewer page",
|
||||
"mime_image": "/res/img/mime/text.png",
|
||||
"thumbnail": "/res/img/mime/text.png",
|
||||
"abuse_type": "",
|
||||
},
|
||||
}
|
||||
err := wc.templates.Get().ExecuteTemplate(w, "file_viewer", templateData)
|
||||
|
||||
@@ -115,6 +115,7 @@ func New(
|
||||
{GET, "widgets" /* */, wc.serveTemplate("widgets", false)},
|
||||
{GET, "about" /* */, wc.serveMarkdown("about.md", false)},
|
||||
{GET, "appearance" /* */, wc.serveTemplate("appearance", false)},
|
||||
{GET, "hosting" /* */, wc.serveMarkdown("hosting.md", false)},
|
||||
|
||||
// User account pages
|
||||
{GET, "register" /* */, wc.serveForm(wc.registerForm, false)},
|
||||
|
||||
Reference in new issue
Block a user