posted 14 years ago
After a long time I am visiting JR , looks great !
Here goes the question !
Say suppose there is a very huge site (terms of traffic that it gets) , like Facebook.com , which draws a lot of users.This question is about scalability. Below I have mentioned some of the technical details , which might be worth going through to understand the question that I am going to state later.
When a web page opens up in our browser , it establishes a persistent TCP/IP connection.It’s persistent because it keeps the connection open and uses the same connection for multiple HTTP request response pairs.It a connection remains open for certain amount of time , then the client/browser closes it by sending a TCP packet with it’s fin bit set. So there exists a communication channel with a port in the user’s workstation and a port in the server hosting the website. Now the port number is specified using 16 bits unsigned type , which means that there can be at most 65536 ports in a computer. I am ignoring the fact that ports below 1024 are reserverd.
So the question is , is it that at any given point of time no more that 65K users are online concurrently ?
I am sure that it’s possible but how ?
My take , but wanted to confirm it or my understanding might not be completely correct , so please point to some good resources.
Say the site that I am talking about is www.fakeit.com , so when my browser requests for the IP of www.fakeit.com then the DNS sends the request to the dns of the domain fakiit.com and it returns the IP of a host which is less loaded. So the DNS of fakeit.com acts as the load balancer and there can be a lot of host and multiples of 65K ports.
Thanks,
Rahul Bhattacharjee