<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[CareerByteCode’s Substack: Tech Queries]]></title><description><![CDATA[You ask anything in https://substack.com/chat/ space...we will provide the answers]]></description><link>https://careerbytecode.substack.com/s/tech-queries</link><image><url>https://substackcdn.com/image/fetch/$s_!DK3n!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe12a63db-0058-4a43-91d6-ab0fa98ba988_474x474.png</url><title>CareerByteCode’s Substack: Tech Queries</title><link>https://careerbytecode.substack.com/s/tech-queries</link></image><generator>Substack</generator><lastBuildDate>Mon, 01 Jun 2026 07:50:57 GMT</lastBuildDate><atom:link href="https://careerbytecode.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[CareerByteCode]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[careerbytecode@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[careerbytecode@substack.com]]></itunes:email><itunes:name><![CDATA[CareerByteCode]]></itunes:name></itunes:owner><itunes:author><![CDATA[CareerByteCode]]></itunes:author><googleplay:owner><![CDATA[careerbytecode@substack.com]]></googleplay:owner><googleplay:email><![CDATA[careerbytecode@substack.com]]></googleplay:email><googleplay:author><![CDATA[CareerByteCode]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[50 Real-World Python Projects to Master Automation, Scripting, APIs, Data Processing, and DevOps Essentials – A Hands-On Portfolio for Job-Ready Developers and Career Switchers]]></title><description><![CDATA[Python project scenarios span across diverse domains and tackle real-world automation, scripting, data handling, and application development challenges.]]></description><link>https://careerbytecode.substack.com/p/50-real-world-python-projects-to-master-automation-scripting-apis-data-processing-and-devops-essentials-a-hands-on-portfolio-for-job-ready-developers-and-career-switchers</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/50-real-world-python-projects-to-master-automation-scripting-apis-data-processing-and-devops-essentials-a-hands-on-portfolio-for-job-ready-developers-and-career-switchers</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sun, 29 Jun 2025 21:22:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6-Lb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6-Lb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6-Lb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!6-Lb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!6-Lb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!6-Lb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6-Lb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:446683,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/162317366?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6-Lb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!6-Lb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!6-Lb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!6-Lb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F882eb4e2-011a-4e18-865f-84c2ea987f7a_1280x720.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>&#129504; <strong>Summary of the 50 Python Exercises</strong></h2><p>These 50 real-time Python project scenarios span across diverse domains and tackle real-world automation, scripting, data handling, and application development challenges. Here's a categorized breakdown:</p><h3>&#128295; <strong>Core Python Automation &amp; Scripting (Scenarios 1&#8211;12, 25&#8211;26, 39&#8211;40, 50)</strong></h3><ul><li><p>File handling (reading/writing CSV, JSON, and text)</p></li><li><p>Automating backups, scheduling with cron, organizing files</p></li><li><p>Sending emails and SMS alerts</p></li><li><p>Compressing/decompressing files</p></li><li><p>Verifying file existence</p></li></ul><h3>&#127760; <strong>Web Scraping &amp; APIs (Scenarios 3, 15, 27, 36, 42, 43, 48)</strong></h3><ul><li><p>Real-time data extraction from websites and PDFs</p></li><li><p>Working with REST APIs (GET, POST)</p></li><li><p>Automating social media actions</p></li><li><p>Building REST APIs using Flask</p></li></ul><h3>&#128202; <strong>Data Processing &amp; Analytics (Scenarios 2, 14, 19, 20, 28, 29, 33, 35, 37, 38, 44, 49)</strong></h3><ul><li><p>Cleaning, validating, sorting, and filtering structured data</p></li><li><p>Real-time stream processing</p></li><li><p>Predictive analytics (linear regression)</p></li><li><p>Handling large datasets efficiently</p></li></ul><h3>&#128272; <strong>Security, Auth &amp; System Monitoring (Scenarios 8, 16, 24, 29, 41)</strong></h3><ul><li><p>Logging, error monitoring</p></li><li><p>Encrypting, decrypting, and hashing sensitive data</p></li><li><p>Environment variable management</p></li><li><p>User authentication systems</p></li></ul><h3>&#128230; <strong>Working with Formats (Scenarios 13, 17, 22, 23, 34, 43)</strong></h3><ul><li><p>JSON, XML, regex, and log parsing</p></li><li><p>Data validation and structure checks</p></li><li><p>Caching for performance optimization</p></li></ul><h3>&#128187; <strong>Interactive Apps &amp; GUI (Scenarios 5, 6, 18, 32, 46, 47)</strong></h3><ul><li><p>CLI applications</p></li><li><p>Simple GUI with Tkinter</p></li><li><p>Chatbot development</p></li><li><p>Lottery number generators</p></li><li><p>Input validation and interactive logic</p></li></ul><h3>&#129514; <strong>Testing, Utilities &amp; Project Readiness (Scenarios 7, 10, 21, 31, 45)</strong></h3><ul><li><p>Generating test data</p></li><li><p>Multi-threading</p></li><li><p>Unit testing</p></li><li><p>Image processing</p></li><li><p>UUID creation</p></li></ul><div><hr></div><h2>&#127891; <strong>How Students Benefit from These Exercises</strong></h2><h3>&#9989; 1. <strong>Hands-On Practice</strong></h3><p>Students don&#8217;t just learn theory&#8212;they <strong>apply Python to solve practical problems</strong>. This boosts retention and develops coding intuition.</p><h3>&#9989; 2. <strong>End-to-End Thinking</strong></h3><p>From <strong>input validation</strong> to <strong>data transformation</strong>, and <strong>report generation to delivery</strong>, these scenarios teach complete solution-building&#8212;not just code snippets.</p><h3>&#9989; 3. <strong>Real-World Relevance</strong></h3><p>Each scenario is inspired by actual industry use cases:</p><ul><li><p>Automated reporting and monitoring (common in DevOps/SRE roles)</p></li><li><p>Data parsing and cleanup (used in Data Engineering &amp; Analytics)</p></li><li><p>REST API development (used in Backend &amp; Full Stack roles)</p></li><li><p>Security and encryption (vital in any production-grade software)</p></li></ul><h3>&#9989; 4. <strong>Tool &amp; Library Exposure</strong></h3><p>Learners explore:</p><ul><li><p>Core libraries (<code>os</code>, <code>csv</code>, <code>json</code>, <code>datetime</code>, <code>logging</code>)</p></li><li><p>Web libraries (<code>requests</code>, <code>beautifulsoup4</code>)</p></li><li><p>Data libraries (<code>pandas</code>, <code>numpy</code>, <code>scikit-learn</code>)</p></li><li><p>GUI and automation tools (<code>Tkinter</code>, <code>smtplib</code>, <code>shutil</code>)</p></li><li><p>Security tools (<code>hashlib</code>, <code>cryptography</code>)</p></li></ul><p>This exposure builds <strong>tool confidence</strong>, a key trait of job-ready Python developers.</p><h3>&#9989; 5. <strong>Transferable Knowledge</strong></h3><p>These exercises don&#8217;t lock learners into a single domain. Whether they're targeting:</p><ul><li><p>Automation roles</p></li><li><p>Data Science</p></li><li><p>DevOps</p></li><li><p>Web Development</p></li><li><p>API Integration<br>They&#8217;re getting <strong>reusable Python foundations</strong> for all.</p></li></ul><div><hr></div><h2>&#128204; <strong>Final Note</strong></h2><p>This curated set of <strong>50 real-time project exercises</strong> offers the <strong>perfect blend of breadth and depth</strong>. Students can start from simple automation and move to API integrations, predictive analytics, system utilities, and even build end-to-end CLI or GUI apps. It&#8217;s a <strong>self-contained mini-curriculum</strong> for practical Python mastery.</p><p>&#127919; <strong>Next Step</strong>: Encourage students to document each project, upload to GitHub, and create short blog posts or LinkedIn content around each&#8212;building their <strong>portfolio and personal brand</strong> simultaneously.</p><p></p><p>Github : - <a href="https://github.com/cbcstudent/python-challenge.git">Python-Challenge</a></p><p></p><h2>50 real-time Python project scenarios</h2><div><hr></div><h3><strong>Scenario 1: File Processing and Automation</strong></h3><ul><li><p><strong>Problem Statement:</strong> Automating the process of reading and writing to files for data extraction and storage.</p></li><li><p><strong>Detailed Scenario:</strong> A project requires automating the task of reading large data files (e.g., CSV or JSON), extracting useful information, and writing the extracted data into new files for further processing.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s file handling functions to read the data, process it, and write the output to new files.</p></li><li><p><strong>Tools and Modules:</strong> <code>os</code>, <code>sys</code>, <code>json</code>, <code>csv</code></p></li></ul><div><hr></div><h3><strong>Scenario 2: Batch File Data Processing</strong></h3><ul><li><p><strong>Problem Statement:</strong> Processing a batch of text files to clean and format data.</p></li><li><p><strong>Detailed Scenario:</strong> A system receives a batch of unstructured text files. The goal is to clean the data by removing unwanted characters and reformatting it into a standard structure.</p></li><li><p><strong>Usecase Approach:</strong> Open and process each file using Python&#8217;s file handling and string manipulation methods to clean the content.</p></li><li><p><strong>Tools and Modules:</strong> <code>os</code>, <code>re</code>, <code>sys</code></p></li></ul><div><hr></div><h3><strong>Scenario 3: Web Scraping for Real-Time Data Extraction</strong></h3><ul><li><p><strong>Problem Statement:</strong> Extracting real-time data from a website for analysis.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to scrape data from a webpage regularly to monitor specific metrics (e.g., stock prices, weather data).</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>requests</code> module to fetch the webpage and <code>BeautifulSoup</code> to extract the relevant data.</p></li><li><p><strong>Tools and Modules:</strong> <code>requests</code>, <code>beautifulsoup4</code></p></li></ul><div><hr></div><h3><strong>Scenario 4: Sending Automated Emails with Attachments</strong></h3><ul><li><p><strong>Problem Statement:</strong> Sending an automated email with a report attached.</p></li><li><p><strong>Detailed Scenario:</strong> The system generates a daily report, which should be sent automatically to a list of recipients, including an attachment.</p></li><li><p><strong>Usecase Approach:</strong> Use the <code>smtplib</code> module to send emails and attach reports generated via Python.</p></li><li><p><strong>Tools and Modules:</strong> <code>smtplib</code>, <code>email</code>, <code>os</code></p></li></ul><div><hr></div><h3><strong>Scenario 5: Simple Calculator Application</strong></h3><ul><li><p><strong>Problem Statement:</strong> Creating a simple calculator application.</p></li><li><p><strong>Detailed Scenario:</strong> Develop a Python application that can perform basic arithmetic operations (addition, subtraction, multiplication, division) based on user input.</p></li><li><p><strong>Usecase Approach:</strong> Define functions to handle different operations and take user input dynamically.</p></li><li><p><strong>Tools and Modules:</strong> None (Pure Python)</p></li></ul><div><hr></div><h3><strong>Scenario 6: Data Validation for User Inputs</strong></h3><ul><li><p><strong>Problem Statement:</strong> Validating user input for correctness.</p></li><li><p><strong>Detailed Scenario:</strong> An application accepts user inputs for a form. The input needs to be validated to ensure it is in the correct format (e.g., email, phone number).</p></li><li><p><strong>Usecase Approach:</strong> Use regular expressions to validate input patterns and ensure proper formatting.</p></li><li><p><strong>Tools and Modules:</strong> <code>re</code>, <code>sys</code></p></li></ul><div><hr></div><h3><strong>Scenario 7: Generating Unique IDs for Users</strong></h3><ul><li><p><strong>Problem Statement:</strong> Automatically generating unique IDs for new users.</p></li><li><p><strong>Detailed Scenario:</strong> Each new user registration needs to be assigned a unique identifier that will be used across different systems.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>uuid</code> module to generate unique user IDs.</p></li><li><p><strong>Tools and Modules:</strong> <code>uuid</code></p></li></ul><div><hr></div><h3><strong>Scenario 8: Logging Errors and Exceptions</strong></h3><ul><li><p><strong>Problem Statement:</strong> Logging application errors for troubleshooting.</p></li><li><p><strong>Detailed Scenario:</strong> An application needs to log errors, exceptions, and events for debugging and monitoring purposes.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>logging</code> module to log messages with different severity levels.</p></li><li><p><strong>Tools and Modules:</strong> <code>logging</code></p></li></ul><div><hr></div><h3><strong>Scenario 9: Managing Files in Directories</strong></h3><ul><li><p><strong>Problem Statement:</strong> Organizing files into different folders based on criteria.</p></li><li><p><strong>Detailed Scenario:</strong> An application needs to automatically move files to different directories based on file type (e.g., <code>.txt</code>, <code>.csv</code>).</p></li><li><p><strong>Usecase Approach:</strong> Use the <code>os</code> module to create directories and move files based on extensions.</p></li><li><p><strong>Tools and Modules:</strong> <code>os</code></p></li></ul><div><hr></div><h3><strong>Scenario 10: Random Data Generation for Testing</strong></h3><ul><li><p><strong>Problem Statement:</strong> Generating random data for testing purposes.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs random numbers, dates, or strings for stress testing and performance evaluations.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>random</code> and <code>datetime</code> modules to generate random data.</p></li><li><p><strong>Tools and Modules:</strong> <code>random</code>, <code>datetime</code></p></li></ul><div><hr></div><h3><strong>Scenario 11: Scheduling Tasks with Cron Jobs</strong></h3><ul><li><p><strong>Problem Statement:</strong> Scheduling Python scripts to run periodically.</p></li><li><p><strong>Detailed Scenario:</strong> A Python script needs to be executed at specific intervals (e.g., every hour or once a day).</p></li><li><p><strong>Usecase Approach:</strong> Use <code>cron</code> (Linux) or <code>schedule</code> library to set up automatic task scheduling.</p></li><li><p><strong>Tools and Modules:</strong> <code>schedule</code>, <code>os</code></p></li></ul><div><hr></div><h3><strong>Scenario 12: Formatting Date and Time Data</strong></h3><ul><li><p><strong>Problem Statement:</strong> Converting dates to different formats.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to handle multiple date formats from various systems and convert them into a standard format.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>datetime</code> module to parse and format date and time data.</p></li><li><p><strong>Tools and Modules:</strong> <code>datetime</code></p></li></ul><div><hr></div><h3><strong>Scenario 13: Handling JSON Data</strong></h3><ul><li><p><strong>Problem Statement:</strong> Reading and writing JSON data for web APIs.</p></li><li><p><strong>Detailed Scenario:</strong> An application interacts with web APIs that provide data in JSON format. The application needs to process this data and save it to a file or database.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>json</code> module to parse JSON data and convert it into Python objects.</p></li><li><p><strong>Tools and Modules:</strong> <code>json</code></p></li></ul><div><hr></div><h3><strong>Scenario 14: Automating CSV Data Processing</strong></h3><ul><li><p><strong>Problem Statement:</strong> Reading and analyzing CSV files for data insights.</p></li><li><p><strong>Detailed Scenario:</strong> A CSV file needs to be read, and certain data points must be extracted for analysis (e.g., average salary from employee records).</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>csv</code> module to read and process CSV files.</p></li><li><p><strong>Tools and Modules:</strong> <code>csv</code></p></li></ul><div><hr></div><h3><strong>Scenario 15: Working with Web APIs</strong></h3><ul><li><p><strong>Problem Statement:</strong> Fetching data from a web API.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to interact with a public API, sending requests and processing the response to extract relevant data.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>requests</code> module to send HTTP requests and parse the JSON or XML responses.</p></li><li><p><strong>Tools and Modules:</strong> <code>requests</code></p></li></ul><div><hr></div><h3><strong>Scenario 16: User Authentication System</strong></h3><ul><li><p><strong>Problem Statement:</strong> Implementing user authentication in an application.</p></li><li><p><strong>Detailed Scenario:</strong> A system needs to authenticate users with a username and password, using hashed password storage for security.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>hashlib</code> for password hashing and compare the stored hash with the entered password.</p></li><li><p><strong>Tools and Modules:</strong> <code>hashlib</code>, <code>os</code></p></li></ul><div><hr></div><h3><strong>Scenario 17: Parsing and Analyzing Log Files</strong></h3><ul><li><p><strong>Problem Statement:</strong> Parsing server log files for error detection.</p></li><li><p><strong>Detailed Scenario:</strong> A system needs to parse large log files, looking for specific error messages and generating a report.</p></li><li><p><strong>Usecase Approach:</strong> Use Python to read log files, search for specific strings, and generate reports.</p></li><li><p><strong>Tools and Modules:</strong> <code>os</code>, <code>re</code>, <code>sys</code></p></li></ul><div><hr></div><h3><strong>Scenario 18: Creating an Interactive CLI Application</strong></h3><ul><li><p><strong>Problem Statement:</strong> Developing a command-line application that interacts with the user.</p></li><li><p><strong>Detailed Scenario:</strong> Create an interactive Python program that asks the user for input and performs tasks like calculation or data retrieval.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s built-in functions to gather user input and provide feedback.</p></li><li><p><strong>Tools and Modules:</strong> None (Pure Python)</p></li></ul><div><hr></div><h3><strong>Scenario 19: Optimizing Database Queries</strong></h3><ul><li><p><strong>Problem Statement:</strong> Optimizing SQL queries for faster results.</p></li><li><p><strong>Detailed Scenario:</strong> A Python application interacts with a SQL database. The goal is to improve the performance of queries that retrieve large datasets.</p></li><li><p><strong>Usecase Approach:</strong> Use indexing, limit the number of rows fetched, or use batch processing to improve query performance.</p></li><li><p><strong>Tools and Modules:</strong> <code>sqlite3</code>, <code>os</code></p></li></ul><div><hr></div><h3><strong>Scenario 20: Validating JSON Data Structure</strong></h3><ul><li><p><strong>Problem Statement:</strong> Ensuring that incoming JSON data has the correct structure.</p></li><li><p><strong>Detailed Scenario:</strong> The system receives JSON data from an external service. It needs to validate whether the data contains the required fields and is in the correct format.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>json</code> module to load the data and check the structure with conditional statements.</p></li><li><p><strong>Tools and Modules:</strong> <code>json</code></p></li></ul><div><hr></div><h3><strong>Scenario 21: Multi-Threading for Performance Optimization</strong></h3><ul><li><p><strong>Problem Statement:</strong> Speeding up a computationally intensive task by using multiple threads.</p></li><li><p><strong>Detailed Scenario:</strong> An application performs a computationally intensive task that needs to be optimized using multi-threading to handle multiple tasks concurrently.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>threading</code> module to execute tasks in parallel.</p></li><li><p><strong>Tools and Modules:</strong> <code>threading</code></p></li></ul><div><hr></div><h3><strong>Scenario 22: Parsing XML Data</strong></h3><ul><li><p><strong>Problem Statement:</strong> Extracting specific data from an XML document.</p></li><li><p><strong>Detailed Scenario:</strong> The system receives an XML file from an external source and needs to extract certain tags or elements for further processing.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>xml.etree.ElementTree</code> module to parse XML data and extract required elements.</p></li><li><p><strong>Tools and Modules:</strong> <code>xml.etree.ElementTree</code></p></li></ul><div><hr></div><h3><strong>Scenario 23: Working with Regular Expressions</strong></h3><ul><li><p><strong>Problem Statement:</strong> Searching for patterns in text using regular expressions.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to search for specific patterns (like email addresses) in a block of text.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>re</code> module to define regular expressions and search for matches.</p></li><li><p><strong>Tools and Modules:</strong> <code>re</code></p></li></ul><div><hr></div><h3><strong>Scenario 24: Handling Environment Variables</strong></h3><ul><li><p><strong>Problem Statement:</strong> Managing configuration settings using environment variables.</p></li><li><p><strong>Detailed Scenario:</strong> The application stores sensitive credentials or configuration settings in environment variables to keep them secure.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>os.environ</code> to access environment variables and load configuration data.</p></li><li><p><strong>Tools and Modules:</strong> <code>os</code></p></li></ul><div><hr></div><h3><strong>Scenario 25: File Compression and Decompression</strong></h3><ul><li><p><strong>Problem Statement:</strong> Compressing and decompressing files to save space.</p></li><li><p><strong>Detailed Scenario:</strong> The system needs to compress files for storage and decompress them when needed for processing.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>zipfile</code> module to compress and decompress files.</p></li><li><p><strong>Tools and Modules:</strong> <code>zipfile</code></p></li></ul><div><hr></div><h3><strong>Scenario 26: Sorting and Filtering Data</strong></h3><ul><li><p><strong>Problem Statement:</strong> Sorting and filtering data based on user-defined criteria.</p></li><li><p><strong>Detailed Scenario:</strong> The system needs to sort a list of records (e.g., employee data) based on specific fields and filter records that meet certain conditions (e.g., age above 30).</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>sorted()</code> function and list comprehensions to sort and filter the data.</p></li><li><p><strong>Tools and Modules:</strong> <code>sorted()</code>, <code>filter()</code></p></li></ul><div><hr></div><h3><strong>Scenario 27: Configuring a REST API Client</strong></h3><ul><li><p><strong>Problem Statement:</strong> Configuring a Python client to interact with a REST API.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to interact with an external REST API, sending requests and handling responses to fetch data like user information or product details.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>requests</code> module to send GET, POST, PUT, and DELETE requests to the API.</p></li><li><p><strong>Tools and Modules:</strong> <code>requests</code></p></li></ul><div><hr></div><h3><strong>Scenario 28: Real-Time Data Processing</strong></h3><ul><li><p><strong>Problem Statement:</strong> Processing real-time data streams from external sources.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to process a continuous stream of real-time data (e.g., stock prices or sensor data) and perform analysis or logging.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>asyncio</code> or <code>threading</code> to process data in real-time without blocking the application.</p></li><li><p><strong>Tools and Modules:</strong> <code>asyncio</code>, <code>threading</code></p></li></ul><div><hr></div><h3><strong>Scenario 29: Data Encryption and Decryption</strong></h3><ul><li><p><strong>Problem Statement:</strong> Encrypting and decrypting sensitive data for security purposes.</p></li><li><p><strong>Detailed Scenario:</strong> An application needs to encrypt sensitive user data (e.g., passwords or credit card details) before storing it in a database and decrypt it when needed.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>cryptography</code> library to encrypt and decrypt data securely.</p></li><li><p><strong>Tools and Modules:</strong> <code>cryptography</code></p></li></ul><div><hr></div><h3><strong>Scenario 30: Automating Report Generation</strong></h3><ul><li><p><strong>Problem Statement:</strong> Automatically generating and sending PDF reports.</p></li><li><p><strong>Detailed Scenario:</strong> A system needs to generate PDF reports from dynamic data and send them via email at specific intervals.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>reportlab</code> module to generate PDFs and <code>smtplib</code> to send emails.</p></li><li><p><strong>Tools and Modules:</strong> <code>reportlab</code>, <code>smtplib</code></p></li></ul><div><hr></div><h3><strong>Scenario 31: Image Processing and Transformation</strong></h3><ul><li><p><strong>Problem Statement:</strong> Performing image manipulation tasks such as resizing and applying filters.</p></li><li><p><strong>Detailed Scenario:</strong> A Python application needs to process images by resizing them to fit a specific resolution and applying filters (e.g., grayscale, blur).</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>Pillow</code> library to load, resize, and apply filters to images.</p></li><li><p><strong>Tools and Modules:</strong> <code>Pillow</code></p></li></ul><div><hr></div><h3><strong>Scenario 32: Interactive User Interface</strong></h3><ul><li><p><strong>Problem Statement:</strong> Developing a GUI for a Python application.</p></li><li><p><strong>Detailed Scenario:</strong> A Python-based desktop application needs an interactive graphical user interface (GUI) where users can input data and view results.</p></li><li><p><strong>Usecase Approach:</strong> Use <code>Tkinter</code> to build and design the application interface, allowing for easy user interaction.</p></li><li><p><strong>Tools and Modules:</strong> <code>Tkinter</code></p></li></ul><div><hr></div><h3><strong>Scenario 33: Working with Time Zones</strong></h3><ul><li><p><strong>Problem Statement:</strong> Handling time zone conversions in the application.</p></li><li><p><strong>Detailed Scenario:</strong> An application needs to convert time between different time zones for scheduling or logging events.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>pytz</code> and <code>datetime</code> modules to handle time zone-aware datetime objects.</p></li><li><p><strong>Tools and Modules:</strong> <code>pytz</code>, <code>datetime</code></p></li></ul><div><hr></div><h3><strong>Scenario 34: Caching API Responses for Performance</strong></h3><ul><li><p><strong>Problem Statement:</strong> Caching API responses to improve performance.</p></li><li><p><strong>Detailed Scenario:</strong> To minimize API calls, the application needs to cache the responses for certain requests (e.g., user data) for a predefined time.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>cachetools</code> or <code>functools.lru_cache</code> to cache API responses in memory.</p></li><li><p><strong>Tools and Modules:</strong> <code>cachetools</code>, <code>functools</code></p></li></ul><div><hr></div><h3><strong>Scenario 35: CSV File Export for Data</strong></h3><ul><li><p><strong>Problem Statement:</strong> Exporting data into a CSV file for reporting purposes.</p></li><li><p><strong>Detailed Scenario:</strong> A Python application needs to export processed data (e.g., sales records) into a CSV file format that can be opened and analyzed using tools like Excel.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>csv</code> module to write data into a CSV file.</p></li><li><p><strong>Tools and Modules:</strong> <code>csv</code></p></li></ul><div><hr></div><h3><strong>Scenario 36: Automating Social Media Posts</strong></h3><ul><li><p><strong>Problem Statement:</strong> Automating social media posts from Python.</p></li><li><p><strong>Detailed Scenario:</strong> A system needs to schedule and post content automatically on social media platforms (e.g., Twitter or LinkedIn).</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>tweepy</code> for Twitter or <code>linkedin-api</code> for LinkedIn to post content programmatically.</p></li><li><p><strong>Tools and Modules:</strong> <code>tweepy</code>, <code>linkedin-api</code></p></li></ul><div><hr></div><h3><strong>Scenario 37: Predictive Analytics with Linear Regression</strong></h3><ul><li><p><strong>Problem Statement:</strong> Building a predictive model to forecast sales based on historical data.</p></li><li><p><strong>Detailed Scenario:</strong> Use a dataset of past sales to build a linear regression model that predicts future sales.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>scikit-learn</code> to create and train a linear regression model.</p></li><li><p><strong>Tools and Modules:</strong> <code>scikit-learn</code>, <code>numpy</code></p></li></ul><div><hr></div><h3><strong>Scenario 38: Data Cleaning with Pandas</strong></h3><ul><li><p><strong>Problem Statement:</strong> Cleaning and preprocessing data from a raw dataset.</p></li><li><p><strong>Detailed Scenario:</strong> The dataset contains missing values, outliers, and incorrect formats that need to be cleaned before further analysis.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>pandas</code> module to clean and preprocess the dataset, filling missing values and removing outliers.</p></li><li><p><strong>Tools and Modules:</strong> <code>pandas</code></p></li></ul><div><hr></div><h3><strong>Scenario 39: Automating Data Backup</strong></h3><ul><li><p><strong>Problem Statement:</strong> Automating the backup of files and databases.</p></li><li><p><strong>Detailed Scenario:</strong> A system needs to create periodic backups of important files and databases to ensure data is not lost.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>shutil</code> and <code>os</code> modules to copy files and directories to a backup location at scheduled intervals.</p></li><li><p><strong>Tools and Modules:</strong> <code>shutil</code>, <code>os</code></p></li></ul><div><hr></div><h3><strong>Scenario 40: Sending SMS Alerts for Errors</strong></h3><ul><li><p><strong>Problem Statement:</strong> Sending SMS alerts when critical errors occur.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to send SMS alerts to administrators when certain errors occur (e.g., server downtime or failed tasks).</p></li><li><p><strong>Usecase Approach:</strong> Use the <code>twilio</code> API to send SMS alerts programmatically from Python.</p></li><li><p><strong>Tools and Modules:</strong> <code>twilio</code></p></li></ul><div><hr></div><h3><strong>Scenario 41: Generating Password Hashes for Security</strong></h3><ul><li><p><strong>Problem Statement:</strong> Storing passwords securely by generating hash values.</p></li><li><p><strong>Detailed Scenario:</strong> A Python application needs to generate and store password hashes instead of plain text passwords to enhance security.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>hashlib</code> or <code>bcrypt</code> to hash passwords before storing them.</p></li><li><p><strong>Tools and Modules:</strong> <code>hashlib</code>, <code>bcrypt</code></p></li></ul><div><hr></div><h3><strong>Scenario 42: Developing a REST API with Flask</strong></h3><ul><li><p><strong>Problem Statement:</strong> Building a simple REST API to handle GET and POST requests.</p></li><li><p><strong>Detailed Scenario:</strong> A Python application needs to expose an API to handle requests for retrieving and posting data to/from a database.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>Flask</code> framework to create RESTful endpoints and handle JSON data.</p></li><li><p><strong>Tools and Modules:</strong> <code>Flask</code>, <code>Flask-RESTful</code></p></li></ul><div><hr></div><h3><strong>Scenario 43: Scraping Data from a PDF File</strong></h3><ul><li><p><strong>Problem Statement:</strong> Extracting text from a PDF file for analysis.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to read and extract text from PDF files that contain invoices or reports.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>PyPDF2</code> or <code>pdfminer</code> module to extract text from PDFs.</p></li><li><p><strong>Tools and Modules:</strong> <code>PyPDF2</code>, <code>pdfminer</code></p></li></ul><div><hr></div><h3><strong>Scenario 44: Graphing and Visualization of Data</strong></h3><ul><li><p><strong>Problem Statement:</strong> Visualizing data through charts and graphs.</p></li><li><p><strong>Detailed Scenario:</strong> A system needs to visualize sales trends and financial reports in the form of bar charts and line graphs.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>matplotlib</code> or <code>seaborn</code> to plot graphs from data.</p></li><li><p><strong>Tools and Modules:</strong> <code>matplotlib</code>, <code>seaborn</code></p></li></ul><div><hr></div><h3><strong>Scenario 45: Writing Unit Tests for Python Functions</strong></h3><ul><li><p><strong>Problem Statement:</strong> Ensuring code correctness by writing unit tests.</p></li><li><p><strong>Detailed Scenario:</strong> A Python application has multiple functions that need to be tested to ensure they behave as expected.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>unittest</code> or <code>pytest</code> to write unit tests for Python functions.</p></li><li><p><strong>Tools and Modules:</strong> <code>unittest</code>, <code>pytest</code></p></li></ul><div><hr></div><h3><strong>Scenario 46: Simulating a Lottery Number Generator</strong></h3><ul><li><p><strong>Problem Statement:</strong> Creating a lottery number generator.</p></li><li><p><strong>Detailed Scenario:</strong> The system needs to generate a set of random numbers to simulate a lottery draw.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>random</code> module to generate a set of unique numbers for the lottery.</p></li><li><p><strong>Tools and Modules:</strong> <code>random</code></p></li></ul><div><hr></div><h3><strong>Scenario 47: Building a Chatbot with Python</strong></h3><ul><li><p><strong>Problem Statement:</strong> Developing a simple chatbot for customer support.</p></li><li><p><strong>Detailed Scenario:</strong> A Python application needs to handle basic queries and provide automated responses using predefined rules.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>nltk</code> (Natural Language Toolkit) for natural language processing and rule-based responses.</p></li><li><p><strong>Tools and Modules:</strong> <code>nltk</code></p></li></ul><div><hr></div><h3><strong>Scenario 48: Automating Social Media Image Downloading</strong></h3><ul><li><p><strong>Problem Statement:</strong> Automating the downloading of images from social media platforms.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to automatically download images from social media accounts using hashtags or user profiles.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>requests</code> and <code>beautifulsoup4</code> modules to scrape images from web pages.</p></li><li><p><strong>Tools and Modules:</strong> <code>requests</code>, <code>beautifulsoup49</code></p></li></ul><div><hr></div><h3><strong>Scenario 49: Handling Large Datasets in Memory</strong></h3><ul><li><p><strong>Problem Statement:</strong> Efficiently handling and processing large datasets that do not fit into memory.</p></li><li><p><strong>Detailed Scenario:</strong> A Python program needs to process large datasets, such as log files or sensor data, without running out of memory.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>pandas</code> to load data in chunks and process it incrementally.</p></li><li><p><strong>Tools and Modules:</strong> <code>pandas</code></p></li></ul><div><hr></div><h3><strong>Scenario 50: Checking for File Existence Before Access</strong></h3><ul><li><p><strong>Problem Statement:</strong> Checking if a file exists before opening it.</p></li><li><p><strong>Detailed Scenario:</strong> The application needs to check whether a file exists before trying to open it to avoid errors.</p></li><li><p><strong>Usecase Approach:</strong> Use Python&#8217;s <code>os.path.exists()</code> to verify file existence before performing operations.</p></li><li><p><strong>Tools and Modules:</strong> <code>os</code></p></li></ul><div><hr></div><p></p>]]></content:encoded></item><item><title><![CDATA[Mastering SQL Optimization: Fine-tuning Queries & Indexing for Peak Performance]]></title><description><![CDATA[Optimizing Database Performance: Fine-tuning SQL Queries, Indexing Strategies, and Improving Transaction Processing Speed]]></description><link>https://careerbytecode.substack.com/p/maximizing-sql-performance-how-to-speed-up-queries-and-improve-transactions</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/maximizing-sql-performance-how-to-speed-up-queries-and-improve-transactions</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Tue, 25 Mar 2025 14:45:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!L_9Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L_9Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L_9Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 424w, https://substackcdn.com/image/fetch/$s_!L_9Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 848w, https://substackcdn.com/image/fetch/$s_!L_9Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 1272w, https://substackcdn.com/image/fetch/$s_!L_9Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L_9Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png" width="1456" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:812873,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159830420?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L_9Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 424w, https://substackcdn.com/image/fetch/$s_!L_9Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 848w, https://substackcdn.com/image/fetch/$s_!L_9Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 1272w, https://substackcdn.com/image/fetch/$s_!L_9Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a82419-ae63-43ce-ab3e-a51138fe2eef_1472x832.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3></h3><p>In the world of data-driven applications, optimizing database performance is a crucial aspect of ensuring that systems run smoothly and efficiently, especially when dealing with large volumes of data. Database optimization techniques like fine-tuning SQL queries, creating effective indexing strategies, and improving transaction processing speed can lead to significant performance improvements, better user experience, and reduced costs.</p><p>In this blog, I&#8217;ll explain the concept of SQL database optimization, the different ways we can achieve it, and provide detailed, step-by-step examples of how to fine-tune SQL queries, implement indexing strategies, and optimize transaction processing speed.</p><h3>Why is SQL Database Optimization Important?</h3><p>SQL database optimization is vital for several reasons:</p><ol><li><p><strong>Faster Query Execution</strong>: As databases grow, inefficient queries can cause significant slowdowns. Optimizing these queries ensures that data retrieval is fast and does not lead to delays, especially in user-facing applications.</p></li><li><p><strong>Reduced Resource Consumption</strong>: Well-optimized queries use fewer CPU cycles, memory, and disk space, reducing the burden on the system.</p></li><li><p><strong>Improved Scalability</strong>: Efficient queries and indexing ensure that the database can handle a larger volume of data and traffic as the application scales.</p></li><li><p><strong>Enhanced User Experience</strong>: Faster query execution times directly improve the responsiveness of applications, leading to a better experience for end users.</p></li><li><p><strong>Cost Savings</strong>: Optimizing database performance helps reduce cloud infrastructure costs since fewer resources are required to process queries and handle transactions.</p></li></ol><p>Now, let's dive deeper into specific optimization techniques.</p><h3>1. Fine-tuning SQL Queries</h3><h4>Understanding Query Execution Plans</h4><p>The first step in SQL query optimization is understanding how the database engine executes queries. By analyzing <strong>execution plans</strong>, we can identify slow queries and pinpoint which parts of the query are consuming the most resources.</p><p><strong>Example:</strong></p><pre><code><code>EXPLAIN SELECT * FROM employees WHERE department = 'Engineering';
</code></code></pre><ul><li><p>The <strong>EXPLAIN</strong> statement helps you see how the SQL engine plans to execute the query. You might find that the database is scanning the entire table, which is inefficient for large tables.</p></li></ul><h4>Solution: Use SELECT Only What&#8217;s Needed</h4><p>Instead of selecting all columns with <code>SELECT *</code>, choose only the columns you need. This reduces the amount of data transferred and processed.</p><p><strong>Example:</strong></p><pre><code><code>SELECT employee_id, employee_name FROM employees WHERE department = 'Engineering';
</code></code></pre><p>This query retrieves only the necessary columns (<code>employee_id</code> and <code>employee_name</code>), improving performance.</p><h4>Solution: Avoid Using Wildcards at the Start of a LIKE Clause</h4><p>Using a wildcard (<code>%</code>) at the beginning of a <code>LIKE</code> clause can make the query inefficient because it forces the database to perform a full table scan.</p><p><strong>Example:</strong></p><pre><code><code>SELECT * FROM products WHERE product_name LIKE '%Laptop';
</code></code></pre><p>This query would cause a full table scan, which is slow. Instead, use the wildcard only at the end if possible.</p><h4>Live Scenario: E-commerce Platform</h4><p>For an e-commerce platform, searching for products is a common query. A well-optimized query would focus on using <code>WHERE</code> clauses and avoid unnecessary <code>LIKE</code> queries with wildcards.</p><h3>2. Indexing Strategies</h3><p>Indexes are essential for improving the speed of data retrieval. They function like an index in a book, allowing the database engine to quickly find rows without scanning the entire table.</p><h4>Solution: Creating Indexes on Frequently Queried Columns</h4><p>Create indexes on columns that are often used in <code>WHERE</code>, <code>JOIN</code>, <code>ORDER BY</code>, and <code>GROUP BY</code> clauses. This drastically improves query performance.</p><p><strong>Example:</strong></p><pre><code><code>CREATE INDEX idx_employee_department ON employees(department);
</code></code></pre><p>This index speeds up searches for employees in a specific department, such as:</p><pre><code><code>SELECT * FROM employees WHERE department = 'Engineering';
</code></code></pre><h4>Solution: Composite Indexes</h4><p>If your queries often filter on multiple columns, consider creating a composite index on those columns to speed up searches.</p><p><strong>Example:</strong></p><pre><code><code>CREATE INDEX idx_employee_department_name ON employees(department, employee_name);
</code></code></pre><p>This index improves performance for queries like:</p><pre><code><code>SELECT * FROM employees WHERE department = 'Engineering' AND employee_name LIKE 'John%';
</code></code></pre><h4>Solution: Avoid Over-Indexing</h4><p>While indexes improve query performance, too many indexes can slow down data modification operations (INSERT, UPDATE, DELETE) because the database needs to update each index after data changes.</p><p><strong>Example:</strong></p><ul><li><p>Suppose your <code>products</code> table has 10 indexes. While querying might be faster, every time a new product is inserted, all 10 indexes need to be updated, slowing down the process. Therefore, it&#8217;s essential to strike a balance.</p></li></ul><h4>Live Scenario: Financial Application</h4><p>In a financial application that frequently queries transactions based on date ranges and customer ID, creating composite indexes on both <code>transaction_date</code> and <code>customer_id</code> would speed up searches significantly.</p><h3>3. Improving Transaction Processing Speed</h3><p>Transactions in SQL should be processed efficiently to ensure that they don&#8217;t block other operations or take too long to commit.</p><h4>Solution: Using Proper Transaction Isolation Levels</h4><p>SQL databases support different <strong>transaction isolation levels</strong>, which control how transactions interact with each other. Choosing the right isolation level can prevent locking issues and improve performance.</p><p><strong>Example:</strong></p><pre><code><code>SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
</code></code></pre><p>This isolation level ensures that transactions only see committed data, but it reduces the chances of blocking other transactions compared to the <code>SERIALIZABLE</code> isolation level.</p><h4>Solution: Commit Transactions in Batches</h4><p>Instead of committing each transaction individually, commit them in batches to reduce the overhead caused by frequent commits.</p><p><strong>Example:</strong></p><pre><code><code>BEGIN;
-- Insert multiple rows into the orders table
INSERT INTO orders (order_id, customer_id, order_date) VALUES (1, 100, '2025-01-01');
INSERT INTO orders (order_id, customer_id, order_date) VALUES (2, 101, '2025-01-02');
-- Commit the transaction
COMMIT;
</code></code></pre><p>Batch processing of transactions reduces the number of commits and locks, improving performance.</p><h4>Solution: Minimize Locks</h4><p>SQL databases use locks to maintain data consistency during transactions. However, holding locks for too long can block other operations. To minimize locking:</p><ul><li><p>Keep transactions as short as possible.</p></li><li><p>Avoid unnecessary updates.</p></li></ul><p><strong>Example:</strong></p><pre><code><code>BEGIN;
UPDATE inventory SET stock = stock - 1 WHERE product_id = 101;
COMMIT;
</code></code></pre><p>In this case, the transaction only locks the rows needed for the update, avoiding unnecessary blocking of other queries.</p><h4>Live Scenario: Payment System</h4><p>In a payment processing system, committing payments in batches during high-volume transactions (e.g., end-of-day processing) helps to reduce the load and time required for processing individual transactions.</p><h3>Additional Optimization Techniques</h3><ul><li><p><strong>Use of Caching</strong>: Frequently accessed data should be cached (in-memory databases like Redis) to reduce database load and improve response time.</p></li><li><p><strong>Partitioning Large Tables</strong>: Split large tables into smaller, manageable pieces (partitions) based on a specific range of data (e.g., partition by date) to optimize query performance.</p></li><li><p><strong>Database Maintenance</strong>: Regularly update statistics and perform database maintenance tasks like vacuuming (in PostgreSQL) or optimizing tables (in MySQL) to keep the database running efficiently.</p></li></ul><h3>Conclusion</h3><p>Optimizing SQL database performance is not a one-time task but a continuous process that requires careful monitoring, tuning, and testing. By following best practices such as fine-tuning SQL queries, creating effective indexing strategies, and improving transaction processing speed, you can significantly enhance your database's performance. Implementing these strategies leads to faster queries, lower resource consumption, and an overall more efficient database that scales well with growing data and user traffic.</p><p>By regularly analyzing queries, indexing properly, and using effective transaction management techniques, businesses can ensure their SQL databases are optimized for speed, reliability, and cost efficiency.</p>]]></content:encoded></item><item><title><![CDATA[Troubleshooting in Azure : Struggling with Disabled Autoscaling in Azure? Fix It Now!]]></title><description><![CDATA[How to enable Autoscaling if it is disabled in the portal.]]></description><link>https://careerbytecode.substack.com/p/solve-the-disabled-autoscaling-problem-in-azure-vm-scale-sets-today</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/solve-the-disabled-autoscaling-problem-in-azure-vm-scale-sets-today</guid><dc:creator><![CDATA[Vijesh Vijayan Nair]]></dc:creator><pubDate>Sun, 23 Mar 2025 21:23:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!cBS3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cBS3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cBS3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 424w, https://substackcdn.com/image/fetch/$s_!cBS3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 848w, https://substackcdn.com/image/fetch/$s_!cBS3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 1272w, https://substackcdn.com/image/fetch/$s_!cBS3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cBS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png" width="1456" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:654565,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cBS3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 424w, https://substackcdn.com/image/fetch/$s_!cBS3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 848w, https://substackcdn.com/image/fetch/$s_!cBS3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 1272w, https://substackcdn.com/image/fetch/$s_!cBS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4dda3b-43d5-497e-8bfe-c070b979628d_1472x832.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h3>Problem:</h3><p>When trying to create Virtual Machine Scale Sets, the Autoscaling feature is sometimes shown as disabled as shown below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DM6V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DM6V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 424w, https://substackcdn.com/image/fetch/$s_!DM6V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 848w, https://substackcdn.com/image/fetch/$s_!DM6V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 1272w, https://substackcdn.com/image/fetch/$s_!DM6V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DM6V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png" width="1193" height="905" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:905,&quot;width&quot;:1193,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:89817,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DM6V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 424w, https://substackcdn.com/image/fetch/$s_!DM6V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 848w, https://substackcdn.com/image/fetch/$s_!DM6V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 1272w, https://substackcdn.com/image/fetch/$s_!DM6V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3202a9a-4308-4674-be5c-5f1c9a5ed237_1193x905.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Struggling to enable Autoscaling in Azure Virtual Machine Scale Sets? You&#8217;re not alone! By default, some resource providers are disabled in Azure, which might be preventing the Autoscaling feature from showing up. The solution is simple&#8212;just enable the <strong>Microsoft.Insights</strong> resource provider in your Azure subscription! This quick fix will unlock the Autoscaling feature and make it ready for use.</p><p>In this step-by-step guide, we show you how to enable the <strong>Microsoft.Insights</strong> provider and activate Autoscaling for your VM Scale Sets. If you&#8217;ve just created your Azure account or are encountering issues with Autoscaling during your learning process, this article is for you!</p><p>Learn how to:</p><ul><li><p>Enable the <strong>Microsoft.Insights</strong> resource provider</p></li><li><p>Fix the Autoscaling issue quickly</p></li><li><p>Get back on track with your Azure Autoscaling labs</p></li></ul><p>If you&#8217;re new to Azure and facing challenges, follow these easy steps and get your Autoscaling features working in no time. Thanks for reading&#8212;now you&#8217;re all set to scale with Azure!</p><h3>Solution:</h3><p>This is because by default some of the resource providers are disabled by azure. We need to enable it for our subscription for the features to show up.</p><p>Below are the steps to enable it.</p><p>Go to <strong>Subscription</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x4fF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x4fF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 424w, https://substackcdn.com/image/fetch/$s_!x4fF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 848w, https://substackcdn.com/image/fetch/$s_!x4fF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 1272w, https://substackcdn.com/image/fetch/$s_!x4fF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!x4fF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png" width="1456" height="384" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:384,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:72502,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!x4fF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 424w, https://substackcdn.com/image/fetch/$s_!x4fF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 848w, https://substackcdn.com/image/fetch/$s_!x4fF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 1272w, https://substackcdn.com/image/fetch/$s_!x4fF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fb72e26-70ef-44ef-8332-dafb64140544_1886x498.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Under <strong>Settings</strong>, go to <strong>resource providers</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!12TE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!12TE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 424w, https://substackcdn.com/image/fetch/$s_!12TE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 848w, https://substackcdn.com/image/fetch/$s_!12TE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 1272w, https://substackcdn.com/image/fetch/$s_!12TE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!12TE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151967,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!12TE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 424w, https://substackcdn.com/image/fetch/$s_!12TE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 848w, https://substackcdn.com/image/fetch/$s_!12TE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 1272w, https://substackcdn.com/image/fetch/$s_!12TE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0c4c361-1912-43fa-83ff-63ccfc8c07e1_1711x962.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>There is a feature called <strong>microsoft.insights</strong>. Search in the search box for <strong>&#8220;insights&#8221;</strong> :</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9K4M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9K4M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 424w, https://substackcdn.com/image/fetch/$s_!9K4M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 848w, https://substackcdn.com/image/fetch/$s_!9K4M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 1272w, https://substackcdn.com/image/fetch/$s_!9K4M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9K4M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png" width="1456" height="702" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:702,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:102041,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9K4M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 424w, https://substackcdn.com/image/fetch/$s_!9K4M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 848w, https://substackcdn.com/image/fetch/$s_!9K4M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 1272w, https://substackcdn.com/image/fetch/$s_!9K4M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d0e8c0-2ed5-4eb3-ba21-a8e5da2b9845_1622x782.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Select the <strong>microsoft.insights</strong> and <strong>register </strong>it as shown below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T4AY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T4AY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 424w, https://substackcdn.com/image/fetch/$s_!T4AY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 848w, https://substackcdn.com/image/fetch/$s_!T4AY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 1272w, https://substackcdn.com/image/fetch/$s_!T4AY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T4AY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png" width="1456" height="693" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:693,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:100107,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T4AY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 424w, https://substackcdn.com/image/fetch/$s_!T4AY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 848w, https://substackcdn.com/image/fetch/$s_!T4AY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 1272w, https://substackcdn.com/image/fetch/$s_!T4AY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7c102cf-14b4-44c1-83be-e3b98dbadbcc_1723x820.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TSwg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TSwg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 424w, https://substackcdn.com/image/fetch/$s_!TSwg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 848w, https://substackcdn.com/image/fetch/$s_!TSwg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 1272w, https://substackcdn.com/image/fetch/$s_!TSwg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TSwg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png" width="1456" height="741" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:741,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108960,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TSwg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 424w, https://substackcdn.com/image/fetch/$s_!TSwg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 848w, https://substackcdn.com/image/fetch/$s_!TSwg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 1272w, https://substackcdn.com/image/fetch/$s_!TSwg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67cae7ff-e756-4b5a-9d10-11749de9c018_1628x828.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!11Ju!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!11Ju!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 424w, https://substackcdn.com/image/fetch/$s_!11Ju!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 848w, https://substackcdn.com/image/fetch/$s_!11Ju!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 1272w, https://substackcdn.com/image/fetch/$s_!11Ju!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!11Ju!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png" width="1456" height="663" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:663,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144319,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!11Ju!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 424w, https://substackcdn.com/image/fetch/$s_!11Ju!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 848w, https://substackcdn.com/image/fetch/$s_!11Ju!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 1272w, https://substackcdn.com/image/fetch/$s_!11Ju!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57faf6c5-51ad-4551-b7fa-82cbd3ee86ff_1905x868.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Once registered, open Virtual Machine Scale Sets and the Autoscaling feature should be activated.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dFlY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dFlY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 424w, https://substackcdn.com/image/fetch/$s_!dFlY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 848w, https://substackcdn.com/image/fetch/$s_!dFlY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 1272w, https://substackcdn.com/image/fetch/$s_!dFlY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dFlY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png" width="1156" height="812" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:812,&quot;width&quot;:1156,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:78888,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/159055741?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dFlY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 424w, https://substackcdn.com/image/fetch/$s_!dFlY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 848w, https://substackcdn.com/image/fetch/$s_!dFlY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 1272w, https://substackcdn.com/image/fetch/$s_!dFlY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc538ca9b-65ab-4bde-9715-0db1c30e172b_1156x812.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p><strong>Hence, the autoscaling feature is now enabled and ready for use.</strong></p><p><em>Thanks for reading&#8230;</em></p>]]></content:encoded></item><item><title><![CDATA[Vertical Scaling vs Horizontal Scaling – The Complete Guide]]></title><description><![CDATA[Scaling is crucial for handling growing traffic, data, and user demands. Vertical scaling is good for quick performance boosts, while horizontal scaling is the best long-term solution for scalability.]]></description><link>https://careerbytecode.substack.com/p/the-future-of-kubernetes-scaling-what-every-devops-engineer-must-know</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/the-future-of-kubernetes-scaling-what-every-devops-engineer-must-know</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Thu, 13 Mar 2025 13:35:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_0PU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_0PU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_0PU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!_0PU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!_0PU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!_0PU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_0PU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:397924,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/158990210?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_0PU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!_0PU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!_0PU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!_0PU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac69c66-dd05-41e6-b694-0293b3f2dacc_1280x720.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Imagine you own a caf&#233;, and your business is booming. You need more resources to handle the growing number of customers. You have two choices:</p><ol><li><p><strong>Get a bigger, more powerful coffee machine</strong> (Vertical Scaling)</p></li><li><p><strong>Get multiple coffee machines and hire more baristas</strong> (Horizontal Scaling)</p></li></ol><p>This simple analogy is exactly how <strong>scaling</strong> works in computing. Let&#8217;s dive deeper into these two concepts.</p><div><hr></div><h2><strong>What is Vertical Scaling (Scaling Up)?</strong></h2><p>Vertical scaling means <strong>adding more power</strong> (CPU, RAM, storage) to an <strong>existing</strong> server. Instead of adding more machines, you make your current machine stronger.</p><p>&#9989; <strong>How it Works?</strong></p><ul><li><p>You replace your existing server with a higher-capacity one.</p></li><li><p>You increase resources like CPU, RAM, or SSD on the same machine.</p></li><li><p>It&#8217;s like upgrading your laptop from 8GB RAM to 32GB for better performance.</p></li></ul><h3><strong>10 Real-Life Examples of Vertical Scaling</strong></h3><p>Let&#8217;s see how vertical scaling works in different scenarios:</p><p>1&#65039;&#8419; <strong>Upgrading a Database Server</strong></p><ul><li><p>A company using MySQL on a small server upgrades it to a <strong>higher RAM and CPU server</strong> to handle more queries efficiently.</p></li></ul><p>2&#65039;&#8419; <strong>Increasing RAM in a Web Server</strong></p><ul><li><p>A website experiencing slow load times upgrades its <strong>RAM from 8GB to 64GB</strong> to handle more users.</p></li></ul><p>3&#65039;&#8419; <strong>Adding More Cores to a CPU</strong></p><ul><li><p>A machine learning engineer working with AI models moves from a <strong>4-core CPU to a 32-core CPU</strong> to speed up computations.</p></li></ul><p>4&#65039;&#8419; <strong>Scaling a Gaming Server</strong></p><ul><li><p>A gaming company hosting an online multiplayer game upgrades its <strong>server&#8217;s processing power</strong> to reduce lag for players.</p></li></ul><p>5&#65039;&#8419; <strong>Cloud VM Size Upgrade</strong></p><ul><li><p>A company using AWS EC2 instances upgrades from <strong>t2.micro (1GB RAM) to m5.large (8GB RAM)</strong> to handle more traffic.</p></li></ul><p>6&#65039;&#8419; <strong>Enhancing Storage Capacity</strong></p><ul><li><p>An e-commerce site running out of disk space upgrades from <strong>500GB SSD to 4TB SSD</strong> to store more product images and user data.</p></li></ul><p>7&#65039;&#8419; <strong>Boosting Performance for Video Rendering</strong></p><ul><li><p>A video production company increases its <strong>workstation&#8217;s GPU and RAM</strong> to render 4K videos faster.</p></li></ul><p>8&#65039;&#8419; <strong>Upgrading SAP ERP Systems</strong></p><ul><li><p>A company running SAP ERP software needs <strong>faster processing</strong> and upgrades its <strong>server with high-speed NVMe SSDs and 512GB RAM</strong>.</p></li></ul><p>9&#65039;&#8419; <strong>Improving AI Training Performance</strong></p><ul><li><p>A deep learning startup moves from a <strong>single NVIDIA RTX 3080 to an NVIDIA A100 GPU</strong> to train AI models faster.</p></li></ul><p>&#128287; <strong>Enhancing Email Server Performance</strong></p><ul><li><p>An organization with an <strong>email server struggling with 10,000+ users</strong> upgrades to a more powerful server with <strong>additional RAM and CPU</strong>.</p></li></ul><h3><strong>Pros &amp; Cons of Vertical Scaling</strong></h3><p>&#9989; <strong>Pros:</strong></p><ul><li><p>Simple to implement.</p></li><li><p>Requires fewer management efforts.</p></li><li><p>No need for code or architecture changes.</p></li></ul><p>&#10060; <strong>Cons:</strong></p><ul><li><p><strong>Hardware limits:</strong> There&#8217;s only so much you can upgrade.</p></li><li><p><strong>Single point of failure:</strong> If the upgraded server crashes, everything goes down.</p></li><li><p><strong>Expensive:</strong> High-end servers are costly.</p></li></ul><div><hr></div><h2><strong>What is Horizontal Scaling (Scaling Out)?</strong></h2><p>Horizontal scaling means <strong>adding more machines</strong> to distribute the load instead of upgrading a single machine.</p><p>&#9989; <strong>How it Works?</strong></p><ul><li><p>Instead of upgrading one powerful machine, you add <strong>multiple smaller machines</strong> to handle more traffic.</p></li><li><p>Think of adding more cashiers in a supermarket instead of replacing one with a super-fast cashier.</p></li><li><p>This method ensures <strong>high availability and fault tolerance</strong>.</p></li></ul><h3><strong>10 Real-Life Examples of Horizontal Scaling</strong></h3><p>Let&#8217;s see how horizontal scaling is used:</p><p>1&#65039;&#8419; <strong>Adding More Web Servers</strong></p><ul><li><p>An e-commerce website under heavy traffic adds <strong>more web servers behind a load balancer</strong> to distribute requests.</p></li></ul><p>2&#65039;&#8419; <strong>Scaling a Database with Read Replicas</strong></p><ul><li><p>A company with high read requests in MySQL creates <strong>multiple read replicas</strong> to handle database queries.</p></li></ul><p>3&#65039;&#8419; <strong>Using Kubernetes Pods for Microservices</strong></p><ul><li><p>A microservices-based application scales up by <strong>increasing the number of Kubernetes pods</strong> to handle more user requests.</p></li></ul><p>4&#65039;&#8419; <strong>Expanding Cloud Storage Systems</strong></p><ul><li><p>A cloud storage provider like Google Drive adds <strong>more storage servers</strong> instead of upgrading a single large disk.</p></li></ul><p>5&#65039;&#8419; <strong>Scaling a Content Delivery Network (CDN)</strong></p><ul><li><p>A video streaming platform (like Netflix) distributes content across <strong>multiple edge servers</strong> worldwide to reduce latency.</p></li></ul><p>6&#65039;&#8419; <strong>Adding More Cache Nodes</strong></p><ul><li><p>A company using Redis or Memcached <strong>adds more caching nodes</strong> instead of increasing memory on a single cache server.</p></li></ul><p>7&#65039;&#8419; <strong>Increasing Load Balanced Servers</strong></p><ul><li><p>A social media platform uses a <strong>load balancer</strong> to distribute requests across <strong>multiple web servers</strong>.</p></li></ul><p>8&#65039;&#8419; <strong>Handling IoT Devices at Scale</strong></p><ul><li><p>A company collecting IoT data from <strong>millions of sensors</strong> distributes the load across <strong>thousands of processing nodes</strong>.</p></li></ul><p>9&#65039;&#8419; <strong>Scaling AI Model Inference</strong></p><ul><li><p>A chatbot serving <strong>millions of users</strong> runs on <strong>multiple AI inference servers</strong> instead of a single powerful one.</p></li></ul><p>&#128287; <strong>Expanding an Email System</strong></p><ul><li><p>Instead of upgrading a single email server, a company <strong>distributes email requests across multiple mail servers</strong>.</p></li></ul><h3><strong>Pros &amp; Cons of Horizontal Scaling</strong></h3><p>&#9989; <strong>Pros:</strong></p><ul><li><p><strong>No hardware limits:</strong> Easily add more machines.</p></li><li><p><strong>Fault tolerance:</strong> If one machine fails, others take over.</p></li><li><p><strong>Cost-effective:</strong> Use multiple smaller, cheaper machines.</p></li></ul><p>&#10060; <strong>Cons:</strong></p><ul><li><p><strong>More complex:</strong> Needs load balancing and distributed architecture.</p></li><li><p><strong>Higher maintenance:</strong> More machines mean more monitoring.</p></li><li><p><strong>Code changes required:</strong> Some applications may need refactoring to support horizontal scaling.</p></li></ul><div><hr></div><h2><strong>When to Choose Vertical vs Horizontal Scaling?</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_I-b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_I-b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 424w, https://substackcdn.com/image/fetch/$s_!_I-b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 848w, https://substackcdn.com/image/fetch/$s_!_I-b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 1272w, https://substackcdn.com/image/fetch/$s_!_I-b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_I-b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png" width="777" height="232" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22c351db-4040-4814-8de4-366baefc82de_777x232.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:232,&quot;width&quot;:777,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:21848,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://careerbytecode.substack.com/i/158990210?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_I-b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 424w, https://substackcdn.com/image/fetch/$s_!_I-b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 848w, https://substackcdn.com/image/fetch/$s_!_I-b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 1272w, https://substackcdn.com/image/fetch/$s_!_I-b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c351db-4040-4814-8de4-366baefc82de_777x232.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div><hr></div><h3><strong>Vertical Scaling in Kubernetes &#8211; Examples with Tests and Outputs</strong></h3><p>In Kubernetes (K8s), <strong>Vertical Scaling</strong> means increasing the CPU, memory, or other resources of a pod instead of adding more replicas. This is done using the <strong>Vertical Pod Autoscaler (VPA)</strong> or by manually updating the resource limits.</p><p>Let's explore <strong>10 examples of vertical scaling in Kubernetes</strong>, along with test steps and how to observe the output.</p><div><hr></div><h2><strong>Example 1: Increasing CPU Requests &amp; Limits for a Pod</strong></h2><h3><strong>Scenario</strong></h3><p>A web application pod is experiencing slow performance under load. We increase its <strong>CPU requests and limits</strong> to improve performance.</p><h3><strong>Steps</strong></h3><ol><li><p><strong>Deploy a simple Nginx pod with low CPU allocation:</strong></p></li></ol><pre><code><code>apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
spec:
  containers:
    - name: nginx
      image: nginx
      resources:
        requests:
          cpu: "100m"
        limits:
          cpu: "200m"
</code></code></pre><ol><li><p><strong>Apply the YAML file:</strong></p></li></ol><pre><code><code>kubectl apply -f nginx-pod.yaml
</code></code></pre><ol><li><p><strong>Check the current resource allocation:</strong></p></li></ol><pre><code><code>kubectl describe pod nginx-pod | grep -i cpu
</code></code></pre><ol><li><p><strong>Output:</strong></p></li></ol><pre><code><code>Requests:
  cpu: 100m
Limits:
  cpu: 200m
</code></code></pre><ol><li><p><strong>Increase CPU allocation:</strong></p></li></ol><pre><code><code>resources:
  requests:
    cpu: "500m"
  limits:
    cpu: "1000m"
</code></code></pre><ol><li><p><strong>Reapply the configuration and check again:</strong></p></li></ol><pre><code><code>kubectl apply -f nginx-pod.yaml
kubectl describe pod nginx-pod | grep -i cpu
</code></code></pre><ol><li><p><strong>New Output:</strong></p></li></ol><pre><code><code>Requests:
  cpu: 500m
Limits:
  cpu: 1000m
</code></code></pre><h3><strong>How to Observe the Effect?</strong></h3><ul><li><p>Use <strong>HPA</strong> (Horizontal Pod Autoscaler) to see if the pod handles more load efficiently.</p></li><li><p>Monitor the <strong>CPU usage</strong> using:</p></li></ul><pre><code><code>kubectl top pod nginx-pod
</code></code></pre><ul><li><p> Output (shows CPU consumption increasing as it scales up):</p></li></ul><pre><code><code>NAME        CPU(cores)   MEMORY(bytes)  
nginx-pod   450m        100Mi  
</code></code></pre><div><hr></div><h2><strong>Example 2: Increasing Memory for a Stateful Database Pod</strong></h2><h3><strong>Scenario</strong></h3><p>A MySQL database pod is running out of memory. We increase the <strong>memory allocation</strong> to prevent crashes.</p><h3><strong>Steps</strong></h3><ol><li><p><strong>Deploy a MySQL pod with low memory limits:</strong></p></li></ol><pre><code><code>apiVersion: v1
kind: Pod
metadata:
  name: mysql-pod
spec:
  containers:
    - name: mysql
      image: mysql
      env:
        - name: MYSQL_ROOT_PASSWORD
          value: "password"
      resources:
        requests:
          memory: "256Mi"
        limits:
          memory: "512Mi"
</code></code></pre><ol><li><p><strong>Apply the YAML file:</strong></p></li></ol><pre><code><code>kubectl apply -f mysql-pod.yaml
</code></code></pre><ol><li><p><strong>Check memory allocation:</strong></p></li></ol><pre><code><code>kubectl describe pod mysql-pod | grep -i memory
</code></code></pre><ol><li><p><strong>Output:</strong></p></li></ol><pre><code><code>Requests:
  memory: 256Mi
Limits:
  memory: 512Mi
</code></code></pre><ol><li><p><strong>Increase memory allocation:</strong></p></li></ol><pre><code><code>resources:
  requests:
    memory: "1Gi"
  limits:
    memory: "2Gi"
</code></code></pre><ol><li><p><strong>Reapply and verify:</strong></p></li></ol><pre><code><code>kubectl apply -f mysql-pod.yaml
kubectl describe pod mysql-pod | grep -i memory
</code></code></pre><ol><li><p><strong>New Output:</strong></p></li></ol><pre><code><code>Requests:
  memory: 1Gi
Limits:
  memory: 2Gi
</code></code></pre><h3><strong>How to Observe the Effect?</strong></h3><ul><li><p>Monitor memory usage:</p></li></ul><pre><code><code>kubectl top pod mysql-pod
</code></code></pre><ul><li><p> Output:</p></li></ul><pre><code><code>NAME        CPU(cores)   MEMORY(bytes)  
mysql-pod   150m        850Mi  
</code></code></pre><div><hr></div><h2><strong>Example 3: Auto-Tuning Resources with Vertical Pod Autoscaler (VPA)</strong></h2><h3><strong>Scenario</strong></h3><p>We want Kubernetes to <strong>automatically</strong> adjust CPU and memory for a workload based on real-time usage.</p><h3><strong>Steps</strong></h3><ol><li><p><strong>Install VPA (if not already installed):</strong></p></li></ol><pre><code><code>kubectl apply -f https://github.com/kubernetes/autoscaler/releases/latest/download/vertical-pod-autoscaler.yaml
</code></code></pre><ol><li><p><strong>Deploy a sample pod and enable VPA:</strong></p></li></ol><pre><code><code>apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: nginx-vpa
spec:
  targetRef:
    apiVersion: "apps/v1"
    kind: Deployment
    name: nginx-deployment
  updatePolicy:
    updateMode: "Auto"
</code></code></pre><ol><li><p><strong>Apply and check VPA recommendations:</strong></p></li></ol><pre><code><code>kubectl describe vpa nginx-vpa
</code></code></pre><ol><li><p><strong>Output:</strong></p></li></ol><pre><code><code>Recommendation:
  Target:
    CPU: 600m
    Memory: 1Gi
</code></code></pre><h3><strong>How to Observe the Effect?</strong></h3><ul><li><p>Watch for automatic updates in pod allocation:</p></li></ul><pre><code><code>kubectl describe pod nginx-pod
</code></code></pre><ul><li><p>Monitor VPA logs:</p></li></ul><pre><code><code>kubectl logs -l app=nginx --tail=50
</code></code></pre><div><hr></div><h2><strong>Example 4: Increasing Storage for a StatefulSet (PostgreSQL)</strong></h2><h3><strong>Scenario</strong></h3><p>A PostgreSQL database pod is running out of disk space. We increase its <strong>PersistentVolume (PV) storage</strong>.</p><h3><strong>Steps</strong></h3><ol><li><p><strong>Check existing storage allocation:</strong></p></li></ol><pre><code><code>kubectl get pvc
</code></code></pre><ol><li><p>Output:</p></li></ol><pre><code><code>NAME            STATUS   VOLUME   CAPACITY   ACCESS MODES
postgres-pvc   Bound    pvc-xyz  5Gi        RWO
</code></code></pre><ol><li><p><strong>Modify the PersistentVolumeClaim (PVC) size:</strong></p></li></ol><pre><code><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgres-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
</code></code></pre><ol><li><p><strong>Apply and verify:</strong></p></li></ol><pre><code><code>kubectl apply -f postgres-pvc.yaml
kubectl get pvc
</code></code></pre><ol><li><p><strong>New Output:</strong></p></li></ol><pre><code><code>NAME            STATUS   VOLUME   CAPACITY   ACCESS MODES
postgres-pvc   Bound    pvc-xyz  10Gi       RWO
</code></code></pre><h3><strong>How to Observe the Effect?</strong></h3><ul><li><p>Run <code>df -h</code> inside the PostgreSQL pod to see updated storage:</p></li></ul><pre><code><code>kubectl exec -it postgres-pod -- df -h
</code></code></pre><ul><li><p> Output:</p></li></ul><pre><code><code>Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1       10G   2G    8G   20% /var/lib/postgresql/data
</code></code></pre><div><hr></div><h2><strong>Final Thoughts - </strong>Vertical scaling</h2><p>Vertical scaling is <strong>useful when you need more power per node</strong> instead of adding more pods. In Kubernetes, this means <strong>increasing CPU, memory, or storage for a single pod</strong>.</p><p>&#128640; <strong>Key Takeaways:</strong></p><ul><li><p><strong>Manual Scaling:</strong> Modify <code>resources.requests</code> and <code>resources.limits</code>.</p></li><li><p><strong>Automated Scaling:</strong> Use <strong>Vertical Pod Autoscaler (VPA)</strong> for dynamic adjustments.</p></li><li><p><strong>Persistent Storage Scaling:</strong> Modify <strong>PersistentVolumeClaims (PVCs)</strong> for stateful applications.</p></li></ul><div><hr></div><h3><strong>Horizontal Scaling in Kubernetes &#8211; Examples with Tests and Outputs</strong></h3><p><strong>Horizontal Scaling</strong> in Kubernetes involves increasing the number of pod replicas to handle increased load. This ensures <strong>high availability</strong> and <strong>better performance</strong> without overloading a single pod. Horizontal scaling is typically managed using <strong>Horizontal Pod Autoscaler (HPA)</strong> or by manually adjusting the <code>replicas</code> count in a Deployment, ReplicaSet, or StatefulSet.</p><p>Now, let's explore <strong>10 examples of horizontal scaling</strong>, with step-by-step Kubernetes tests and how to verify the results.</p><div><hr></div><h2><strong>Example 1: Manually Scaling a Deployment</strong></h2><h3><strong>Scenario</strong></h3><p>A web application is running with <strong>one</strong> pod. We need to increase the number of replicas to handle more traffic.</p><h3><strong>Steps</strong></h3><ol><li><p><strong>Create a Deployment with a single pod:</strong></p></li></ol><pre><code><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx
</code></code></pre><ol><li><p><strong>Apply the Deployment:</strong></p></li></ol><pre><code><code>kubectl apply -f nginx-deployment.yaml
</code></code></pre><ol><li><p><strong>Verify the number of running pods:</strong></p></li></ol><pre><code><code>kubectl get pods -l app=nginx
</code></code></pre><ol><li><p><strong>Output:</strong></p></li></ol><pre><code><code>NAME                                READY   STATUS    RESTARTS   AGE
nginx-deployment-5fd6d7f95c-abcde   1/1     Running   0          30s
</code></code></pre><ol><li><p><strong>Scale the Deployment to 5 replicas:</strong></p></li></ol><pre><code><code>kubectl scale deployment nginx-deployment --replicas=5
</code></code></pre><ol><li><p><strong>Verify the new number of pods:</strong></p></li></ol><pre><code><code>kubectl get pods -l app=nginx
</code></code></pre><ol><li><p><strong>New Output:</strong></p></li></ol><pre><code><code>NAME                                READY   STATUS    RESTARTS   AGE
nginx-deployment-5fd6d7f95c-abcde   1/1     Running   0          1m
nginx-deployment-5fd6d7f95c-fghij   1/1     Running   0          5s
nginx-deployment-5fd6d7f95c-klmno   1/1     Running   0          5s
nginx-deployment-5fd6d7f95c-pqrst   1/1     Running   0          5s
nginx-deployment-5fd6d7f95c-uvwxy   1/1     Running   0          5s
</code></code></pre><h3><strong>Observations</strong></h3><ul><li><p>More pods are now running, distributing the load.</p></li><li><p>The application can now handle <strong>5x more traffic</strong> than before.</p></li></ul><div><hr></div><h2><strong>Example 2: Auto-Scaling Pods Based on CPU Usage</strong></h2><h3><strong>Scenario</strong></h3><p>We want Kubernetes to <strong>automatically</strong> scale the number of pods based on CPU usage.</p><h3><strong>Steps</strong></h3><ol><li><p><strong>Enable Metrics Server (if not already installed):</strong></p></li></ol><pre><code><code>kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
</code></code></pre><ol><li><p><strong>Deploy an application and expose it via a service:</strong></p></li></ol><pre><code><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: cpu-load-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cpu-load
  template:
    metadata:
      labels:
        app: cpu-load
    spec:
      containers:
        - name: cpu-load
          image: vish/stress
          args:
            - "--cpu"
            - "1"
          resources:
            requests:
              cpu: "100m"
            limits:
              cpu: "500m"
</code></code></pre><ol><li><p><strong>Apply the Deployment:</strong></p></li></ol><pre><code><code>kubectl apply -f cpu-load-deployment.yaml
</code></code></pre><ol><li><p><strong>Create an HPA to scale pods when CPU exceeds 50% usage:</strong></p></li></ol><pre><code><code>kubectl autoscale deployment cpu-load-deployment --cpu-percent=50 --min=1 --max=10
</code></code></pre><ol><li><p><strong>Check the HPA status:</strong></p></li></ol><pre><code><code>kubectl get hpa
</code></code></pre><ol><li><p><strong>Output:</strong></p></li></ol><pre><code><code>NAME                  REFERENCE                         TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
cpu-load-deployment   Deployment/cpu-load-deployment   60%/50%   1         10        3          1m
</code></code></pre><ol><li><p><strong>Verify the number of running pods:</strong></p></li></ol><pre><code><code>kubectl get pods -l app=cpu-load
</code></code></pre><ol><li><p><strong>Output (HPA added 2 new pods due to CPU load):</strong></p></li></ol><pre><code><code>NAME                                READY   STATUS    RESTARTS   AGE
cpu-load-deployment-abcde           1/1     Running   0          1m
cpu-load-deployment-fghij           1/1     Running   0          10s
cpu-load-deployment-klmno           1/1     Running   0          10s
</code></code></pre><h3><strong>Observations</strong></h3><ul><li><p>The number of pods <strong>increased automatically</strong> when CPU usage went above 50%.</p></li><li><p>The system can now dynamically adjust to varying loads.</p></li></ul><div><hr></div><h2><strong>Example 3: Horizontal Scaling StatefulSets (MongoDB Replica Set)</strong></h2><h3><strong>Scenario</strong></h3><p>A MongoDB StatefulSet needs to scale from 1 replica to 3 to improve <strong>database redundancy</strong> and <strong>availability</strong>.</p><h3><strong>Steps</strong></h3><ol><li><p><strong>Deploy a StatefulSet with 1 replica:</strong></p></li></ol><pre><code><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: mongodb
spec:
  serviceName: mongodb
  replicas: 1
  selector:
    matchLabels:
      app: mongodb
  template:
    metadata:
      labels:
        app: mongodb
    spec:
      containers:
        - name: mongodb
          image: mongo
</code></code></pre><ol><li><p><strong>Apply the StatefulSet:</strong></p></li></ol><pre><code><code>kubectl apply -f mongodb-statefulset.yaml
</code></code></pre><ol><li><p><strong>Check the running pods:</strong></p></li></ol><pre><code><code>kubectl get pods -l app=mongodb
</code></code></pre><ol><li><p><strong>Output:</strong></p></li></ol><pre><code><code>NAME         READY   STATUS    RESTARTS   AGE
mongodb-0    1/1     Running   0          1m
</code></code></pre><ol><li><p><strong>Scale the StatefulSet to 3 replicas:</strong></p></li></ol><pre><code><code>kubectl scale statefulset mongodb --replicas=3
</code></code></pre><ol><li><p><strong>Verify the new pods:</strong></p></li></ol><pre><code><code>kubectl get pods -l app=mongodb
</code></code></pre><ol><li><p><strong>Output:</strong></p></li></ol><pre><code><code>NAME         READY   STATUS    RESTARTS   AGE
mongodb-0    1/1     Running   0          2m
mongodb-1    1/1     Running   0          10s
mongodb-2    1/1     Running   0          10s
</code></code></pre><h3><strong>Observations</strong></h3><ul><li><p>More replicas of the MongoDB instance are running.</p></li><li><p>The application benefits from <strong>high availability and fault tolerance</strong>.</p></li></ul><div><hr></div><h2><strong>Final Thoughts </strong>Horizontal scaling</h2><p>Horizontal scaling in Kubernetes is <strong>essential for handling increasing traffic and improving application resilience</strong>.</p><p>&#128640; <strong>Key Takeaways:</strong></p><ul><li><p><strong>Manual Scaling:</strong> Use <code>kubectl scale</code> to increase/decrease replicas.</p></li><li><p><strong>Auto Scaling:</strong> Use <strong>HPA</strong> to adjust pod count based on CPU or memory usage.</p></li><li><p><strong>Stateful Scaling:</strong> Scale StatefulSets carefully to maintain database integrity.</p></li></ul><p></p><div><hr></div><h2><strong>Conclusion</strong></h2><p>Scaling is crucial for handling growing traffic, data, and user demands. <strong>Vertical scaling</strong> is good for quick performance boosts, while <strong>horizontal scaling</strong> is the best long-term solution for scalability and resilience.</p><p>&#128640; If you are starting small, <strong>vertical scaling</strong> is an easy fix. But if you expect <strong>massive growth</strong>, <strong>horizontal scaling</strong> is the way forward!</p><div><hr></div><p></p>]]></content:encoded></item><item><title><![CDATA[Troubleshooting Network Issues with Multipass and MicroK8s Port Forwarding]]></title><description><![CDATA[To resolve the issue of not being able to reach your Multipass VM via specific HTTP ports from the host.]]></description><link>https://careerbytecode.substack.com/p/kubernetes-resolving-port-accessibility-issues-for-microk8s-services-in-multipass</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/kubernetes-resolving-port-accessibility-issues-for-microk8s-services-in-multipass</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Wed, 11 Sep 2024 05:32:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tI_4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tI_4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tI_4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tI_4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tI_4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tI_4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tI_4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85393,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tI_4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tI_4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tI_4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tI_4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c97af6c-a9cf-41e7-b161-61898d61a61d_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>I'm running an Ubuntu VM with multipass hyperkit do run microk8s. Within the VM all things checkout and available with skaffold/kubectl port forwarding. For instance:</p><pre><code><code>$ multipass list
Name                    State             IPv4             Image
microk8s-vm             Running           192.168.64.2     Ubuntu 20.04 LTS
                                          10.0.1.1
                                          172.17.0.1
                                          10.1.254.64
</code></code></pre><p><code>Port forwarding service/my-app in namespace default, remote port 80 -&gt; 127.0.0.1:4503</code></p><p>Within the VM:<code>curl localhost:4503</code> &#9989;</p><p>From the host: <code>curl 192.168.64.2:4503</code>&#128721;</p><p>I know the VM is reachable on port 80 because <code>curl 192.168.64.2</code> returns default ngnix not found page. <em>FWIW I never installed ngnix and the service doesn't seem to be running /cannot turn it off.</em></p><p>I've been at this for a day and I'm stumped. I even tried the Vbox driver and manually configured a bridge adapter. I even created my own adapter...</p><pre><code><code>$ multipass exec -- microk8s-vm sudo bash -c "cat &gt; /etc/netplan/60-bridge.yaml" &lt;&lt;EOF
network:
  ethernets:
    enp0s8:                  # this is the interface name from above
      dhcp4: true
      dhcp4-overrides:       # this is needed so the default gateway
        route-metric: 200    # remains with the first interface
  version: 2
EOF
$ multipass exec microk8s-vm sudo netplan apply
</code></code></pre><p>How can I reach this VM from the host?</p><h2>How to resolve the above issue ?</h2><p></p><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/kubernetes-resolving-port-accessibility-issues-for-microk8s-services-in-multipass">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Solving "PackageUriForbidden" Authorization Failure in Azure Cloud Service ES Deployment]]></title><description><![CDATA[To resolve the "PackageUriForbidden" error when deploying an Azure Cloud Service (Extended Support), follow these detailed steps]]></description><link>https://careerbytecode.substack.com/p/azure-cloud-solving-packageuriforbidden-authorization-error</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/azure-cloud-solving-packageuriforbidden-authorization-error</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Wed, 28 Aug 2024 19:48:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wSby!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wSby!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wSby!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wSby!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wSby!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wSby!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wSby!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77676,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wSby!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wSby!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wSby!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wSby!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba9a64a0-ac2c-457b-8ea3-2bcdf67f6b54_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>I am trying to redeploy an Azure Cloud Service (classic) to an "extended support" one since the former is being deprecated. Following <a href="https://learn.microsoft.com/en-gb/azure/cloud-services-extended-support/deploy-portal">this guide</a> and <a href="https://learn.microsoft.com/en-gb/azure/cloud-services-extended-support/deploy-prerequisite">the prerequisites</a> I have created a virtual network and new storage account. I set up a bunch of permissions and the <strong>Connectivity Check</strong> for my storage account indicates no problems. However when I try to create and deploy a new Cloud Service (Extended Support) using my (updated) .cscfg, .csdef and .cspkg files I get this error:</p><blockquote><p>Error:AuthorizationFailure, message:This request is not authorized to perform this operation. (Code: PackageUriForbidden)</p></blockquote><p>I've tried setting the container and blob access to public for the deploy files, I have added <strong>Network Contributor</strong> and <strong>Storage Blob Data Contributor</strong> to both the subscription and the cloud storage resources for my user account. What am I missing?</p><p></p><h2>How to resolve the above issue ?</h2><p>To resolve the "PackageUriForbidden" error when deploying an Azure Cloud Service (Extended Support), follow these detailed steps:</p><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/azure-cloud-solving-packageuriforbidden-authorization-error">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Priority Routing in Azure Traffic Manager for Effective Site Management]]></title><description><![CDATA[Instant Traffic Switching Between Live and Maintenance Sites in Azure]]></description><link>https://careerbytecode.substack.com/p/priority-routing-in-azure-traffic</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/priority-routing-in-azure-traffic</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 24 Aug 2024 21:09:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lzWA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lzWA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lzWA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lzWA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lzWA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lzWA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lzWA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80371,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lzWA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lzWA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lzWA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lzWA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47940ab5-e906-4508-b5d7-8a3851240cdf_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Once can easily setup Azure traffic manager with two endpoints:</p><ol><li><p>the e-commerce site you operate normally</p></li><li><p>the site with a static maintenance page (we user Azure static web)</p></li></ol><p>The requirement is to be able to put up the maintenance page any time, regardless of if the e-commerce site is up or down.</p><p>There are several routing methods in TM, but nothing which is "just use the enabled one".</p><p>We tried the "performance" routing method.</p><p>The problem is this: if we enable the site down endpoint (after a long period of not using it), and disable the e-commerce endpoint, there is a long period (about a minute) where TM is checking the endpoint status of the newly enabled endpoint, where "new" users see this message: site not found, DNS name not resolved instead of the site down page. If they keep refreshing, after around a minute they see the maintenance page.</p><p>Any suggestions on how to make the switch instant? Ideally I would want to disable all the endpoint health checks, but cant see a way to do this. This is especially true of our non-prod envs, which cant be seen without our VPN, so Azure can't actually check the health.</p><p>This is separate to the issue that users on the e-commerce site will continue to see the e-commerce site after the switch, as their browsers are caching the DNS records (we set them to the min, which is 10 mins).</p><h2>How to resolve the above issue ?</h2><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/priority-routing-in-azure-traffic">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Optimizing DNS Resolution for Balanced Traffic in Azure Traffic Manager]]></title><description><![CDATA[Advanced Techniques for Controlling Traffic Flow in Azure Traffic Manager]]></description><link>https://careerbytecode.substack.com/p/azure-balanced-dns-traffic-issues-troubleshooting</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/azure-balanced-dns-traffic-issues-troubleshooting</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 24 Aug 2024 21:01:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!P8Ez!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P8Ez!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P8Ez!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!P8Ez!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!P8Ez!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!P8Ez!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P8Ez!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87821,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P8Ez!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!P8Ez!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!P8Ez!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!P8Ez!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81f2bbe4-1677-4aec-9bb1-49d567655c8a_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>We built a traffic manager with a weight routing method (former round robin mode), and configured two endpoints with the same weight value.</p><p>We expected that the traffic would be evenly distributed to two endpoints. But actually, we saw one endpoint get much more traffic than another one.</p><p>We then checked the "automation script" of traffic manager on portal and found this:</p><pre><code><code>{
    "name": "test1",
    "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
    "properties": {
        "endpointStatus": "Enabled",
        "target": "www.abc.com",
        "weight": 1,
        "priority": 1,
        "endpointLocation": null
    }
},
{
    "name": "test2",
    "type": "Microsoft.Network/trafficManagerProfiles/externalEndpoints",
    "properties": {
        "endpointStatus": "Enabled",
        "target": "www.xyz.com",
        "weight": 1,
        "priority": 2,
        "endpointLocation": null
    }
}
</code></code></pre><p>There is "priority" in the above template, what priority mean in weight routing mode? Will this setting affect the traffic routing?</p><p></p><h2>How to resolve the above issue ?</h2><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/azure-balanced-dns-traffic-issues-troubleshooting">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Azure Traffic Manager-Troubleshooting Subnet Routing a Case Study]]></title><description><![CDATA[Why Your Azure Traffic Manager's Subnet Routing Might Not Be Working as Expected]]></description><link>https://careerbytecode.substack.com/p/azure-traffic-manager-troubleshooting</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/azure-traffic-manager-troubleshooting</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 24 Aug 2024 20:52:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!oI11!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oI11!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oI11!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oI11!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oI11!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oI11!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oI11!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:74836,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oI11!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oI11!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oI11!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oI11!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6245445a-8a89-4ea9-91ff-216dcf9fe692_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>I'm new to Azure. I'm trying to set up a Traffic Manager in order to DNS load balance between two endpoints. I have created a Traffic Manager with two endpoints with subnet routing. In order to test it, I looked up my public IP address and provided the CIDR range which contains my IP to one of the endpoint's subnet config. But somehow, my DNS lookup does not resolve to the intended target. I'm not sure if I'm doing something wrong or if my understanding of Azure Traffic Manager with subnet routing is incorrect.</p><p>I also have two follow up questions and would love to have answers to them as well.</p><ol><li><p>Are the endpoints configured ordered?</p></li><li><p>Currently, it says that I can only configure 20 ranges by default. Is there a way to increase that limit?</p></li></ol><h2>How to resolve the above issue ?</h2><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/azure-traffic-manager-troubleshooting">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Error creating AWS VPC]]></title><description><![CDATA[Unable to find main route table for vpc: vpc-02de8520acae014f4]]></description><link>https://careerbytecode.substack.com/p/error-creating-aws-vpc</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/error-creating-aws-vpc</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sun, 18 Aug 2024 21:22:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Pbk8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pbk8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pbk8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Pbk8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Pbk8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Pbk8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pbk8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77539,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Pbk8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Pbk8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Pbk8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Pbk8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d45866d-4f47-4ad5-a38b-7d62634cb901_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h1>Error creating AWS VPC: There was an error creating your VPC: Unable to find main route table for vpc</h1><p></p><p>I have tried creating a VPC twice now and both times it's errored out with:</p><blockquote><p>There was an error creating your VPC: Unable to find main route table for vpc: vpc-02de8520acae014f4</p></blockquote><p>I've tried using the following settings:</p><ul><li><p>Used the wizard to choose public + private</p></li><li><p>IPv4 CIDR: 10.0.0.0/16 (no IPv6)</p></li><li><p>VPC Name: myvpc</p></li><li><p>Public subnet:</p><ul><li><p>CIDR 10.0.10.0/24</p></li><li><p>AZ: us-east-1a</p></li><li><p>Name: Public Subnet A</p></li></ul></li><li><p>Private subnet:</p><ul><li><p>CIDR 10.0.20.0/24</p></li><li><p>AZ: us-east-1a</p></li><li><p>Name: Private Subnet A</p></li></ul></li><li><p>NAT gateway:</p><ul><li><p>Elastic IP Allocation ID: (entered an elastic ip I created)</p></li></ul></li></ul><p>I can't seem to find any more info beyond that error. This is a new AWS account and I've never created anything else in here. I'm on an account that has the AdministratorAccess policy.</p><p></p><h2>How to resolve the above issue ?</h2><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/error-creating-aws-vpc">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[I am encountering error in writing a playbook in ansible]]></title><description><![CDATA[Ansible Troubleshooting]]></description><link>https://careerbytecode.substack.com/p/ansible-playbook-error</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/ansible-playbook-error</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Mon, 05 Aug 2024 08:33:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TUUR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TUUR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TUUR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TUUR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TUUR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TUUR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TUUR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:59223,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TUUR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TUUR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TUUR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TUUR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3732cfef-9323-48f0-8d69-e91d5fecd5f3_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>I am writing an ansible playbook and I get error "command is not a vlid attribute for a play"</p><p>My code:</p><pre><code><code>---

-
 name: "This is our first play"
 hosts: tazhar
 tasks:
-
 name: "create a dummy file on server1"
 command: touch /tmp/ansible_dummywserver.txt
</code></code></pre><p>"your timely assistance will mean a lot"</p><p></p><h1>Troubleshooting and Answer for the above issue :</h1><p></p><p>The error you're&#8230;</p>
      <p>
          <a href="https://careerbytecode.substack.com/p/ansible-playbook-error">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AWS ec2 instance stops every 3rd day]]></title><description><![CDATA[AWS Cloud - Troubleshooting]]></description><link>https://careerbytecode.substack.com/p/aws-ec2-instance-stops-every-3rd</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/aws-ec2-instance-stops-every-3rd</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Mon, 05 Aug 2024 08:19:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!fi2M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fi2M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fi2M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!fi2M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!fi2M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!fi2M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fi2M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:70051,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fi2M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!fi2M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!fi2M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!fi2M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0867a481-31f3-4a6c-9018-c0661a7988bf_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>i have an ec2 instance running on AWS.. it runs only for 2 or 3 days.. after that i get status check error 'Instance reachability check failed'. i dont understand why it is happening. can someone help me with this issue. and just for reference node server puppeteer along with some api call. Usual api call to server could take aorund 10-35 second due to the parallel calls it makes inside the node api. and following i am sharing some system logs that received at the end</p><pre><code><code>
[[0;32m  OK  [0m] Finished [0;1;39mRemove Stale Onli&#226;&#166;ext4 Metadata Check Snapshots[0m.
[[0;32m  OK  [0m] Finished [0;1;39mGRUB failed boot detection[0m.
[[0;32m  OK  [0m] Started [0;1;39mLSB: automatic crash report generation[0m.
[[0;32m  OK  [0m] Started [0;1;39mAccounts Service[0m.
[[0;32m  OK  [0m] Started [0;1;39mA high performance&#226;&#166;er and a reverse proxy server[0m.
[[0;32m  OK  [0m] Started [0;1;39mModem Manager[0m.
[[0;32m  OK  [0m] Started [0;1;39mDisk Manager[0m.
[[0;32m  OK  [0m] Started [0;1;39mLogin Service[0m.
[[0;32m  OK  [0m] Started [0;1;39mUnattended Upgrades Shutdown[0m.
[[0;32m  OK  [0m] Started [0;1;39mHostname Service[0m.
[[0;32m  OK  [0m] Started [0;1;39mDispatcher daemon for systemd-networkd[0m.
[[0;32m  OK  [0m] Finished [0;1;39mEC2 Instance Connect Host Key Harvesting[0m.
         Starting [0;1;39mOpenBSD Secure Shell server[0m...
[[0;32m  OK  [0m] Started [0;1;39mOpenBSD Secure Shell server[0m.


Ubuntu 20.04.6 LTS ip-172-31-26-38 ttyS0

ip-172-31-26-38 login: [   30.308818] cloud-init[1458]: Cloud-init v. 23.1.2-0ubuntu0~20.04.2 running 'modules:config' at Mon, 09 Oct 2023 12:49:22 +0000. Up 30.17 seconds.
[   31.169166] cloud-init[1465]: Cloud-init v. 23.1.2-0ubuntu0~20.04.2 running 'modules:final' at Mon, 09 Oct 2023 12:49:23 +0000. Up 30.97 seconds.
[   31.169317] cloud-init[1465]: Cloud-init v. 23.1.2-0ubuntu0~20.04.2 finished at Mon, 09 Oct 2023 12:49:23 +0000. Datasource DataSourceEc2Local.  Up 31.16 seconds
    
</code></code></pre><p>i tried making changes to ec2 security groups.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0vnJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0vnJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 424w, https://substackcdn.com/image/fetch/$s_!0vnJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 848w, https://substackcdn.com/image/fetch/$s_!0vnJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 1272w, https://substackcdn.com/image/fetch/$s_!0vnJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0vnJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png" width="428" height="232" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:232,&quot;width&quot;:428,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;security roups&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="security roups" title="security roups" srcset="https://substackcdn.com/image/fetch/$s_!0vnJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 424w, https://substackcdn.com/image/fetch/$s_!0vnJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 848w, https://substackcdn.com/image/fetch/$s_!0vnJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 1272w, https://substackcdn.com/image/fetch/$s_!0vnJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa835137d-d8b1-4e66-8d3e-abccd844bca6_428x232.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><h1>Troubleshooting and Answer for the above issue :</h1><p>It sounds like you are experiencing a recurring problem with your AWS EC2 instance failing the "Instance reachability check" every few days. This issue could be caused by a variety of factors, including system resource constraints, configuration problems, or underlying issues with the instance or the AWS infrastructure. Here&#8217;s a detailed plan to diagnose and potentially resolve this issue.</p><p></p><h3>Step 1: Monitor System Resources</h3><p>First, closely monitor the CPU, memory (RAM), disk usage, and network activity on your instance. This can help identify if the instance is being overloaded, which could lead to failures.</p><ul><li><p><strong>CPU and Memory Usage</strong>: Use CloudWatch to monitor CPU and memory utilization. Set up alarms to notify you when usage is nearing capacity.</p></li><li><p><strong>Disk Usage</strong>: Ensure that your disk isn't full. A full disk can cause many services, including logging and cloud-init, to fail.</p></li><li><p><strong>Network Usage</strong>: Monitor bandwidth to see if your instance is experiencing unusually high network traffic, which might indicate a DDoS attack or another type of misuse.</p></li></ul><h3>Step 2: Check CPU Credit Balance</h3><p>If you are using a T2 or T3 instance (burstable performance instances), check your CPU credit balance. Insufficient CPU credits can severely limit your instance&#8217;s CPU usage, causing processes to become unresponsive.</p><ul><li><p>You can monitor CPU credit usage and balance via the AWS Management Console or by setting up CloudWatch alarms to alert you when credits are low.</p></li></ul><h3>Step 3: Analyze Logs</h3><p>Since you have access to some system logs, look deeper into them to see if there are any warnings or errors immediately before the shutdowns occur.</p><ul><li><p><strong>System Logs</strong>: Check <code>/var/log/syslog</code> and <code>/var/log/messages</code> for any errors related to hardware or software issues.</p></li><li><p><strong>Application Logs</strong>: Since you are running a Node server with Puppeteer, check the application logs to see if there are errors or excessive resource usage logged by your application.</p></li></ul><h3>Step 4: Configure Auto-Recovery</h3><p>AWS allows you to set up auto-recovery for instances when a system status check fails. This can be a temporary workaround while you investigate the root cause.</p><ul><li><p>Set up an AWS CloudWatch alarm that triggers the recovery action for your instance when a status check fails.</p></li></ul><h3>Step 5: Update and Upgrade</h3><p>Ensure your instance is running the latest software versions, which can include important stability fixes.</p><ul><li><p><strong>Update OS</strong>: Run <code>sudo apt-get update</code> and <code>sudo apt-get upgrade</code> to ensure all packages are up to date.</p></li><li><p><strong>Update Node and NPM Packages</strong>: Ensure that Node.js and all npm packages are updated to their latest stable versions.</p></li></ul><h3>Step 6: Stress Test</h3><p>If updates do not resolve the issue, consider conducting stress tests to identify potential failures under load.</p><ul><li><p>Use tools like <code>stress</code> or <code>sysbench</code> to test how your instance performs under high CPU, memory, and I/O load.</p></li></ul><h3>Step 7: Review Instance Configuration</h3><p>Review your instance&#8217;s configuration settings in AWS:</p><ul><li><p><strong>Security Groups and Network ACLs</strong>: Ensure that your instance's security settings are not too restrictive, potentially blocking critical traffic.</p></li><li><p><strong>Instance Type</strong>: Consider changing the instance type to a more robust one if resource limits are consistently being hit.</p></li></ul><h3>Step 8: Contact AWS Support</h3><p>If the problem persists and you cannot identify the cause, consider contacting AWS Support. They can provide insights and guidance specific to your environment and usage patterns.</p><h3>Conclusion</h3><p>By systematically addressing each potential cause, you can better understand why your instance fails and implement a solution. Monitoring, resource management, and regular updates are key practices to maintain the health of your AWS EC2 instance.</p>]]></content:encoded></item><item><title><![CDATA[GCP VM shut itself down, won't restart]]></title><description><![CDATA[Troubleshooting GCP Cloud]]></description><link>https://careerbytecode.substack.com/p/gcp-vm-shut-itself-down-wont-restart</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/gcp-vm-shut-itself-down-wont-restart</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sun, 04 Aug 2024 18:38:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bTpd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bTpd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bTpd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bTpd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bTpd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bTpd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bTpd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61695,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bTpd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bTpd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bTpd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bTpd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0889fcd6-a137-4997-b56a-e5e405b8434b_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>Bit panicky here because I can't troubleshoot the error on a production site and it appears to be completely down.</p><p>GCP - Compute Engine VM - N1-standard on the US-West-3C zone running a Bitnami Multisite Wordpress deployment</p><p>About 2 hours ago my VM stopped responding (as far as I could tell with monitoring tools) and I was unable to SSH into it or connect in any way. I've experienced this occasionally in the past so my process was to grab a snapshot and restart the VM. I did manage to get the snapshot, however it stopped the VM by itself and I'm now stuck where I can't restart the VM.</p><p>The error I'm getting is:</p><blockquote><p>Failed to start name-of-vm: A n1-standard-1 VM instance is currently unavailable in the us-west3-c zone. Alternatively, you can try your request again with a different VM hardware configuration or at a later time. For more information, see the troubleshooting documentation.</p></blockquote><p>I tried changing my configuration (it used to be a custom VM) but that didn't do anything.</p><p>Searching for similar errors I've found threads about certain Zones running out of resources, but as far as I can tell this error doesn't specifically say 'run out of resources' and the status of the US-West-3C zone is fine. I can't imagine it would run out in a way where it can't even start a measly n1 vm.</p><p>Unfortunately due to some mismanagement this project isn't umbrella'd in our Google Workspace/Organization so I can't request technical support for it.</p><p>Any assistance or help pointing to some resources would be greatly appreciated.</p><p></p><h1>Troubleshooting and Answer for the above issue :</h1><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/gcp-vm-shut-itself-down-wont-restart">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Error starting GCP virtual machine - Not enough resources available]]></title><description><![CDATA[Troubleshooting GCP Cloud]]></description><link>https://careerbytecode.substack.com/p/error-starting-gcp-virtual-machine</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/error-starting-gcp-virtual-machine</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sun, 04 Aug 2024 18:26:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ba64!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ba64!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ba64!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ba64!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ba64!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ba64!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ba64!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:65041,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ba64!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ba64!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ba64!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ba64!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F990fa6d0-0067-4c0f-976a-a4eeb637a82d_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>I am trying to start an virtual machine on Google Cloud. I get an error that there isn't enough resources to fulfill my request.</p><p>I have been using Google Cloud for about one week to study and try automated trading systems through Metatrader5 on a Linux server.</p><p>I was able to use my machine using VNC server, even this morning, but suddenly all my machines (are all on same location) started to show an error when trying to start:</p><blockquote><p>The zone 'projects/metatrader-227016/zones/southamerica-east1-b' does not have enough resources available to fulfill the request. Try a different zone, or try again later.</p></blockquote><p>I read about moving my instance to another region, but it's not a simple instruction. What is strange is that my VM is really small and lightweight.</p><h1>Troubleshooting and Answer for the above issue :</h1><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/error-starting-gcp-virtual-machine">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Azure Network Watcher | Connection troubleshoot -- NoRouteLearned]]></title><description><![CDATA[AZURE Cloud - Troubleshooting]]></description><link>https://careerbytecode.substack.com/p/azure-network-watcher-connection</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/azure-network-watcher-connection</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 03 Aug 2024 10:53:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!cl3v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cl3v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cl3v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cl3v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cl3v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cl3v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cl3v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:62167,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cl3v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!cl3v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!cl3v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!cl3v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed8c7eb0-6ca4-44d8-9324-49c7f7ecc2d0_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>Not able to RDP to the azure vm from vm located in another vnet. Vnet to vnet has site to site vpn connection and when i perform Network Watcher | Connection troubleshoot i can see that traffic is reaching from source vm ---&gt; AzureFW--&gt;-Source VPN GW---&gt; Destination VPN GW---- then it point to destination vm ip as next hop and getting error message as listed below Next hop IP address</p><h2>RTT from source (ms)</h2><p>Issue {"origin":"Local","severity":"Warning","type":"NoRouteLearned","context":[]}</p><p>Checked NSG diag , IP Flow, Next hop and confirmed that it is working fine.</p><p></p><h1>Troubleshooting and Answer for the above issue :</h1><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/azure-network-watcher-connection">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[az login - Azure connection issues locally]]></title><description><![CDATA[AZURE Cloud Troubleshooting]]></description><link>https://careerbytecode.substack.com/p/az-login-azure-connection-issues</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/az-login-azure-connection-issues</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 03 Aug 2024 10:40:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!R6QJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R6QJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R6QJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!R6QJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!R6QJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!R6QJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R6QJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58337,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R6QJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!R6QJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!R6QJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!R6QJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5df724-1d72-4d1b-8450-11c76914ac44_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>Unable to connect to azure from my laptop unless I hotspot first.</p><p>I tried <code>az login</code> which just hangs on 'Starting new HTTPS connection login.microsoftonline.com:443' seen a suggestion online to try <code>python -c "import requests; print(requests.get('http://login.microsoftonline.com/').status_code)"</code> and get a 200.</p><p>Mysteriously I connect my laptop to my phones h&#8230;</p>
      <p>
          <a href="https://careerbytecode.substack.com/p/az-login-azure-connection-issues">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Terraform init not working when specifying modules]]></title><description><![CDATA[Terraform - troubleshooting]]></description><link>https://careerbytecode.substack.com/p/terraform-init-not-working-when-specifying</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/terraform-init-not-working-when-specifying</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 03 Aug 2024 10:30:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!qxA7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qxA7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qxA7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qxA7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qxA7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qxA7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qxA7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56958,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qxA7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qxA7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qxA7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qxA7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ffe0040-054a-4fca-b98d-5ccad6bcb7c4_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>I am new to terraform and trying to fix a small issue which I am facing when testing modules.</p><p>Below is the folder structure I have in my local computer.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e5GZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e5GZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 424w, https://substackcdn.com/image/fetch/$s_!e5GZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 848w, https://substackcdn.com/image/fetch/$s_!e5GZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 1272w, https://substackcdn.com/image/fetch/$s_!e5GZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e5GZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png" width="194" height="205" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:205,&quot;width&quot;:194,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;enter image description here&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="enter image description here" title="enter image description here" srcset="https://substackcdn.com/image/fetch/$s_!e5GZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 424w, https://substackcdn.com/image/fetch/$s_!e5GZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 848w, https://substackcdn.com/image/fetch/$s_!e5GZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 1272w, https://substackcdn.com/image/fetch/$s_!e5GZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae58209f-6b47-4794-958f-d1c6bd9c3551_194x205.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>I have below code at storage folder level</p><pre><code><code>#-------storage/main.tf

provider "aws" {
  region = "us-east-1"
}

resource "aws_s3_bucket" "my-first-terraform-bucket" {
    bucket = "first-terraform-bucket"
    acl = "private"
    force_destroy = true
}
</code></code></pre><p>And below snippet from main_code level referencing storage module</p><pre><code><code>#-------main_code/main.tf

module "storage" {
    source = "../storage"
}
</code></code></pre><p>When I am issuing terraform init / plan / apply from storage folder it works absolutely fine and terraform creates the s3 bucket.</p><p>But when I am trying the same from main_code folder I am getting the below error -</p><pre><code><code>main_code@DFW11-8041WL3: terraform init
Initializing modules...
- module.storage
Error downloading modules: Error loading modules: module storage: No Terraform configuration files found in directory: .terraform/modules/0d1a7f4efdea90caaf99886fa2f65e95
</code></code></pre><p>I have read many issue boards on stack overflow and other github issue forums but did not help resolving this. Not sure what I am missing!</p><p></p><h1>Troubleshooting and Answer for the above issue :</h1><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/terraform-init-not-working-when-specifying">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to Dynamically Import IAM Resources in Terraform with Script Automation]]></title><description><![CDATA[Troubleshooting - Terraform]]></description><link>https://careerbytecode.substack.com/p/how-to-dynamically-import-iam-resources</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/how-to-dynamically-import-iam-resources</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 03 Aug 2024 10:21:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!XmNJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XmNJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XmNJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XmNJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XmNJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XmNJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XmNJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58140,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XmNJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XmNJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XmNJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XmNJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ce5048-90a4-4a41-a3fd-ec8882a3769e_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p></p><p>I am working on a Terraform configuration to manage IAM roles and accounts. I have the following module setup for IAM accounts:</p><p><strong>Module Reference Block:</strong></p><pre><code><code>module "iam_accounts" {
  source           = "./iam-account"
  for_each         = var.iam_accounts
  iam_account_name = each.key
  roles            = each.value.roles
  account_type     = each.value.type
  project_id       = var.project_id
}
</code></code></pre><p><strong>Base Module Code:</strong></p><pre><code><code>locals {
  roles_length = var.roles[0] == "" ? 0 : length(var.roles)
}

resource "google_project_iam_member" "iam_account_members" {
  for_each = var.roles != "" &amp;&amp; local.roles_length &gt; 0 ? { for role in var.roles : role =&gt; true } : {}
  project  = var.project_id
  role     = each.key
  member   = "${var.account_type}:${var.iam_account_name}"
}
</code></code></pre><p><code>tfvars</code> File:</p><pre><code><code>{
  "project_id": "sample-project",
  "iam_accounts": {
    "some-iam-account@org.com": {
      "type": "group",
      "roles": [
        "organizations/111111111/roles/ProjectBillingViewer",
        "roles/aiplatform.user"
       ]
      }
  }
}
</code></code></pre><p>I want to import existing resources into the Terraform state using the <code>import</code> block. Here is what I tried:</p><p><strong>Import Block:</strong></p><pre><code><code>import {
  for_each = var.iam_accounts
  id = each.value.roles
  to = module.iam_accounts[each.key].google_project_iam_member.iam_account_members[{for role in each.value.roles: role =&gt; true}]
}
</code></code></pre><p>However, I am getting the following error:</p><pre><code><code>Error: Invalid address

  on main.tf line 45, in import:
  45:   to = module.iam_accounts[each.key].google_project_iam_member.iam_account_members[{for role in each.value.roles: role =&gt; true}]

Invalid resource instance key: either a string or an integer is required.
</code></code></pre><h3>Question:</h3><p>How can I dynamically import existing IAM resources into the Terraform state file using the <code>import</code> block? What is the correct way to reference these resources dynamically?</p><p>Any help or guidance on how to achieve this would be greatly appreciated.</p><p></p><h1>Troubleshooting and Answer for the above issue :</h1><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/how-to-dynamically-import-iam-resources">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Terraform Module Error: "No changes. Your infrastructure matches the configuration]]></title><description><![CDATA[Terraform Automation: Troubleshooting]]></description><link>https://careerbytecode.substack.com/p/terraform-module-error-no-changes</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/terraform-module-error-no-changes</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sun, 28 Jul 2024 10:07:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Mbdv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Mbdv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Mbdv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Mbdv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Mbdv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Mbdv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Mbdv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:76105,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Mbdv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Mbdv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Mbdv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Mbdv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b427b48-2e46-4f60-b406-c9b8bf70ead6_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>I am trying to create a new bucket in AWS using terraform code. I have 3 files. main.tf - which has:</p><p></p><pre><code>terraform {   
    backend "s3" {    
         bucket = "test-terraform-statev1"     
         key    = "terraform.tfstate"     
         region = "us-east-2"   
    }   
    
    required_providers {     
        aws = {       
            source  = "hashicorp/aws"       
            version = "&gt;= 3.69"     
        }   
    } 
    
    required_version = "&gt;= 1.0.10"
}

module "s3_bucket" {
    source = "./s3.tf"
}

output "s3_bucket_id" {
    value = module.s3_bucket.aws_s3_bucket.s3_bucket.id
}</code></pre><p></p><p>s3.tf which has:</p><pre><code>resource "aws_s3_bucket" "s3_bucket" {
    bucket = "${var.bucket_name}"
    region = "us-east-2"
}</code></pre><p>variables.tf</p><pre><code>variable "bucket_name" {
    type    = string
    default = "bucket_name"
}</code></pre><p>and provider.tf</p><pre><code>provider "aws" {
    access_key = "${var.aws_access_key}"
    secret_key = "${var.aws_secret_key}"
    token      = "${var.aws_session_token}"
    region     = "us-east-2"
}</code></pre><p>( I gave actual values in the provider.tf for now)</p><p>I tried changing configuration like bucket name, variables, tags etc. but its not working at all. I tested whether credentials issue but was able to fetch buckets using AWS CLI with same details.</p><p></p><h1>Solution - Step-by-step for the above issue</h1><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/terraform-module-error-no-changes">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Integrating Health Probes into Classic Load Balancers in Azure Cloud Services Extended Support Applications]]></title><description><![CDATA[AZURE Classic Load Balancer Troubleshooting]]></description><link>https://careerbytecode.substack.com/p/integrating-health-probes-into-classic</link><guid isPermaLink="false">https://careerbytecode.substack.com/p/integrating-health-probes-into-classic</guid><dc:creator><![CDATA[CareerByteCode]]></dc:creator><pubDate>Sat, 27 Jul 2024 17:57:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!SUpv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SUpv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SUpv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!SUpv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!SUpv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!SUpv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SUpv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:63062,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SUpv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 424w, https://substackcdn.com/image/fetch/$s_!SUpv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 848w, https://substackcdn.com/image/fetch/$s_!SUpv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!SUpv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3f8cc98-a419-45c2-a5f5-140711ccee89_1280x720.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h1>Issue : </h1><p>Microsoft document says we can do it through the service def file. Is there any way we can do it via ARM template?</p><p><a href="https://learn.microsoft.com/en-us/azure/cloud-services/schema-csdef-loadbalancerprobe">https://learn.microsoft.com/en-us/azure/cloud-services/schema-csdef-loadbalancerprobe</a></p><p>I tried adding probe property in json but I see the error - Invalid request format. Unable to parse request. Do we have any quick start template to help?</p><p></p><h1>How to Fix : refer  to the below steps :</h1><p></p>
      <p>
          <a href="https://careerbytecode.substack.com/p/integrating-health-probes-into-classic">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>