THINGS YOU SHOULD KNOW BEFORE WE GET STARTED
Internet — the Internet is a vast network that connects computers all over the world.
Internet Service Provider (ISP) — These are organizations that provides services for accessing, participating in the Internet.
Client requests — These are queries sent to the server by the client.
Client — The user-agent. Any tool that acts on behalf of the user and capable of obtaining information and application from the server. This role is primarily performed by the Web browser, but it may also be performed by programs used by engineers and Web developers to debug their applications.
Server — a piece of computer hardware or software that provides functionality for other programs or devices, called “CLIENTS”.
Webserver — is computer software with underlying hardware that connects to the Internet and supports physical data interchange with other devices connected to the web.
Domain Name System (DNS) — the hierarchical and decentralized naming system used to identify computers, services, and other resources reachable through the Internet or other Internet Protocol networks.
Resolver — a set of dynamic library routines used by applications that need to know machine names.
Internet Protocol address (IP) — Is a numerical label such as 127.0.0.1 that is connected to a computer network that uses the Internet Protocol for communication. An IP address serves two main functions: network interface identification and location addressing. is the set of rules governing the format of data sent via the internet or local network. … The internet needs a way to differentiate between different computers, routers, and websites. IP addresses provide a way of doing so and form an essential part of how the internet works.
Transmission Control Protocol (TCP) — is a transport protocol that is used on top of IP to ensure reliable transmission of packets. TCP includes mechanisms to solve many of the problems that arise from packet-based messaging, such as lost packets, out of order packets, duplicate packets, and corrupted packets It is an oriented-connection protocol that means it establishes the connection before the communication that occurs between the computing devices in a network. This protocol is used with an IP protocol, so together, they are referred to as a TCP/IP.
HYPERTEXT TRANSFER PROTOCOL (HTTP) — a protocol for fetching resources such as HTML documents. It is the foundation of any data exchange on the Web and it is a client-server protocol, which means requests are initiated by the recipient, usually the Web browser.
APPLICATION SERVER — a type of server designed to install, operate and host-associated services and applications for the IT services, end-users and organizations.
LOAD BALANCER — a device/program that acts as a reverse proxy and distributes network or application traffic across many servers.
DATABASE — is an organized collection of structured information, or data, typically stored electronically in a computer system.
FIREWALL — a network security system that monitors and controls the incoming and outgoing network traffic based on predetermined security rules.
Now let’s see what happens when you type in a URL in your browser and press enter
When you type in google.com in your browser, after less than a second, you’re taken to the Google homepage. But what happens in that fraction of a second? Websites are collections of files, often HTML, CSS, JavaScript, and images that tell your browser how to display the site, images, and data. They need to be accessible to anyone from anywhere at any time, so hosting them on your computer at home isn’t be scalable or reliable. A powerful external computer connected to the Internet, called a server, stores these files. When you point your browser at a URL like google.com your browser has to figure out which server on the Internet is hosting the site. It does this by looking up the domain, google.com, to find the address Computers and other devices communicate using IP addresses to identify each other on the internet. But humans can’t remember IP addresses, so they use words. The domain name system (DNS) brings the two together and gets you to your destination. This is how DNS works the resolver server is usually your ISP (Internet Service Provider). All resolvers must know one thing: where to locate the root server. The root server knows where to locate the .COM TLD server. TLD stands for Top-Level Domain. If it’s not cached in your computer, your request queries a name server. It then goes between more name servers until the IP address is located and sent to your computer. The process is known as the domain name system or DNS for short. While it may seem complicated at first, DNS is easy to understand and can be helpful to get your users where they need to go on your website.
WHAT IS DNS CACHE?
If there’s a website you frequent, it isn’t necessary to locate the IP address every time. DNS caching will store the data locally on your computer, or it can also be cached on the ISP’s servers. Before it locates the IP address, your computer will check if the information is already cached. If your computer already has the data, then it doesn’t have to access a DNS server to resolve the query. If you have trouble accessing a website or application, you can clear your DNS cache to remove outdated information. It can also be necessary to clear DNS cache data for security and privacy reasons.
DNS TYPES
Learning how DNS works is one part of the puzzle. You also need to understand the multiple DNS types that name servers store.
DNS record types are more than just home page URLs. Multiple DNS types are useful, like setting canonical URLs or pointing a mail server to your website.
The most common DNS types are:
· A records, or Address Records, link your domain name to an IP address. This is the main DNS type.
· MX records, or Mail Exchanger, set a mail server for your domain name. So, when someone sends you an email @yourdomainname.com, it tells DNS where your mail is hosted.
· TXT records, or TXT, are commonly used for verification and security. They include Sender Policy Framework (SPF) records and Domain Key Identified Mail (DKIM) records. A TXT record helps identify your website as a trusted source for email systems.
· CNAME records, or Canonical Name, point one domain name to another. This is used for variations of your website. If you’ve ever typed amazong.com and ended up at amazon.com, you can thank CNAME records.
· NS records, or Name Server records, tell you the specific authoritative name server for your domain. It points to the server which houses your IP address. All this while we have been referring to our sample URL as google.com but in a real sense, it has a hidden part that is auto completed by your search upon a request. The complete URL appears as google.com
HTTPS stands for Hypertext Transfer Protocol Secure. This tells the browser to make a connection to the server using Transport Layer Security (TLS). TLS is an encryption protocol to secure communications over the Internet. With HTTPS, the data exchanged between your browser and the server, like passwords, credit card info, etc. is encrypted. You may have also seen ftp: //, mailto://, or file://.
HOW DOES THE BROWSER LOOKUP AN IP ADDRESS FOR THE DOMAIN?
After you’ve typed the URL into your browser and pressed enter, the browser needs to figure out which server on the Internet to connect to. To do that, it needs to look up the IP address of the server hosting the website using the domain you typed in. It does this using a DNS lookup. Because DNS is complex and has to be blazingly fast, DNS data is cached at different layers between your browser and various places across the Internet. Your browser checks its cache, the operating system cache, a local network cache at your router, and a DNS server cache on your corporate network or at your internet service provider (ISP). If the browser cannot find the IP address at any of those cache layers, the DNS server on your corporate network or at your ISP does a recursive DNS lookup. A recursive DNS lookup asks multiple DNS servers around the Internet, which in turn ask more DNS servers for the DNS record until it is found. Once the browser gets the DNS record with the IP address, it’s time for it to find the server on the Internet and establish a connection. How is this connection established?
HOW DOES THE BROWSER INITIATE A TCP CONNECTION WITH THE SERVER?
Using the public Internet routing infrastructure, packets from a client browser request get routed through the router, the ISP, through an internet exchange to switch ISPs or networks, all using transmission control protocol (TCP) to find the server with the IP address to connect to at port 443. Once the browser has established a connection with the server, a Secure Socket Layer (SSL) certificate is generated to denote the domain as secured. The next step is to send the HTTP request to get the resource or the page.
HOW DOES THE BROWSER SEND HTTP REQUESTS TO THE SERVER?
Now that the browser has a connection to the server, it follows the rules of communication for the HTTP(s) protocol. It starts with the browser sending an HTTP request to the server to request the contents of the page. The HTTP request contains a request line, headers, and a body. The request line contains information that the server can use to determine what the client in this case, your browser wants to do.
SERVER PROCESS REQUEST AND SENDS A RESPONSE TO CLIENT
The server takes the request and based on the info in the request line, headers, and body then decides how to process the request. It fetches the requested content from the available database. Resources can be static files, either text (HTML files) or non-text data (images). Browsers aren’t always requesting static files, though. Often, these are dynamic resources generated at the time of the request and there is no file associated with the resource. The browser renders the content afterwards.
HOW THE BROWSER RENDERS CONTENT
Once the browser has received the response from the server, it inspects the response headers for information on how to render the resource. The Content-Type header above tells the browser it received an HTML resource in the response body. Sometimes, there is a lot of traffic of clients requests to servers (you are typing google.com, other people are typing in the URL they need to access as well .To improve the efficiency of servers and reduce loading time, a load balancer is used.
LOAD BALANCER
A load balancer intelligently distributes traffic from clients across multiple servers without the clients having to understand how many servers are in use or how they are configured. Because the load balancer sits between the clients and the servers it can enhance the user experience by providing additional security, performance, resilience and simplifying scaling your website. Load balancers perform many functions in addition to just splitting traffic across servers, among them are: HTTP reverse proxy, Traffic and routing optimization algorithms, Image caching reducing web server load. Your request to view google.com will be equally balanced with all other available requests from other clients. The load balancer will allocate a server for you.
0 Comments