Monday, April 3, 2017

File Transfer Between Multiple Servers

Assume I have a server that I am running Laravel (web + api). I have another server for just video rendering tasks. For my case, user uploads bunch of videos and it gets rendered in the other server. (So I use Linux & Windows). My question is, in such scenarios: when user uploads videos to Laravel, how should it be send to the render server?

  • Is building an api in render server a good approach? So Laravel send the file to render server and on completion receive the output file; then perform the save to db process.

  • Or is it a better approach to handle the whole process on the render server (queue, process and then send the output to server)?

What makes me doubt is that, using an api will cause the file to travel a lot (user to Laravel server and then other server).

Also, as my second question, assume that I have another storage server. When render is completed, if I send the rendered video to the Laravel server and then it saves the data to storage server, then the video file travelled a lot again (this time from render server to Laravel then to storage). Is that a good approach?

What is the best way of achieving such tasks?



via senty

Advertisement