node FTP Server

716 views
Skip to first unread message

billywhizz

unread,
Dec 19, 2009, 9:11:35 AM12/19/09
to nodejs
Have done an initial release of my FTP Server in node.js. still a lot
of work to do (like maybe some error handling?!) but i have the basic
functionality working pretty seamlessly with filezilla client.

It works fine with large files (200MB+) and have managed to push it to
50k+ concurrent logged in connections (all idle - things get a bit
hairy when they are all sending and receiving messages).... Seems to
use up about 3-4k per active connection on average.

Git Repo is here:

http://github.com/billywhizz/nodeftpd

It has only been tested against node release 0.1.21 so far.

When i run the included test script, i get the following after 50000
connections:
FTP Return Codes:
"220":50002,
"230":50002,
"257":50002,
"331":50002,

Memory Usage (MB):
"RSS":139,
"VSZ":164,

Connection Info (Connected, Errors, EOF events, Close events, Timeout
events):
"CON":50002,
"ERR":0,
"EOF":0,
"CLO":0,
"TIM":0

feel free to provide some feedback if you have a chance to have a look
at it.

NOTE: Will only work in ACTIVE mode (set your FTP client to use active
connections). PASSIVE mode only works with a patch to the node code.
As far as I know Ryan is adding the functionality to allow retrieval
of an assigned ephemeral port in a listen event on the TCP Server, but
this is not in the latest node release yet. If you really want to test
out Passive mode, you can apply the following patches to node release
0.1.21:

http://gist.github.com/260085

Kenneth Kalmer

unread,
Jun 7, 2010, 5:30:03 PM6/7/10
to nod...@googlegroups.com
On Sat, Dec 19, 2009 at 4:11 PM, billywhizz <apjo...@gmail.com> wrote:
feel free to provide some feedback if you have a chance to have a look
at it.

NOTE: Will only work in ACTIVE mode (set your FTP client to use active
connections). PASSIVE mode only works with a patch to the node code.
As far as I know Ryan is adding the functionality to allow retrieval
of an assigned ephemeral port in a listen event on the TCP Server, but
this is not in the latest node release yet. If you really want to test
out Passive mode, you can apply the following patches to node release
0.1.21:

http://gist.github.com/260085

Thanks for the awesome example Andrew.

I'm using this as a base for an FTP reverse proxy that I need and I'd like to know whether the ephemeral port support has been added to node since these patches have proposed? This is for a hosting environment where we simply cannot re-educate all the users to use active FTP transfers, and the proxy needs to be transparently placed between the clients and our FTP servers.

Kind regards

--
Kenneth Kalmer
kenneth...@gmail.com
http://opensourcery.co.za
@kennethkalmer
Reply all
Reply to author
Forward
0 new messages