Wednesday, April 20, 2011

Running bittorrent on Amazon EC2

EC2 Micro Instance as a Remote Bittorrent Client

I know it will be easy but not this easy in Linux.  The motivation is that it's private.  Nobody knows who is downloading.  Amazon doesn't provide any service other than a computer so I doubt if they maintain any logs.

The other thing is that it's fast.  You can download anytime without interfering with your other work.  It's up to 700 kb/s and a 1G file downloads in less than 1 hr, probably much less.  Downloading from EC2 to your local computer is like 600 kb/s.  It all varies.

Price wise it's free for storage unless you store the file up there.  You have some 15 G/b in and about the same out free per month.  More than that it's in pennies.  For a 1 Gb file, it will become a few GB on your bandwidth.  But because it's so fast, the upload is about 10% of the file.  So the total bandwidth is like 2.2 plus the encryption / packaging overheads.

Even if it's not free, it's less than a penny to turn on the EC2.  It's 10/15 pennies per GB in / out.  So it beats any VPN / Bit torrent / Usenet / File download plans, unless you are a heavy user.

There a good step by step guide to start the EC2 service at the link.  The steps are update except for the Security Group.  Now there's no from/to Port, just Port.  So you just need to open the port 9091 and the range 49152-65535. (plus ssh at port 22).  The range is for random port numbers, you need at least one at 51413.

Now you can control the bit torrent client from your own browser, neat!

Now for Linux/Ubuntu, the copy command is built into ssh.

scp -i yourkeyfile.pem ubuntu@yourpublicdns.com:Downloads/yourfile .

The keyfile, public DNS are the same as you start the ssh.  Downloads is for Transmission you setup in the linked instructions, under your home directory.  You can also use the internal IP address of your EC2 instead of the public DNA, and also in your browser.

No comments: