How much overhead is there in persistent connections

node.jssocketswebsockets

Ok so I'm musing over a little side project I want to start. Essentially its a multi-session web based FTP client. Multi-session in that you can log into several FTP servers at the same time and perform operations like moving a file from one FTP server to another.

I'm doing this mainly to brush up on the new webdev technologies, particularly websockets. I'm using node.js + socket.io to keep a persistent bi-directional connection between the web browser and the web server. The web server will also have persistent connections to each FTP server the user has logged into. So if there are 100 concurrent users each logged into 5 ftp accounts, the web server will have 100 websocket connections + 500 ftp connections.

Is servicing 600 connections a lot? I know it depends on the hardware resources of the server but is something like this doable on a budget? Are there more efficient means of doing something like this? I know its unlikely that this project will really get popular but I want it to scale well regardless.

Thanks for any help, I've still got a lot to learn.

Best Answer

600 persistent connections should not be an issue - in general connecting overhead is high compared to idle connection overhead(especially if using secure, handshake-based protocol such as TLS), so keeping connections open rather than closing and opening them upon actions definitely reduces the amount of load on the server(and the network, for that matter).

Of course, this is hardware and network dependent, but the numbers you're aiming for right now should very well be doable without considerable resource dedication.

Related Topic