Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>i think your own idea is not the worst one. get a bunch of servers, and for every file store which server(s) it's on. if new files are uploaded, use most-free-space first*. every server handles it's own delivery (instead of piping through the main server).</p> <p><strong>pros:</strong></p> <ul> <li><p>use multiple servers for a single file. e.g. for cutekitten.jpg: <code>filepath="server1\cutekitten.jpg;server2\cutekitten.jpg"</code>, and then choose the server depending on the server load (or randomly, or alternating, ...)</p></li> <li><p>if you're careful you may be able to move around files automatically depending on the current load. so if your cute-kitten image gets reddited/slashdotted hard, move it to the server with the lowest load and update the entry.<br> you could do this with a cron-job. just log the downloads for the last xx minutes. try some formular like (downloads-per-minute<em>filesize</em>(product of serverloads)) for weighting. pick tresholds for increasing/decreasing the number of servers those files are distributed to.</p></li> <li><p>if you add a new server, it's relativley painless (just add the address to the server pool)</p></li> </ul> <p><strong>cons:</strong></p> <ul> <li><p>homebrew solutions are always risky</p></li> <li><p>your load distribution algorithm must be well tested, otherwise bad things could happen (everything mirrored everywhere)</p></li> <li><p>constantly moving files around for balancing adds additional server load</p></li> </ul> <p><code>*</code> or use a mixed weighting algorithm: free-space, server-load, file-popularity</p> <p>disclaimer: never been in the situation myself, just guessing.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload