Right now we’re exploring setting up a API endpoint to stream S3 file content to users. Is Elixir a good fit for this feature, will it perform well or are there better alternatives?
If it’s good enough, I’d like to stay within Elixir land instead of reaching for a different language.
Elixir can do very well at this, although I would also consider simply using presigned S3 URLs so that you can just offload the bandwidth onto S3 directly.
You’d need to download the whole file from S3, write it to disk, then do send_file.
It also should be possible to accept chunks of data in cowboy and send it (also in chunks, just rewriting the headers) to aws without saving anything to disc. Not sure if it is possible with plug.
This way the overhead would be minimized, probably.