I am working on a file upload system that will store parts of large files on multiple servers. Thus, the distribution of a 1GB file will look something like this:
Server 1: 0-128MB Server 2: 128MB-256MB Server 2: 256MB-384MB ... etc
The goal is to allow redundancy (each part will exist on several servers), security (no server has access to the entire file), and cost (bandwidth costs are allocated).
I am curious if anyone has an opinion on how I can βtrickβ web browsers into downloading different parts from a single link.
What I had in mind was something like:
- The browser is connected to server 1, which provides the size of the contents of the complete file
- After serving 128 MB, server 1 will intentionally close the connection
- Let's hope the browser tries to restart the download by requesting server 1
- Server 1 provides 3XX redirection to server 2
- Browser continues downloading from server 2
I do not know for sure that my example works, since I have not tested it yet. I was curious if there are other solutions that someone might have?
I would like to make the whole process as simple as possible (ideally without work without a simple download). I do not want users to have to use another program (for example: cat'ing files together). I would also like not to use a proxy server, as it will incur additional bandwidth costs.
As far as I know, there is no javascript solution to write the file, if it were, that would be great.
source share