<?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 Michael Hudson Nkotagu on Medium]]></title>
        <description><![CDATA[Stories by Michael Hudson Nkotagu on Medium]]></description>
        <link>https://medium.com/@m453h?source=rss-ff51a114e8ed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*I2cW2yilUDxbBx4-YRfDgg.jpeg</url>
            <title>Stories by Michael Hudson Nkotagu on Medium</title>
            <link>https://medium.com/@m453h?source=rss-ff51a114e8ed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 03:05:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@m453h/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[Difficult takes a day, Impossible takes a week or two: How I Developed Eureka Tags in Two Weeks]]></title>
            <link>https://medium.com/@m453h/difficult-takes-a-day-impossible-takes-a-week-or-two-how-i-developed-eureka-tags-in-two-weeks-8d1be07fc8d4?source=rss-ff51a114e8ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d1be07fc8d4</guid>
            <category><![CDATA[flask-framework]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Michael Hudson Nkotagu]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 20:54:14 GMT</pubDate>
            <atom:updated>2023-09-13T21:32:00.513Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*fpvE-xkXHLuTTAcL45QnVA.png" /></figure><h3>Introduction</h3><p>Eureka Tags is a web-based application that enables students and professionals in various tech-related fields such as software developers, DevOps engineers, system administrators, and data scientists, to document and organize solutions to technical problems they’ve encountered. The application provides a concise way to document and organize solutions to these problems so that whenever such a problem is encountered again there would be a central knowledge repository that can be used to retrieve the correct solution, thus saving precious time and increasing productivity. This application was developed as part of the portfolio project for the Foundations ALX Software Engineering program. I, Michael Hudson Nkotagu, am the sole developer of this project and focused on both the front-end and back-end development of the application. The development of the application took a total of three weeks, which involved planning, designing, implementation, and deployment of the application. My personal focus for this project was to create an interactive and easy-to-use application by using the Flask web application framework, JavaScript, and MySQL which were technologies I have extensively learned about and used during the foundation stages of the ALX Software Engineering program.</p><h3>Motivation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*6tZz6b3eBqFYtbxwzPWqLQ.jpeg" /><figcaption>Small things that can kill productivity</figcaption></figure><p>The motivation for this project stems from the hard lessons I’ve learned through using computers for more than half of my life. Over the course of time, I have come to accept the fact that with computers things can go wrong and they usually go wrong very fast. I remember when I was a kid, my brother and I would spend countless hours trying to install our favourite PC games. We were always learning new things, but we also made some mistakes that resulted in infecting our home computer with viruses or corrupting our files. Having little knowledge about computers and limited internet access we’d often write down in our exercise books the steps we used to solve the numerous problems we encountered and the mistakes that we made so that we’d avoid repeating them the next time. Similarly, as I started to learn and work with different programming languages I’ve often found myself writing down different solutions to my problems in different places such as notes application, sending myself an e-mail with a description of a solution, and bookmarking pages with different solutions. The fundamental with this approach in which information is scattered across multiple applications and devices is the fact I’ve often found it difficult to search for the solution I need when I face a problem I suspect I’ve already solved. This problem became more evident as I was learning a lot of new concepts within a short span of time in the ALX Software Engineering programme. Therefore I concluded that things should be better, I should not only find a way to store the solutions to various technical problems I’ve encountered but also easily retrieve them whenever needed. Thus, when it was time to work on my portfolio project it was a foregone conclusion that I would develop Eureka Tags, I believe that this project will help many people working or learning about different tech stacks document numerous solutions to different problems they’ll encounter in the exciting journey and consequently boost their productivity by making their documented solutions easy to retrieve whenever they need to refer back to them.</p><h3>Accomplishments</h3><p>Developing Eureka Tags was not an easy task because I had to juggle between working with the front end and back end within a limited amount of time. In this project, I was required to come up with a Minimum Viable Product (MVP) in two weeks. Furthermore, I was expected to make proper documentation and clean up the project files in the third week. Due to these time constraints, I chose technologies that I have consistently worked with in the ALX — Software Engineering programme to minimize the risks associated with learning a new technology stack within a short time frame. For the frontend, I chose to use HTML5, CSS3, JavaScript, jQuery, and Bootstrap 5. I opted for these languages as they were good enough to develop an interactive and responsive application user interface. Moreover, for the backend, I opted for Flask web framework and MySQL database. Despite having some previous experience working with Flask web framework, I never really had the opportunity to use it to develop a fully-fledged web application. My use case for Flask has always been developing RESTful APIs that expose a model that I developed using Python to a mobile application or a web application built using a different framework, thus this felt like a perfect opportunity for me to explore the features and libraries of the framework for developing a complete web application. I was able to successfully develop the application as per the established requirements within two weeks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RMuw9lYL65vKNlhIz_wqJw.png" /><figcaption>Eureka Tags Landing Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEIHBMbVtNsvbZbw9W2_MA.png" /><figcaption>Eureka Tags User Home Page</figcaption></figure><p>The application allows users to document a solution to a problem by creating a post, and further allows users to group the solution under a specific tag i.e. Programming language, software, etc. which allows users to easily view similar solutions under the same group. Eureka Tags allows the user to document the solution by using Markdown which is an easy-to-use lightweight markup language for creating formatted text. Eureka Tags uses a WYSIWYG editor that makes writing markdown much easier even for users who are unfamiliar with its syntax.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sd1Q9ogQyJl5FM_Ibq6Haw.png" /><figcaption>Creating a new post in Eureka Tags</figcaption></figure><p>Furthermore, Eureka Tags also supports quick searching for solutions based on the title of the content of the post created by a user. This was the most important feature of the application because the motivation for developing Eureka Tags is to make documented solutions easy to retrieve whenever they are needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ui3GuBSzFHsXkgvXbDZvZQ.png" /><figcaption>Eureka Tags Search Bar</figcaption></figure><p>Eureka Tags was deployed on a Ubuntu 20.04 server. I chose NGINX as the web server, Gunicorn as the application server, and MySQL as the database. The diagram below shows the flow of data in the application. I chose these tools in order to solidify my understanding of how they interact with each other in a production deployment of a Flask web application.</p><h3>Technical Challenges</h3><p>Throughout the development of Eureka Tags, I faced many technical challenges but perhaps the most difficult technical challenge I faced was getting the Flask templating engine (Jinja2) to safely display user posts without being susceptible to Cross-site scripting (XSS). According to OWASP, XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser-side script, to a different end user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nBHP_IDyxI3cdKyUehpW9g.png" /><figcaption>Cross-Site Scripting Attack [Source: <a href="https://www.geeksforgeeks.org/what-is-cross-site-scripting-xss/">GeeksForGeeks</a>]</figcaption></figure><p>For an application like Eureka Tags, it’s very likely that a user could intentionally or unintentionally input some code that can lead to an XSS attack. By default, Flask’s templating engine offers protection against XSS attacks by auto-escaping all dynamic content being displayed. I would have been fine with just displaying the auto-escaped content if the user was only entering text as input. But for Eureka Tags, the user enters Markdown which needs to be formatted to HTML before being displayed to the user. So if we display the auto-escaped content we end up having a lot of raw HTML tags that are not readable to our users.</p><p>Since I was rendering raw output on my application’s template in order to preserve the formatting of the user’s post I was able to confirm the existence of this vulnerability by simply creating a JavaScript code fragment below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*8Ehx3kGEnUHmvJg7hmR9Cw.png" /><figcaption>Creating a post to test XSS vulnerability</figcaption></figure><p>Instead of displaying the code fragment in a well-formatted template, the application executed the code on my browser by displaying the dialog shown in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*IOCZICkaZ5MlfHsAhoegJw.png" /><figcaption>Dialog being displayed as a result of disabling auto-escaping</figcaption></figure><p>When I chose the option to auto-escape the markdown that has been converted to HTML, I ended up having a post in a format that is not easily readable as shown in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*oTQl13rQypwELlmoD_XD4Q.png" /><figcaption>Displaying of auto-escaped HTML</figcaption></figure><p>A simple solution would be to use the safe Jinja filter to display the content as HTML, however, as seen before this is where we would introduce the XSS attack vulnerability. At this point I was confused, I’m damned if I do, damned if I don’t. So I had to find a way to display the markdown without exposing my users to an obvious vulnerability. At first, I skipped this task and continued with other development tasks but I knew I had to get back to it and find a proper solution. A week later after hours of researching and testing out a few things I found a Python library called Bleach which could be used to sanitize HTML fragments by parsing only allowed tags and attributes. This library had solved more than half of my problem, I only needed to create a custom filter that I could apply to the user post content being displayed on the template. The code fragment below shows the custom function I created for this purpose and how I added the filter to the Jinja templating engine.</p><pre>def sanitize_html(value):<br>    allowed_tags = {&#39;pre&#39;, &#39;code&#39;, &#39;p&#39;, &#39;strong&#39;, &#39;em&#39;, &#39;h1&#39;, &#39;a&#39;,<br>                    &#39;abbr&#39;, &#39;acronym&#39;, &#39;b&#39;, &#39;blockquote&#39;, &#39;li&#39;, &#39;strong&#39;,<br>                    &#39;ul&#39;, &#39;br&#39;, &#39;hr&#39;}<br>    allowed_attributes = {<br>        &#39;*&#39;: [&#39;class&#39;],<br>        &#39;a&#39;: [&#39;href&#39;, &#39;rel&#39;, &#39;title&#39;],<br>    }<br>    return bleach.clean(value, tags=allowed_tags,<br>                        attributes=allowed_attributes)<br><br># Add the functions to sanitize HTML in the Jinja Templating engine<br>app.jinja_env.filters[&#39;sanitize&#39;] = sanitize_html</pre><p>After creating the filter I used it in the template that was used for rendering the user post as shown in the code fragment below.</p><pre>&lt;p&gt;{{ post.content|sanitize|safe }}&lt;/p&gt;</pre><p>This solution worked like a charm as shown in the screenshot below and I was on my way toward deploying my application with the desired output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*nsifXOIG_ueoSRE85g9Ogg.png" /><figcaption>The correct output of the entered code fragment</figcaption></figure><h3>Lessons Learned:</h3><p>Working on this project on my own worked as a self-discovery journey. Having worked on both the backend and frontend development tasks of this project, I found myself enjoying the frontend development tasks more and helped me to finally decide that I need to learn more and specialize on the frontend development track for the final three months of my ALX Software Engineering Programme.</p><p>In this project I used jQuery and Bootstrap 5 as the main frameworks for developing the application’s user interface, even though these technologies are stable and mature, I firmly believe that I can improve the interactivity, visual appearance, and maintainability of my application by adopting TailwindCSS and React.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*944ZQ404TYgv7aZmSIcGIA.png" /><figcaption>There are so many frontend frameworks that could be used for this project</figcaption></figure><p>I am looking forward to learning advanced concepts in React during my specialization track. Lastly, through this project, I was able to confirm that Flask is a very flexible and capable framework that can be used to develop complex fully-fledged web applications.</p><h3>About Me</h3><p>My name is Michael Hudson Nkotagu, I am an enthusiastic student in Cohort 11 of the Software Engineering program at ALX Africa. Over the last year, I have dedicated myself to mastering a diverse range of skills, ranging from the foundational principles to advanced techniques in Shell Scripting, C, Python, JavaScript, and DevOps. I am eager to use the skills and knowledge I have learned in this program to work on exciting and challenging software engineering projects.</p><p>Checkout Eureka Tags on Github: <a href="https://github.com/m453h/Eureka_tags">https://github.com/m453h/Eureka_tags</a></p><p>See Eureka Tags in action: <a href="http://m453h.tech/register">http://m453h.tech/register</a></p><p>View Eureka Tags’ landing page: <a href="http://m453h.tech/">http://m453h.tech/</a></p><p>Connect with me via LinkedIn:<a href="http://www.linkedin.com/in/michael-hudson-nkotagu"> www.linkedin.com/in/michael-hudson-nkotagu</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d1be07fc8d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What happens when you enter Google.com?]]></title>
            <link>https://medium.com/@m453h/what-happens-when-you-enter-google-com-dbd9d23d1334?source=rss-ff51a114e8ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbd9d23d1334</guid>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Michael Hudson Nkotagu]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 13:04:12 GMT</pubDate>
            <atom:updated>2023-07-16T14:59:16.793Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>What happens when you type </strong><a href="https://www.google.co/">https://www.google.co</a>m in your browser and press Enter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9_4Z2UuuF7wXFjQizwKrFg.jpeg" /><figcaption>Google Search Homepage</figcaption></figure><p>“Let me Google it!” ….it’s a popular phrase we use when we refer to searching for information over the internet. Our journey to search for information starts with opening a web browser, typing “https://www.google.com”, and pressing enter. A lot of things happen in the background for you to get the Google web page and in this post, I shall demystify what exactly happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrcLMGGyu5I2mHkG3UkkKA.png" /><figcaption>Schema of what happens when you type <a href="https://www.google.com/">https://www.google.com</a> and press enter on your browser</figcaption></figure><p>In summary, the following happens when you type “<a href="https://www.google/">https://www.google</a>.com” in your web browser and press enter:</p><p><strong>1.</strong> <strong>Sending a DNS Request: </strong>The Google web page that you request through your web browser is stored in some server with a certain IP address. Luckily you don’t have to memorize the IP address and that’s where the (Domain Name System) DNS server comes to the rescue, it acts as the internet’s phone book. So when you type “<a href="https://www.google.com/">https://www.google.com</a>” your web browser sends a request to a DNS server which will send back the IP address that has the page you are requesting. This is similar to how you search for a person’s name in the phonebook and get their exact phone number so that you can contact them</p><p><strong>2.</strong> <strong>Making TCP/IP connection: </strong>once the DNS server has returned the IP address for “https://www.google.com” the web browser moves towards establishing a TCP/IP (Transmission Control Protocol/Internet Protocol) connection.</p><p><strong>3.</strong> <strong>The Firewall:</strong> the browser’s request will pass through several firewalls which act as a security barrier. The firewall could be on your computer which will check if you can send the request out to the destination server. The destination server (Google) definitely will have a firewall that checks if the incoming request is allowed to go through. Firewalls help protect computers against unauthorized access and potential security threats, they do this by examining if the outgoing and incoming traffic adheres to predefined rules that ensure security.</p><p><strong>4.</strong> <strong>Sending a request over HTTPS/SSL:</strong> Once the connection is established, the browser and the Google server negotiate a secure communication channel using HTTPS (Hypertext Transfer Protocol Secure) with SSL (Secure Sockets Layer) or, TLS (Transport Layer Security). This ensures that the data that will be shared between the client and the server are encrypted, thus ensuring a secure exchange of information.</p><p><strong>5.</strong> <strong>Load Balancer:</strong> Google has many incoming requests, thus they don’t just have one server, they have multiple servers. Therefore, your request initially reaches a load balancer which efficiently distributes incoming network traffic across a group of web servers. The load balancer ensures no single server becomes overwhelmed with requests thus improving the response times.</p><p><strong>6.</strong> <strong>Web Server:</strong> the appropriate web server will receive a forwarded request from the load balancer, parse the request, retrieve the required resources such as HTML, CSS, and JavaScript files and generate a response back to the web browser.</p><p><strong>7.</strong> <strong>Application Server and Database:</strong> The application server comes into play whenever you need dynamic content. The web server communicates with the application server to allow it to process a request that needs some dynamic processing; sometimes this request can require reading of information stored in a database. Such information could include things like your user account details and the last known location that Google uses to return more relevant results to you. After fetching and processing this relevant information the web server will take all of this information and return it as a response to the user’s browser.</p><p><strong>8.</strong> <strong>Rendering the page: </strong>The web browser receives a response from a server which usually contains HTML, CSS and JavaScript. The web browser processes this response and renders a page that you can interact with.</p><p>Now that we have discussed what happens in summary we can deep dive into the details of what happens in each step.</p><h4><strong>1. Sending a DNS request</strong></h4><p>The Domain Name System (DNS) is an important part of the web infrastructure; it acts as the phonebook of the Internet. We use web browsers to access information online through domain names, like google.com, the web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load internet resources.</p><p>So the next time you type something like “https://<a href="http://www.google.com/">www.google.com</a>” in your web browser and press enter you should appreciate the fact that your web browser needs to translate this to an IP address so that it knows where to send your request. The translation of domain names to IP addresses follows the following series of steps:</p><p><em>i.</em> <em>The computer initiates a DNS lookup process, this starts by checking the local cache (which stores previously resolved domain names and their corresponding IP addresses) to see if it has recently resolved the domain name.</em></p><p><em>ii.</em> <em>If the domain name is present in the local DNS cache, then the IP address is retrieved directly, and the lookup process ends. We can clearly see that the cache helps speed up subsequent requests to the same domain.</em></p><p><em>iii.</em> <em>If the domain name is not found in the local DNS cache, your computer sends a request to other computers known as Recursive DNS. These servers have their local cache, much like your computer. These servers are maintained by your Internet Service Provider (ISP), if the domain name is present in the server’s cache then the IP will be returned to the client’s web browser.</em></p><p><em>iv.</em> <em>If the recursive DNS server(s) don’t have the information stored in their cache memory, then the query then continues up the chain of authoritative DNS servers. The search will continue until it finds a nameserver for the domain and returns back the IP address to the browser.</em></p><p>Once the IP address has been found (resolved) it will be stored in the local DNS cache so that the next time you request the same domain name, the process becomes faster.</p><h4><strong>2.</strong> <strong>Making TCP/IP connection</strong></h4><p>Computers follow a certain set of rules (protocols) when they communicate with each other. The Transmission Control Protocol/Internet Protocol (TCP/IP) plays a vital role in establishing and managing connections between clients and servers while facilitating seamless transmission of data. In order to establish</p><p><strong><em>i.</em></strong> <strong><em>Request Initiation:</em></strong><em> When you enter a URL like “google.com” in your web browser, and the domain name gets successfully translated to an IP address of the server you have requested information from, the web browser uses TCP/IP to initiate a connection with the server.</em></p><p><strong><em>ii.</em></strong> <strong><em>Handshake</em></strong><em>: The browser sends a TCP/IP request to the server, indicating its intention to establish a connection. The server responds with an acknowledgement, which basically confirms the acceptance of the client’s request. This exchange of messages is known as the handshake process, ensuring both parties are ready to transmit data.</em></p><p><strong><em>iii.</em></strong> <strong><em>Reliable Data Transmission:</em></strong><em> With the connection successfully established the browser sends requests for specific resources (for example the homepage of google.com). These requests are transmitted using TCP, which guarantees the reliable delivery of data packets to the server in the correct order.</em></p><p><strong><em>iv.</em></strong> <strong><em>Server Response:</em></strong><em> when the server receives the request, it processes it and creates a response. The response typically contains HTML, CSS, and JavaScript content for the requested webpage which is also sent back to the browser using TCP/IP.</em></p><p><strong>v.</strong> <strong><em>Rendering the Webpage:</em></strong><em> The browser receives the response from the server, parses it and renders the complete web page.</em></p><p>Throughout this process, TCP/IP ensures the seamless transmission of data packets, managing their reliable delivery, flow control, and error detection. IP handles addressing and routing, enabling data to travel across networks, while TCP ensures that data reaches its destination accurately and efficiently.</p><p>By working together, TCP/IP establishes a robust and dependable connection between your browser and the server, enabling the retrieval and display of web content in a smooth and efficient manner.</p><h4><strong>3.</strong> <strong>The firewall</strong></h4><p>A firewall plays a crucial role in protecting computers that communicate over a large network like the Internet. The firewall acts as a layer of protection or a protection barrier between a computer network and external networks. It actively utilizes pre-established security rules to monitor and regulate incoming and outgoing network traffic by examining data packets for malicious code or attack vectors that have already been established as threats. When a firewall detects that a packet is malicious, it prevents the packet from reaching your computer.</p><p>When you send a request to “https://<a href="http://www.google.com/">www.google.com</a>” the browser’s request will pass through several firewalls. The firewall could be on your computer which will check if you can send the request out to the destination server. The destination server (Google) definitely will have a firewall that checks if the incoming request is allowed to go through. Therefore, if the request you have sent to Google aligns with the rules they have defined by their firewall it will be cleared to go through the server and thus allow you to request access to specific resources from Google’s servers.</p><h4><strong>4.</strong> <strong>Sending a request over HTTPS/SSL</strong></h4><p>When your client (web browser) needs to access content from a web server (s) it uses the Hypertext Transfer Protocol (HTTP). HTTP is an <a href="https://en.wikipedia.org/wiki/Application_Layer">application-layer</a> protocol for transmitting hypermedia documents, such as HTML. It is a protocol specifically designed for communication between web browsers and web servers. Most modern websites prioritize the use of HTTPS (Hypertext Transfer Protocol Secure). HTTPS uses the SSL/TLS protocol to encrypt communications to prevent attackers from stealing your valuable data. SSL/TLS also confirms that a website server is who it says it is, preventing impersonations. HTTPS effectively plays an important role in preventing multiple kinds of cyber-attacks such as eavesdropping, data tampering, and unauthorized access.</p><p><em>i.</em> <em>The user enters a URL with the “https://” prefix into the browser’s address bar, indicating their intention to access a secure website. Most modern web servers are configured to redirect requests to unsecured resources (HTTP) to HTTPS. This can be observed when you type </em><a href="http://www.google.com/"><em>http://www.google.com</em></a><em> you will always be redirected to the https:// version of the website.</em></p><p><em>ii.</em> <em>When the browser receives the URL the user wants to access it initiates an SSL handshake by sending a request to the server hosting the website. The request includes the supported SSL/TLS versions and encryption algorithms.</em></p><p><em>iii.</em> <em>The server responds with its SSL certificate, which includes a public key and other details about the website. The certificate is typically issued by a trusted Certificate Authority (CA) and is used to verify the server’s identity.</em></p><p><em>iv.</em> <em>The browser checks the SSL certificate to ensure it is valid and authentic. It verifies the certificate’s digital signature, expiration date, and issuer’s information.</em></p><p><em>v.</em> <em>If the certificate is deemed valid, the browser generates a unique session key and encrypts it using the server’s public key from the SSL certificate. This encrypted session key is then sent to the server.</em></p><p><em>vi.</em> <em>The server receives the encrypted session key and decrypts it using its corresponding private key, which is securely stored. This establishes a shared session key between the browser and the server.</em></p><p><em>vii.</em> <em>With the shared session key, the browser and the server can now establish a secure encrypted connection. All subsequent communications between the client and browser will be encrypted and decrypted using the shared session key. Therefore all client requests and server responses will only be readable by the client and server. This effectively ensures that sensitive information such as login credentials, and personal data remain secure during transmission.</em></p><h4><strong>5. Load Balancer:</strong></h4><p>Can you imagine the number of search requests Google receives in a day? According to internet live stats they estimate that Google receives a total of 3.5 Billion search requests in a day. All of these requests can’t be handled by one server alone. Google has multiple servers to handle this massive load of users. But how are the requests distributed to these multiple servers? This is where load balancers come into play.</p><p>A load balancer acts as a traffic distributor, evenly distributing incoming requests across multiple servers to optimize performance, ensure high availability, and prevent any single server from being overwhelmed by the massive volume of requests. Load balancers are an essential component of large-scale websites and applications, allowing them to handle massive amounts of traffic efficiently.</p><p>So when you enter “<a href="https://www.google.com/">https://www.google.com</a>” and press enter on your browser your request is initially routed to a load balancer. The load balancer intelligently distributes the incoming request to one of the available web servers in a fair and balanced manner. This balancing ensures that each server receives a fair share of the workload, preventing any single server from being overloaded.</p><h4><strong>6. Web Server:</strong></h4><p>A web server can refer to hardware, software or both of them working together to process and deliver website files to web browsers. Therefore, the load balancer forwards the user’s requests to an appropriate web server which will parse this request to understand what files it should deliver to the web browser as the response. Webservers usually provide resources such as HTML, CSS and JavaScript files as part of their response.</p><h4><strong>7. Application Server and Database:</strong></h4><p>The application server comes into play whenever you need dynamic content. The web server communicates with the application server to allow it to process a request that needs some dynamic processing; sometimes this request can require reading of information stored in a database. Such information could include things like your user account details and the last known location that Google uses to return more relevant results to you. After fetching and processing this relevant information the web server will take all of this information and return it as a response to the user’s browser.</p><h4><strong>8.</strong> <strong>Rendering the page:</strong></h4><p>The web browser receives a response from a server which usually contains HTML, CSS and JavaScript. The web browser processes this response and renders a page that you can interact with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbd9d23d1334" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>