<?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 Darpan Pathak on Medium]]></title>
        <description><![CDATA[Stories by Darpan Pathak on Medium]]></description>
        <link>https://medium.com/@darpanpathak?source=rss-b1620dfe3e59------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FPCoX6ROw8AW94LJaQcm2w.png</url>
            <title>Stories by Darpan Pathak on Medium</title>
            <link>https://medium.com/@darpanpathak?source=rss-b1620dfe3e59------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:02:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@darpanpathak/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[API Gateway vs. Load Balancer vs. Reverse proxy]]></title>
            <link>https://medium.com/@darpanpathak/api-gateway-vs-load-balancer-vs-reverse-proxy-fe94bce8afc9?source=rss-b1620dfe3e59------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe94bce8afc9</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[load-balancing]]></category>
            <dc:creator><![CDATA[Darpan Pathak]]></dc:creator>
            <pubDate>Tue, 30 Apr 2024 17:56:17 GMT</pubDate>
            <atom:updated>2024-04-30T17:56:17.141Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Performance, Security, and Scalability: An Architect’s Toolkit</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R38Ei0J1KSTiOK2KEtCBQw.png" /></figure><p>If you’ve ventured into the realm of software development, you’ve likely encountered these terms. But what exactly are API gateways, load balancers, and reverse proxies, and how do they fit into your software architecture? Aren’t they solving similar problems? Deciphering these key components can unlock opportunities to enhance the performance and scalability of your application.</p><p><strong>Imagine a bustling airport, but for APIs!</strong> ✈️</p><p>Passengers (client requests) arrive wanting to use various services (backend functionalities) like booking flights, checking luggage, and grabbing a coffee. The API Gateway acts as the terminal, directing them to the appropriate service. The Load Balancer ensures each service receives an equal flow of passengers, like a traffic controller. Finally, the Reverse Proxy acts as a security checkpoint, screening passengers before they reach their destinations.</p><p>Did you know that websites and apps like Instagram and Amazon receive billions of requests daily? How do they handle such high traffic volumes? The answer lies in their sophisticated load balancing techniques. But how are load balancers different from API gateways or reverse proxies? In this blog article we will try to understand each of these in detail.</p><h4>API Gateway</h4><p>API Gateway serves as a centralised entry point in microservices architecture, streamlining service invocations, managing authentication, and simplifying authorization rules. It acts as a gateway for client requests, enabling unified access to backend services while offering functionalities like routing, versioning, and performance monitoring.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aXDpa-hnM66te7H_ZivDkQ.gif" /></figure><p><strong>Example:</strong> Suppose you have a microservices-based e-commerce platform with separate services for user management, product catalog, and payment processing. Instead of clients directly accessing each service, they interact with the API Gateway, which then routes requests to the respective services. This simplifies client interactions and provides a unified interface for the frontend applications.</p><p>Some of the famous and frequently used API Gateways are <strong>Kong</strong>, <strong>Apigee</strong>, and <strong>AWS API Gateway.</strong></p><h4>Load Balancer</h4><p>A Load Balancer plays a pivotal role in distributing incoming network traffic across multiple servers or instances, ensuring optimal resource utilisation, preventing overload, and maintaining high availability. By evenly distributing the workload, it enhances system performance, responsiveness, and scalability, crucial for handling fluctuating traffic volumes and minimising downtime due to server failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCAzcrUJ0f1tvEoUeA4p5g.gif" /></figure><p><strong>Example:</strong> In a web application handling a surge of traffic, a Load Balancer evenly distributes incoming requests across multiple servers, preventing any single server from becoming overwhelmed. This not only improves performance but also provides fault tolerance by rerouting traffic in case of server failures.</p><p>Some common load balancer algorithms include:</p><ol><li><strong>Round Robin:</strong> This is a simple and fair approach where requests are distributed sequentially to each server in a circular fashion. Every server gets its turn to handle a request, ensuring a balanced workload over time. It’s easy to implement but may not be ideal for scenarios where servers have different processing capabilities.</li><li><strong>Least Connections:</strong> This algorithm prioritizes servers with the fewest active connections at the time of the request. This helps prevent overloading busy servers and ensures a more even distribution of traffic. Implementation involves keeping track of the number of active connections on each server.</li><li><strong>Least Response Time:</strong> Here, the load balancer analyzes the response times of each server and directs requests to the server with the quickest response time. This optimizes performance by sending requests to the most responsive servers, reducing latency for users. The implementation requires the load balancer to monitor the response times of each server.</li><li><strong>IP Hash:</strong> This algorithm uses the client’s IP address to determine which server receives the request. A hash function is applied to the IP address, and the resulting value is used to select a specific server. This approach can be beneficial for maintaining session persistence, where users are directed to the same server for subsequent requests, improving user experience for actions that require continuity. Implementation involves using a hashing function on the client’s IP address.</li><li><strong>Weighted Round Robin:</strong> This algorithm assigns different weights to servers based on their processing power or capacity. Servers with higher weights receive more traffic, allowing for a more efficient allocation of resources. This is useful if you have servers with varying capabilities. Implementation involves assigning weights to each server and modifying the round-robin selection process to consider these weights.</li></ol><h4>Reverse Proxy</h4><p>A reverse proxy serves as an intermediary between clients and backend servers, handling incoming requests on behalf of the servers. It enhances security by shielding servers from direct exposure to the internet, providing a single point of entry and enforcing access controls. Reverse proxies also improve performance through caching static content and optimizing traffic flow, resulting in faster response times and reduced server load. Additionally, they offer flexibility by enabling request routing, SSL termination, and content manipulation, making them indispensable components for modern web applications seeking enhanced security, scalability, and performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6Hsp-fCiwCUE4nSLJt3PA.gif" /></figure><p><strong>Example:</strong> Suppose you have an internal application deployed across multiple servers. By placing a Reverse Proxy like Nginx or HAProxy in front of these servers, you can hide the backend infrastructure, improve security by enforcing access controls, and leverage caching to reduce latency for frequently accessed resources.</p><h3>Key Differences:</h3><p><strong>Scope:</strong></p><ul><li>API Gateway operates at the application level, managing API traffic and providing various functionalities.</li><li>Load Balancer operates at the network or application level, distributing traffic across servers or instances.</li><li>Reverse Proxy operates at the server level, handling requests before they reach the backend servers.</li></ul><p><strong>Functionality:</strong></p><ul><li>API Gateway provides features like routing, authentication, rate limiting, and API versioning.</li><li>Load Balancer focuses on evenly distributing incoming traffic to ensure scalability and fault tolerance.</li><li>Reverse Proxy offers functionalities like SSL termination, caching, and request filtering.</li></ul><p><strong>Deployment:</strong></p><ul><li>API Gateways are typically deployed at the edge of the network, closer to the clients.</li><li>Load Balancers can be deployed both at the edge and within the internal network.</li><li>Reverse Proxies are commonly deployed in front of backend servers to handle incoming requests.</li></ul><p>While API gateways, load balancers, and reverse proxies may seem similar, they serve distinct purposes within your software architecture. API gateways focus on managing and abstracting APIs, load balancers optimize resource utilisation, and reverse proxies enhance security and performance. However, it’s important to note that these components can work together harmoniously to create a robust and scalable system.</p><p>When deciding how to utilize these components, consider the specific requirements of your application. If you have multiple microservices and need centralized API management, an API gateway can simplify your architecture. If high availability and efficient resource utilisation are your priorities, a load balancer can distribute traffic effectively. And if you want to enhance security and optimize performance, a reverse proxy can be a valuable addition.</p><p>In conclusion, understanding the roles and benefits of API gateways, load balancers, and reverse proxies can greatly improve the performance and scalability of your software architecture. By strategically incorporating these components, you can create a more efficient, secure, and user-friendly application. So, take the time to evaluate your needs and make informed choices when it comes to implementing these key elements in your software development journey.</p><p>Do you have any questions about these concepts or how they apply in specific scenarios? Let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe94bce8afc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is rate limiting?]]></title>
            <link>https://medium.com/@darpanpathak/what-is-rate-limiting-19dd067a1f95?source=rss-b1620dfe3e59------2</link>
            <guid isPermaLink="false">https://medium.com/p/19dd067a1f95</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Darpan Pathak]]></dc:creator>
            <pubDate>Sat, 06 Apr 2024 08:02:57 GMT</pubDate>
            <atom:updated>2024-04-06T08:02:57.447Z</atom:updated>
            <content:encoded><![CDATA[<p>Rate limiting is a strategic method utilised to govern the flow of requests to a service, ensuring optimal performance and availability. It helps prevent abuse and overload of the service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*2AzBM5j3gF_ifIEtbca3Tg.gif" /></figure><p>Picture it as a traffic regulator on a bustling street, orchestrating the movement of vehicles to prevent chaos. Similarly, API rate limiting regulates the flow of requests, averting server strain and fortifying against potential threats like DDoS attacks.</p><h3>Why use a rate limiter?</h3><p>Rate limiters can help with availability and performance optimisation by ensuring that a server is not overwhelmed with too many requests at once. Here is a list of reasons why I would implement a rate limiter in my system.</p><ol><li><strong>Prevention of Abuse:</strong> Rate limiters prevent abusive or malicious use of resources by limiting the rate at which requests can be made. This safeguards the system from potential exploits, such as brute force attacks, spamming, or scraping.</li><li><strong>Resource Management:</strong> By controlling the flow of incoming requests, rate limiters help manage server resources efficiently. They prevent resource exhaustion and ensure fair allocation of resources among clients, thereby improving system stability and performance.</li><li><strong>Enhanced Reliability:</strong> Rate limiting helps maintain the reliability and availability of services by preventing overloads and mitigating the risk of service disruptions due to excessive traffic spikes or denial-of-service attacks.</li><li><strong>Cost Optimisation:</strong> Limiting excessive requests can also lead to cost savings, especially in cloud environments where providers charge based on resource usage. By avoiding unnecessary usage of resources, rate limiters help optimise operational costs.</li><li><strong>Improved Quality of Service:</strong> By enforcing rate limits, systems can maintain a consistent quality of service for all users, ensuring that no single user or client monopolizes resources to the detriment of others. This can lead to increased customer satisfaction and loyalty.</li></ol><h3>Rate-Limiting Algorithms</h3><p>There are several popular rate limiting algorithms, each with its own advantages and disadvantages.</p><ul><li>Fixed Window</li><li>Sliding Window</li><li>Leakey Bucket</li><li>Token Bucket</li></ul><p><strong>Fixed Window:</strong> This is a simple approach that tracks requests within a fixed time window (e.g., 60 seconds). If a user exceeds the limit during that window, their requests are rejected. However, it doesn’t handle bursts well; if a user sends many requests at once, they’ll be blocked even if the overall rate is within the limit.</p><pre>let requests = 0;<br>const windowSize = 60; // 60 seconds<br>const maxRequests = 100; // 100 requests per window<br><br>function handleRequest() {<br>    if (requests &lt; maxRequests) {<br>        // Process request<br>        console.log(&quot;Request processed&quot;);<br>        requests++;<br>    } else {<br>        // Reject request<br>        console.log(&quot;Rate limit exceeded. Try again later.&quot;);<br>    }<br>}<br><br>setInterval(() =&gt; {<br>    requests = 0; // Reset requests count after every window<br>}, windowSize * 1000);</pre><p><strong>Sliding Window:</strong> This is a more flexible approach that tracks requests over a moving window. It considers the most recent requests within the window, allowing for bursts within a short period. This is fair to users who might have legitimate reasons for sending requests in quick succession.</p><pre>let requests = [];<br>const windowSize = 60; // 60 seconds<br>const maxRequests = 100; // 100 requests per window<br><br>function handleRequest() {<br>    const currentTime = Date.now() / 1000; // Convert milliseconds to seconds<br>    requests = requests.filter(requestTime =&gt; requestTime &gt; currentTime - windowSize);<br>    if (requests.length &lt; maxRequests) {<br>        // Process request<br>        console.log(&quot;Request processed&quot;);<br>        requests.push(currentTime);<br>    } else {<br>        // Reject request<br>        console.log(&quot;Rate limit exceeded. Try again later.&quot;);<br>    }<br>}</pre><p><strong>Leaky Bucket:</strong> This algorithm uses an analogy of a bucket with a hole at the bottom. Requests come in as water fills the bucket, and the hole allows water (requests) to leak out at a constant rate. This ensures a steady flow of requests but doesn’t handle bursts well, similar to the fixed window approach.</p><pre>class LeakyBucket {<br>    constructor(capacity, leakRate) {<br>        this.capacity = capacity; // Maximum tokens the bucket can hold<br>        this.leakRate = leakRate; // Tokens leaked per second<br>        this.tokens = 0; // Initially bucket is empty<br>        this.lastLeakTime = Date.now(); // Last time the bucket leaked<br>    }<br><br>    // Leaks tokens from the bucket based on the leak rate<br>    leak() {<br>        const now = Date.now();<br>        const timePassed = (now - this.lastLeakTime) / 1000; // Convert milliseconds to seconds<br>        const tokensToLeak = timePassed * this.leakRate;<br>        this.tokens = Math.max(0, this.tokens - tokensToLeak);<br>        this.lastLeakTime = now;<br>    }<br><br>    // Adds tokens to the bucket<br>    addTokens(tokensToAdd) {<br>        this.tokens = Math.min(this.capacity, this.tokens + tokensToAdd);<br>    }<br><br>    // Consumes tokens from the bucket if available<br>    consume(tokensRequested) {<br>        if (tokensRequested &lt;= this.tokens) {<br>            this.tokens -= tokensRequested;<br>            return true; // Tokens available, request is allowed<br>        } else {<br>            return false; // Tokens not available, request is rejected<br>        }<br>    }<br>}<br><br>// Example usage<br>const bucket = new LeakyBucket(10, 1); // Capacity: 10 tokens, Leak rate: 1 token/sec<br><br>// Continuously leak tokens from the bucket<br>setInterval(() =&gt; {<br>    bucket.leak();<br>    console.log(&quot;Tokens leaked. Tokens remaining:&quot;, bucket.tokens);<br>}, 1000); // Leak every second<br><br>// Example request handling<br>function handleRequest() {<br>    if (bucket.consume(1)) {<br>        console.log(&quot;Request processed. Tokens remaining:&quot;, bucket.tokens);<br>    } else {<br>        console.log(&quot;Request rejected. Insufficient tokens.&quot;);<br>    }<br>}<br><br>// Simulate adding tokens to the bucket<br>setTimeout(() =&gt; {<br>    bucket.addTokens(5); // Add 5 tokens after 2 seconds<br>    console.log(&quot;Tokens added to the bucket. Tokens remaining:&quot;, bucket.tokens);<br>}, 2000);<br><br>// Simulate requests<br>setTimeout(handleRequest, 500); // Request 1: Consumes 1 token<br>setTimeout(handleRequest, 1000); // Request 2: Consumes 1 token<br>setTimeout(handleRequest, 1500); // Request 3: Consumes 1 token<br>setTimeout(handleRequest, 2000); // Request 4: Consumes 1 token<br>setTimeout(handleRequest, 2500); // Request 5: Consumes 1 token</pre><p><strong>Token Bucket:</strong> This is a more versatile algorithm that uses tokens to represent allowed requests. The bucket refills at a constant rate, and users spend tokens with each request. It allows for bursts if there are enough tokens accumulated, making it suitable for scenarios where occasional bursts are expected.</p><pre>class TokenBucket {<br>    constructor(capacity, fillRate) {<br>        this.capacity = capacity; // Maximum tokens the bucket can hold<br>        this.fillRate = fillRate; // Tokens added per second<br>        this.tokens = capacity; // Initially bucket is full<br>        this.lastFillTime = Date.now(); // Last time the bucket was filled<br>    }<br><br>    // Adds tokens to the bucket based on the fill rate<br>    refill() {<br>        const now = Date.now();<br>        const timePassed = (now - this.lastFillTime) / 1000; // Convert milliseconds to seconds<br>        const tokensToAdd = timePassed * this.fillRate;<br>        this.tokens = Math.min(this.capacity, this.tokens + tokensToAdd);<br>        this.lastFillTime = now;<br>    }<br><br>    // Consumes tokens from the bucket if available<br>    consume(tokensRequested) {<br>        if (tokensRequested &lt;= this.tokens) {<br>            this.tokens -= tokensRequested;<br>            return true; // Tokens available, request is allowed<br>        } else {<br>            return false; // Tokens not available, request is rejected<br>        }<br>    }<br>}<br><br>// Example usage<br>const bucket = new TokenBucket(10, 1); // Capacity: 10 tokens, Fill rate: 1 token/sec<br><br>// Continuously refill the bucket<br>setInterval(() =&gt; {<br>    bucket.refill();<br>    console.log(&quot;Bucket refilled. Tokens available:&quot;, bucket.tokens);<br>}, 1000); // Refill every second<br><br>// Example request handling<br>function handleRequest() {<br>    if (bucket.consume(1)) {<br>        console.log(&quot;Request processed. Tokens remaining:&quot;, bucket.tokens);<br>    } else {<br>        console.log(&quot;Request rejected. Insufficient tokens.&quot;);<br>    }<br>}<br><br>// Simulate requests<br>setTimeout(handleRequest, 500); // Request 1: Consumes 1 token<br>setTimeout(handleRequest, 1000); // Request 2: Consumes 1 token<br>setTimeout(handleRequest, 1500); // Request 3: Consumes 1 token<br>setTimeout(handleRequest, 2000); // Request 4: Consumes 1 token<br>setTimeout(handleRequest, 2500); // Request 5: Consumes 1 token</pre><p>In distributed architectures, rate limiting introduces complexities such as inconsistency and race conditions:</p><ul><li>Inconsistency: Ensuring uniform limits across multiple nodes requires a global rate limiter or centralized data store, with options like sticky sessions or Redis/Cassandra.</li><li>Race Conditions: Simultaneous access to rate limit counters can lead to incorrect counts. Mitigation involves using locking mechanisms, but this can impact performance.</li></ul><p>To each of you who’ve journeyed through this article, thank you. Your dedication to understanding these intricacies speaks volumes about your commitment to building resilient systems. As we continue to innovate and evolve, may these insights serve as guiding lights in your endeavors. Happy coding, and until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19dd067a1f95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DHT11 and Arduino]]></title>
            <link>https://medium.com/@darpanpathak/dht11-and-arduino-a5369cf6b70a?source=rss-b1620dfe3e59------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5369cf6b70a</guid>
            <category><![CDATA[sensors]]></category>
            <category><![CDATA[dht11]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Darpan Pathak]]></dc:creator>
            <pubDate>Tue, 09 Jan 2018 10:48:48 GMT</pubDate>
            <atom:updated>2018-01-09T10:55:17.431Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TJMK15l-dU7nk0r2OoaOgA.jpeg" /><figcaption>DHT11 — MQ135 with Arduino</figcaption></figure><p>This was a small weekend experiment which I wanted to try for a long time. After a long time i have started experimenting with Arduino again. For my first attempt i choose to work with DHT11 temperature and humidity sensor.</p><p>To get started with this project, we need following items ready with us</p><ol><li><a href="https://www.amazon.in/gp/product/B014YUY3RC/ref=as_li_tl?ie=UTF8&amp;camp=3638&amp;creative=24630&amp;creativeASIN=B014YUY3RC&amp;linkCode=as2&amp;tag=homemadestu0e-21&amp;linkId=1dd73a28e88d762ad837475f9e18fbe7">Arduino UNO ( You can choose any version but i choose to work with UNO the basic version)</a></li><li><a href="https://www.amazon.in/gp/product/B01MXRT9DZ/ref=as_li_tl?ie=UTF8&amp;camp=3638&amp;creative=24630&amp;creativeASIN=B01MXRT9DZ&amp;linkCode=as2&amp;tag=homemadestu0e-21&amp;linkId=2070c253573e705a3cf510423d0e52b6">DHT11 Sensor ( You can find amazon link by clicking here )</a></li><li>Jumper Wires</li></ol><p>If you want to know more about the DHT11 sensor, you can check the link below</p><p><a href="http://www.uugear.com/portfolio/dht11-humidity-temperature-sensor-module/">DHT11 Humidity &amp; Temperature Sensor Module</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*uETlVLJKWFZhj5dX7g3gKg.jpeg" /><figcaption>DHT11 Sensor Versions</figcaption></figure><p>The diagram is given below, and I used a 3pin version. The good thing about DHT11 is that it gives you both humidity and temperature both.</p><p>Factsheet for DHT11</p><ul><li>Ultra low cost</li><li>3 to 5V power and I/O</li><li>2.5mA max current use during conversion (while requesting data)</li><li>Good for 20–80% humidity readings with 5% accuracy</li><li>Good for 0–50°C temperature readings ±2°C accuracy</li><li>No more than 1 Hz sampling rate (once every second)</li><li>Body size 15.5mm x 12mm x 5.5mm</li><li>3 pins with 0.1&quot; spacing</li></ul><p>The circuit that I setup is based the below diagram</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8CmCQefazwDVE1ndDKk-Cg.png" /><figcaption>DHT11 connection with arduino</figcaption></figure><p>If you see the circuit digram, you can find the connection as below</p><p>VCC of DHT11 -&gt; 5v Pin of Arduino UNO</p><p>GND of DHT11 -&gt; GND Pin of Arduino UNO</p><p>Signal pin of DHT11 -&gt; Digital Pin 2 of Arduino UNO</p><p>Things to remember that even though the circuit digram has 4 pins of DHT11, i have used 3 pin DHT11 in my project and in worked as aspected. In case you use 4 pin DHT11, you might want to attach 10k pull up resister between VCC and Signal pin of the DHT11.</p><p>To program in arduino IDE, we will have to import the DHT11 library. I have attached the link of the lib below</p><p><a href="https://github.com/darpanpathak/DHT11-arduino/blob/master/DHT.zip">https://github.com/darpanpathak/DHT11-arduino/blob/master/DHT.zip</a></p><p>and the code is given below</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b20ef4e3090fb016f22f30d1054be26/href">https://medium.com/media/8b20ef4e3090fb016f22f30d1054be26/href</a></iframe><p>In this code, we are reading temperature and humidity on the serial port. we can see the output by opening the serial port as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Df7O9IjWrU4dl-jwlnk7tQ.jpeg" /><figcaption>Output on the serial console</figcaption></figure><p>I have also logged this data in the firebase realtime database to visualise it on the web. You can see the realtime running graphs in the final output of this experiment. :-D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TJMK15l-dU7nk0r2OoaOgA.jpeg" /><figcaption>Final output with web application</figcaption></figure><p>You can find all images, library and Arduino sketch on my <a href="https://github.com/darpanpathak/DHT11-arduino">GitHub repo</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5369cf6b70a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>