DevX
DevX

Reputation: 23

Socket server performance

I am working on web socket application. From the front-end there would be single socket per application. But I am not sure about back-end. We are using Python and nginx with Flask-socketIO and socket-io client library. This architecture will be used to notify front-end that a change is occurred and it should update data.

Following are my doubts - How many sockets and threads will be created on server ? Can a socket be shared between different connection ? Is there any tool to analyze no of socket open ?

Upvotes: 0

Views: 701

Answers (2)

user207421
user207421

Reputation: 311028

How many sockets and threads will be created on server?

As many sockets as there are inbound connections. As for threads, it depends on your architecture. Could be one, could be same as sockets, could be in between, could be more. Unanswerable.

Can a socket be shared between different connection?

No, of course not. The question doesn't make sense. A socket is an endpoint of a connection.

Is there any tool to analyze no of socket open?

The netstat tool.

Upvotes: 0

Rahul
Rahul

Reputation: 2598

You can use netstat -np if on a linux machine to find no of open ports at the moment. Also this post may help you a bit too. TCP : two different sockets sharing a port?

Upvotes: 1

Related Questions