开发者

Synchronization between two servers, Movies portal

We've got two servers. First one is fast but has limited capacity and bandwidth. Second one is very slow but has unlimited capacity, bandwidth and also got ffmpeg access.

We already got the part in which Flash player starts movie from another server but now we need syn开发者_运维技巧chronize two servers to upload movies from first to second.

My idea is: When user uploads movie to the first sever it gets checked about file type and other verifications. Then we use cron to set up a job which sends this file to the backup server and there it gets converted, created miniatures and sends back info to the first server.

My question:

1. Is this a good way to solve this or is there better one? 2. What method use when sending first file to another server? cURL extension or maybe just FTP? Personally I would use CURL because less hassle but is it possible to send so big files without much problems from first server?

EDIT: They are not in the same network. They are thounsands kilometers away from each other.


You might be better off using SMB/NFS if it's on the same network, otherwise FTP would be a good choice. Using Cron to check status and running a bash script should be able to take care of it easily.


To transfer several files at once, use a cronjob that calls rsync. rsync can handle multiple files, resume failed transfers and is generally a good choice.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜