Reputation: 265
I would like to know maximum no of concurrent connection allowed for a azure worker role listening on port 21,having one instance.
Scenario is:
I have one instance of worker role and port open on 21 and Tcplistener listening on port 21 for incoming connections.I have implemented it async so that i can listen to other client request while processing one.
On azure part i would like to know if is there any limitation on no of concurrent request on port 21 of Worker role.
Regards, Vivek
Upvotes: 1
Views: 3573
Reputation: 331
The limit is 500K per VM or role instance: https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits#networking-limits-1
Upvotes: 2
Reputation: 30903
I think you shall first understand the networking principles. There is solely only one process that can listen to a particular port and protocol on a network interface at a time. How then the communication is handled? In a very simple outline the situation looks as follows (port numbers and IP addresses are intentionally fake):
All that happens at very low protocol level, and developer (unless developing network adapter driver) does not see/care about this port shifting.
Now the real question is, how to accept more concurrent connections. If you are developing your own TCP server, you set the maximum number of allowed connections and manage those on your own (by managing threads). If you use some other third party server - it shall have a configurable option for maximum number of allowed concurrent connections.
You can check out a simple implementation of TCP Server here. As you can see, there is a private field _maxConnections, which is used to handle the connections.
As a summary - the maximum number of concurrent connection to a specific resource (socket) depends on the server that serves that resource. For example default maximum concurrent connections limit for IIS8 is set to 4294967295:
Upvotes: 2