CA 17 - Write a blog on "How a request originates from cllient and reaches the server ?"
REQUEST FROM CLIENT TO SERVER:
Before that, for sending a letter to someone you should know his address!!!!!.
DNS:
There are many website and servers running to server as web applications and websites. We know to access or to communicate with a device on internet we need it's IP. But we cannot memorize all the IP's of all the webapps so we use of the DNS.
We have the domain name instead of the IP and with the help of domain name we will get the Ip and reachout to the server.
Example: URL :- www.instagram.com.
The below information is just for refernce, it will be explained later in the next blog in detailed. [ I didn't noticc the next topic and started to explain, sorry for the inconvinence : - ( ]
The client should know the public IP of the server inorder to reach the server.
STEPS TO FIND THE ADDRESS OF MY FRIEND:
By the way not my close friend, cuz why would i write a letter for my close friend.
1. Check if i have the address 2. check if our mutual friend have his address
3. Check if his address is in our class attendence (root) 4. Check if his father has his address
5. At last call him to get his address
Similarly client to tries to find the Ip address of the server
STEP TO FIND THE IP OF THE SERVER:
1. The client checks with itself, in it's cache if it has the IP of the server ( Here we will have it as instagram server )
2. If not then the client checks with the sub machine such as the modem and gateway, Because there might chances someone connected to my local network might already have accessed the serve and the IP might have be stored in the cache of these sub machine
3. Then through the internet (ISP) it reaches the root (Name Server)
4. Then to SLD ( Secondary level Domain)
Once the IP is fetched, it will be given back to the client. Once the client gets the IP of the server, then it sends the request to the server through the OSI model of networking. And the response generated will also follow the same.
Every request from the local network machine is passed to the gateway where it will receive all the resquests from the local network and then forwards it to the internet , this is called as Forward Proxy.
As there will not be just one server for the instagram, ther will be many servers, so all the server will be connected to a single machine where the traffic will be distributed. This machine recevies the rtaffic from the internet and send to the decentralized servers, this process is called as reverse proxy.
Why is this done at the server side, why a central machine is required to connect all the servers. Because all the differnet servers will have differnet IP. But the URl corresponds to only one IP, which will be stored as records in Zone file. Thus a centralised Machine is there to receive the traffic, the URl will point to this machine's IP only.
Comments
Post a Comment