<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Girmangus Hailu on Medium]]></title>
        <description><![CDATA[Stories by Girmangus Hailu on Medium]]></description>
        <link>https://medium.com/@girmangus?source=rss-6053dd4bb566------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*wYrX8oYrM8_uB_wQ.jpg</url>
            <title>Stories by Girmangus Hailu on Medium</title>
            <link>https://medium.com/@girmangus?source=rss-6053dd4bb566------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 17:02:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@girmangus/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What happens when you type google.com in your browser and press Enter]]></title>
            <link>https://medium.com/@girmangus/what-happens-when-you-type-google-com-in-your-browser-and-press-enter-c1d27ad6dafa?source=rss-6053dd4bb566------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1d27ad6dafa</guid>
            <dc:creator><![CDATA[Girmangus Hailu]]></dc:creator>
            <pubDate>Fri, 04 Nov 2022 22:35:49 GMT</pubDate>
            <atom:updated>2022-11-04T22:43:49.319Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Introduction to how the web stack works</em></p><p>We use the internet all the time for all sorts of purposes, and it has become like second nature to browse all day. So much so that we’re most of the time content with just knowing that our browser works and does what it’s asked. But it’s not magic (or is it?), and the web pages we see in that rectangle machine must come from somewhere. So how is it all happening? What is happening under the hood between the moment we enter a URL (Uniform Resource Locator) in the search bar and the moment we receive the content of the desired page?</p><h3>The client-server model</h3><p>Before diving into the details of the web infrastructure, it’s important to understand the client-server model. On the World Wide Web, the network is organized between <strong>clients</strong>, which request data, and <strong>servers</strong>, which stores the data and manage most of the processing of this data. For example, a browser is considered a client, and a server would be the computer program <em>serving</em> data to that client. The server is also a term describing the physical machine on which the server program is running. Each website, application, and service can have multiple servers working behind the scenes to perform the processes needed by the client(s). In general, physical servers are regrouped in server farms or data centers.</p><p>There are many other layers between the client and the server in a client-server model, let’s break it down.</p><h3>The DNS request</h3><p>When we type the URL <a href="https://alx-intranet.hbtn.io/">https://www.alx-intranet.hbtn.io</a> into our browser (Google, Firefox, Safari, or any browser) and press ‘Enter’, the first thing that the browser is going to do is break down the URL into pieces. The browser is going to consider the <a href="https://alx-intranet.hbtn.io/">alx-intranet.hbtn.io</a> part first, a <strong>subdomain</strong>, and the second part which is a <strong>domain name</strong>. If the browser doesn’t know that domain name (it’s not stored in its cache), it is going to ask the <strong>Domain Name System</strong> for the IP address corresponding to this particular domain name. This IP (Internet Protocol) address is in fact the unique address of the main server hosting the website (the data, the text files, the code, the services…) <a href="https://alx-intranet.hbtn.io/">alx-intranet.hbtn.io</a> It’s a suite of four numbers ranging from 0 to 255, separated by dots. The reason we have domain names in the first place is that humans remember words better than numbers. Thankfully, the DNS is here for us to remember the IP of each domain.</p><p>The DNS request first goes through the <strong>resolver</strong>. The resolver is usually our Internet Service Provider, and if it doesn’t find the IP in its cache, it’s going to request the <strong>root </strong>server. The root server knows where the <strong>TLD</strong> (Top-Level Domain) server is. In our case, the top-level domain is <a href="https://alx-intranet.hbtn.io/">hbtn.io</a>. Other types of TLD are .com, .edu, <em>.net</em>, .org, <em>.fr</em>, etc. If the TLD server doesn’t know the IP, it points the resolver to the <strong>Authoritative Name Servers</strong> for the domain name. Usually, there is more than one name server attached to one domain name. But any of those name servers can give the IP for the domain name they are attached to. Now the resolver has the IP address(for example, 3.228.234.218 ), and can send it back to the browser which will perform its request to the corresponding server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avn7psL9d2MrKWmqDH3apg.jpeg" /></figure><h3>Protocols: TCP/IP</h3><p>We mentioned how domain names actually represent IP addresses, but IP is not the only type of protocol used by the Internet. The <strong>Internet Protocol Suite</strong> is often referred to as TCP/IP (TCP stands for Transmission Control Protocol), and it also contains other types of protocols. It’s a set of rules that define how servers and clients interact over the network, and how data should be transferred, broken into packets, received, etc.</p><h3>The Firewall</h3><p>To protect themselves from hackers and attacks, servers are often equipped with a firewall. A firewall is software that sets rules about what can enter or leave a part of a network. In the case of our example, when the browser asks for the website at the address 3.228.234.218, that request has been processed by a firewall which will decide if it’s safe, or if it’s a threat to the server’s security. The browser itself can also be equipped with a firewall to detect if the IP given by the DNS request is a potential malicious agent.</p><h3>Security and Encryption: HTTPS/SSL</h3><p>Now that the browser has the IP address, it is going to take care of the other part of the URL, the <a href="https://holbertonschool.com/">https://</a> part. HTTPS stands for HyperText Transfer Protocol Secure and is a secure version of the regular HTTP. This transfer protocol defines different types of <strong>requests </strong>and<strong> responses</strong> served to clients and servers over a network. In other terms, it’s the main way to transfer data between a browser and a website. HTTP and HTTPS requests include GET, POST, PUT, and others. The HTTPS requests and responses are encrypted, which ensures the users that their data can’t be stolen or used by third parties. For example, if we put our credit card information on a website that uses HTTPS, we are guaranteed that this info is not going to be stored in plain text somewhere accessible to anybody.</p><p>Another key component in securing websites is the SSL certificate. SSL stands for Secure Sockets Layer (also known as TSL, Transport Layer Security). The certificate needs be issued from a trusted Certificate Authority, like the famous <a href="https://letsencrypt.org/">Let’s Encrypt</a> example, which gives free SSL certificates. When a website has this certificate, we’re able to see a little lock icon next to the website name in the search bar. On some browsers and with certain types of SSL certificates, the bar turns green.</p><h3>Load-balancer</h3><p>As we mentioned earlier, websites live on servers. For a most websites where the traffic is consequent, it would be impossible to be hosted on a single server. Plus, it would create a <strong>Single Point of Failure</strong> (SPOF), because it would only need one attack on the said server to take the whole site down.</p><p>As needs for higher availability and security rises, websites started augmenting the number of servers they have, organizing them in <strong>clusters</strong>, and using <strong>load-balancers</strong>. A load-balancer is a software program that distributes network requests between several servers, following a load-balancing algorithm. HAproxy is a very famous load-balancer, and example of algorithms that we can use are the <strong>round-robin</strong>, which distributes the requests alternating between all the servers evenly and consequentially, or the <strong>least-connection</strong>, which distributes requests depending on the current server loads.</p><h3>The Web server</h3><p>Once the requests have been evenly distributed to the servers, they will be processed by one or more <strong>web servers</strong>. A web server is a software program that serves static content, like simple HTML pages, images or plain text files. Examples of web servers are Nginx or Apache. The web server is responsible for finding where the static content corresponding to the address asked for is living, and for serving it as an HTTP, or HTTPS response.</p><h3>The Application server</h3><p>Having a web server is the basis of any web page. But most sites don’t just want a static page where no interaction is happening, and most websites are <strong>dynamic</strong>. That means that it’s possible to interact with the site, save the information on it, log in with a username and a password, etc.</p><p>This is made possible by the use of one or more <strong>application servers</strong>. These are software programs responsible for operating applications, communicating with databases, and manage user information, among other things. they work behind web servers and will be able to serve a dynamic application using the static content from the web server.</p><h3>The Database</h3><p>The last step in our web infrastructure is the <strong>Data Base Management System (DBMS)</strong>. A <strong>database</strong> is a collection of data, and the DBMS is the program that is going to interact with the database and retrieves, adds and modifies data in it.</p><p>There are several types of database models. The two main ones are <strong>relational </strong>databases and <strong>non-relational </strong>databases. A relational database can be seen as a collection of tables representing objects, where each column is an attribute and each row is an instance of that object. We can perform SQL (Structured Query Language) queries on those databases. MySQL and PostgreSQL are two popular relational databases. A non-relational database can have many forms, as the data inserted in it doesn’t have to follow a particular schema. They are also called <strong>NoSQL</strong> databases.</p><p>A web stack has many layers, and we touched just the surface of it. When we type a URL in a browser, it takes only microseconds for all the agents we talked about to form a response and serve it to the client. Even knowing what is happening behind the curtain, it is still pretty magical to see it happening before our eyes.</p><h3>Sources</h3><h3>What is the Client-Server Model? — Definition from Techopedia</h3><p><a href="https://www.techopedia.com/definition/18321/client-server-model"><em>Client-Server Model Definition — The client-server model is a distributed communication framework of network processes…</em></a></p><p><a href="https://www.techopedia.com/definition/18321/client-server-model">www.techopedia.com</a></p><h3><a href="https://www.techopedia.com/definition/4202/server-farm">What is a Server Farm? — Definition from Techopedia</a></h3><p><a href="https://www.techopedia.com/definition/4202/server-farm"><em>Server Farm Definition — A server farm is a set of many servers interconnected together and housed within the same…</em></a></p><p><a href="https://www.techopedia.com/definition/4202/server-farm">www.techopedia.com</a></p><h3><a href="https://howdns.works/">How DNS works</a></h3><p><a href="https://howdns.works/"><em>A comic that explains what happens when you browse to a website.</em></a></p><p><a href="https://howdns.works/">howdns.works</a></p><h3><a href="https://searchnetworking.techtarget.com/definition/TCP-IP">What is TCP/IP (Transmission Control Protocol/Internet Protocol)? — Definition from WhatIs.com</a></h3><p><a href="https://searchnetworking.techtarget.com/definition/TCP-IP"><em>TCP/IP, or the Transmission Control Protocol/Internet Protocol, is a suite of communication protocols used to…</em></a></p><p><a href="https://searchnetworking.techtarget.com/definition/TCP-IP">searchnetworking.techtarget.com</a></p><h3><a href="https://searchsecurity.techtarget.com/definition/firewall">What is a Firewall? — Definition from WhatIs.com</a></h3><p><a href="https://searchsecurity.techtarget.com/definition/firewall"><em>The term firewall is a metaphor that compares a type of physical barrier that’s put in place to limit the damage a fire…</em></a></p><p><a href="https://searchsecurity.techtarget.com/definition/firewall">searchsecurity.techtarget.com</a></p><h3><a href="https://www.instantssl.com/http-vs-https">What is HTTPS?</a></h3><p><a href="https://www.instantssl.com/http-vs-https"><em>Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP, the protocol over which data is sent between…</em></a></p><p><a href="https://www.instantssl.com/http-vs-https">www.instantssl.com</a></p><h3><a href="https://www.sslshopper.com/why-ssl-the-purpose-of-using-ssl-certificates.html">Why SSL? The Purpose of using SSL Certificates</a></h3><p><a href="https://www.sslshopper.com/why-ssl-the-purpose-of-using-ssl-certificates.html"><em>SSL is the backbone of our secure Internet and it protects your sensitive information as it travels across the worlds…</em></a></p><p><a href="https://www.sslshopper.com/why-ssl-the-purpose-of-using-ssl-certificates.html">www.sslshopper.com</a></p><h3><a href="https://www.techopedia.com/definition/432/application-server">What is an Application Server? — Definition from Techopedia</a></h3><blockquote><a href="https://www.techopedia.com/definition/432/application-server">Application Server Definition — An application server is a type of server designed to install, operate and host…</a></blockquote><p><a href="https://www.techopedia.com/definition/432/application-server">www.techopedia.com</a></p><h3><a href="https://www.alooma.com/blog/types-of-modern-databases">The Types of Modern Databases | Alooma</a></h3><p><a href="https://www.alooma.com/blog/types-of-modern-databases"><em>Are you storing data from IoT devices? Running a digital content management system? What about handling configuration…</em></a></p><p><a href="https://www.alooma.com/blog/types-of-modern-databases">www.alooma.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1d27ad6dafa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>