<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prashant Singh</title>
    <description>The latest articles on DEV Community by Prashant Singh (@prashant_singh428).</description>
    <link>https://dev.to/prashant_singh428</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3881888%2F618ea595-a038-41ea-b138-4795fc3f9d4b.png</url>
      <title>DEV Community: Prashant Singh</title>
      <link>https://dev.to/prashant_singh428</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prashant_singh428"/>
    <language>en</language>
    <item>
      <title>If your API key is in your frontend code, it's no longer a secret.</title>
      <dc:creator>Prashant Singh</dc:creator>
      <pubDate>Sun, 02 Aug 2026 04:26:07 +0000</pubDate>
      <link>https://dev.to/prashant_singh428/if-your-api-key-is-in-your-frontend-code-its-no-longer-a-secret-kak</link>
      <guid>https://dev.to/prashant_singh428/if-your-api-key-is-in-your-frontend-code-its-no-longer-a-secret-kak</guid>
      <description>&lt;p&gt;🚨 &lt;strong&gt;"If your API key is in your frontend code, it's no longer a secret."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That one line completely changed how I think about web security. 🤯&lt;/p&gt;

&lt;p&gt;I recently read a security research report by &lt;strong&gt;RedHunt Labs&lt;/strong&gt;, and one statistic stopped me in my tracks...&lt;/p&gt;

&lt;p&gt;🔍 Researchers analyzed internet-facing web applications-starting with the &lt;strong&gt;top 1 million websites&lt;/strong&gt; and later expanding to &lt;strong&gt;~500 million domains&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;💥 They discovered &lt;strong&gt;1.67 MILLION+ exposed secrets.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But here's the scary part... 😳&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Nearly 77% of those exposed secrets were found inside JavaScript files running in users' browsers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That means:&lt;br&gt;
❌ API Keys&lt;br&gt;
❌ Cloud Credentials&lt;br&gt;
❌ Payment Tokens&lt;br&gt;
❌ Authentication Secrets&lt;/p&gt;

&lt;p&gt;...were all sitting in frontend code where &lt;strong&gt;anyone&lt;/strong&gt; could inspect them.&lt;/p&gt;

&lt;p&gt;🎯 My biggest takeaway?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Everything you send to the browser is public.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If your frontend can read it, &lt;strong&gt;an attacker can read it too.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The report also revealed production debug pages exposing sensitive information-not because of advanced hackers, but because of simple development and deployment mistakes. 😬&lt;/p&gt;

&lt;p&gt;As someone learning backend development, this is a lesson I'll never forget:&lt;/p&gt;

&lt;p&gt;🔒 &lt;strong&gt;Secrets belong on the backend.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ Store them in environment variables&lt;br&gt;
✅ Use proper authentication &amp;amp; authorization&lt;br&gt;
✅ Protect them with access controls&lt;br&gt;
✅ Follow secure deployment practices&lt;/p&gt;

&lt;p&gt;Building software isn't just about making it work.&lt;/p&gt;

&lt;p&gt;It's about making it &lt;strong&gt;secure&lt;/strong&gt;. 🛡️&lt;/p&gt;

&lt;p&gt;Every day I'm realizing that backend development isn't only about APIs and databases-it's also about protecting the data users trust us with.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;What's one security lesson that completely changed the way you write code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;👇 I'd love to hear it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm8hyclnylkeds6iaw7ky.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm8hyclnylkeds6iaw7ky.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftr1dpdjt2oynn93rmik5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftr1dpdjt2oynn93rmik5.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>git</category>
      <category>aws</category>
      <category>redhunt</category>
    </item>
    <item>
      <title>Fixing Cache Stampede &amp; API Latency Spike in Redis-Backed Dashboards</title>
      <dc:creator>Prashant Singh</dc:creator>
      <pubDate>Sun, 26 Jul 2026 07:50:35 +0000</pubDate>
      <link>https://dev.to/prashant_singh428/fixing-cache-stampede-api-latency-spike-in-redis-backed-dashboards-lha</link>
      <guid>https://dev.to/prashant_singh428/fixing-cache-stampede-api-latency-spike-in-redis-backed-dashboards-lha</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/bugsmash"&gt;DEV's Summer Bug Smash: Clear the Lineup&lt;/a&gt; powered by &lt;a href="https://sentry.io/" rel="noopener noreferrer"&gt;Sentry&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This project is a high-traffic financial affiliate dashboard built with Node.js, Express, and Redis. It processes real-time user metrics, rank calculations, and commission statistics across multiple active user tiers. The platform relies heavily on cached endpoints to serve heavy aggregation queries quickly to thousands of simultaneous users.&lt;/p&gt;

&lt;p&gt;During peak traffic events, cache invalidation triggered a severe cache stampede (thundering herd problem). When a high-frequency key expired or was invalidated after a data update, hundreds of concurrent incoming requests simultaneously bypassed the cache and hit the primary SQL database.&lt;/p&gt;

&lt;p&gt;Impact of the Bug:&lt;/p&gt;

&lt;p&gt;Sudden spikes in database CPU utilization (reaching 98%–100%).&lt;/p&gt;

&lt;p&gt;API response latency jumped from ~45ms to over 3,200ms.&lt;/p&gt;

&lt;p&gt;Frequent HTTP 504 Gateway Timeout errors during leaderboard and payout recalculations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://onecompiler.com/java/44wbvkafm" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;onecompiler.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;My Improvements:&lt;br&gt;
To resolve the bottleneck and ensure system resilience under high load, I implemented a multi-layered optimization strategy:&lt;/p&gt;

&lt;p&gt;Distributed Mutex Locking: Used Redis SET NX EX to guarantee that only a single worker recomputes the expensive query when a cache miss occurs.&lt;/p&gt;

&lt;p&gt;Stale-While-Revalidate Strategy: Configured background workers to update hot cache entries prior to expiration, eliminating synchronous blocking for active users.&lt;/p&gt;

&lt;p&gt;Benchmarking &amp;amp; Latency Reduction:&lt;/p&gt;

&lt;p&gt;p99 Latency: Dropped from 3,200ms to 38ms.&lt;/p&gt;

&lt;p&gt;Database Load: Reduced peak database CPU usage by 82%.&lt;/p&gt;

&lt;p&gt;Failure&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Use of Google AI
&lt;/h2&gt;

&lt;p&gt;Google AI (Gemini) was utilized during the post-mortem analysis to evaluate lock contention edge cases and optimize the exponential backoff algorithm for waiting threads. It assisted in identifying a potential deadlock condition when Redis connections dropped during lock release, allowing us to implement proper try/finally cleanup blocks.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>bugsmash</category>
    </item>
    <item>
      <title>Are your GitHub Actions workflows vulnerable to command injection?</title>
      <dc:creator>Prashant Singh</dc:creator>
      <pubDate>Sun, 26 Jul 2026 05:58:24 +0000</pubDate>
      <link>https://dev.to/prashant_singh428/are-your-github-actions-workflows-vulnerable-to-command-injection-26hh</link>
      <guid>https://dev.to/prashant_singh428/are-your-github-actions-workflows-vulnerable-to-command-injection-26hh</guid>
      <description>&lt;p&gt;Are your GitHub Actions workflows vulnerable to command injection?&lt;/p&gt;

&lt;p&gt;When writing custom GitHub Workflows, context data like issue titles, PR descriptions, branch names, and commit messages are often treated as safe string values. However, because these fields can be controlled by external users or contributors, they must be treated as untrusted input.&lt;/p&gt;

&lt;p&gt;If untrusted expressions (e.g., ${{ github.event.issue.title }}) are used directly inside inline run scripts, an attacker can craft inputs to inject arbitrary shell commands—potentially exposing repository secrets or write tokens.&lt;br&gt;
💡 Key Takeaway &amp;amp; Best Practice: Instead of directly interpolating context expressions into inline scripts, assign them to intermediate environment variables first:&lt;/p&gt;

&lt;p&gt;❌ Vulnerable:&lt;br&gt;
By storing the value in memory as an environment variable rather than evaluating it directly during script generation, you prevent command injection.&lt;br&gt;
Automating security checks using tools like CodeQL in your CI/CD pipeline can also help flag these expression injection patterns early.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F343qndialgll7xmhmn54.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F343qndialgll7xmhmn54.webp" alt=" " width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>cicd</category>
      <category>githubactions</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Countdown Begins: Preparing for My Next Chapter in Tech!</title>
      <dc:creator>Prashant Singh</dc:creator>
      <pubDate>Sun, 12 Jul 2026 10:13:01 +0000</pubDate>
      <link>https://dev.to/prashant_singh428/the-countdown-begins-preparing-for-my-next-chapter-in-tech-5b3k</link>
      <guid>https://dev.to/prashant_singh428/the-countdown-begins-preparing-for-my-next-chapter-in-tech-5b3k</guid>
      <description>&lt;p&gt;The offer is signed, the dates are set, and the countdown to my first official tech role is officially on! 🎓&lt;/p&gt;

&lt;p&gt;I am incredibly excited to announce that I will soon be joining the team as a Software Engineering.&lt;/p&gt;

&lt;p&gt;Before day one arrives, I’m spending my time diving deep into the tech stacks and engineering principles that bridge the gap between academic projects and production-scale systems. I'm focusing my preparation on a few core areas:&lt;/p&gt;

&lt;p&gt;System Design &amp;amp; Architecture: Shifting my mindset toward scalability, microservices, and understanding how data flows efficiently through high-throughput systems.&lt;/p&gt;

&lt;p&gt;Modern Tooling &amp;amp; Frameworks: Sharpening my skills in robust frontend/backend technologies, efficient database management, and cloud infrastructure.&lt;/p&gt;

&lt;p&gt;Clean Code &amp;amp; Collaborative Workflows: Practicing writing maintainable, production-grade code and mastering Git strategies for seamless team collaboration.&lt;/p&gt;

&lt;p&gt;More than anything, I am eager to learn from experienced engineers, tackle real-world complexities, and see firsthand how a modern tech pipeline operates at scale.&lt;/p&gt;

&lt;p&gt;The learning curve ahead is bound to be steep, but I couldn't be more ready for the challenge.&lt;/p&gt;

&lt;p&gt;To everyone who has guided, mentored, and supported me up to this point-thank you. Let’s build something great soon! &lt;/p&gt;

</description>
      <category>freshers</category>
      <category>hiring</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Between Want and Need: What Economics Gets Wrong</title>
      <dc:creator>Prashant Singh</dc:creator>
      <pubDate>Thu, 07 May 2026 10:48:39 +0000</pubDate>
      <link>https://dev.to/prashant_singh428/between-want-and-need-what-economics-gets-wrong-1dni</link>
      <guid>https://dev.to/prashant_singh428/between-want-and-need-what-economics-gets-wrong-1dni</guid>
      <description>&lt;p&gt;Every morning, 733 million people wake up hungry. They have a need - urgent and real. But in the language of markets, most of them don't exist. Because markets don't respond to need. They respond to demand. And demand requires money.&lt;br&gt;
Alfred Marshall defined it clearly in 1890: demand is not desire. It is desire backed by the power and willingness to pay. A starving person needs food whether they can afford it or not. But only the person who can pay creates a market signal.&lt;br&gt;
This gap between need and demand is not a small detail. It is the central fact of modern economic life.&lt;br&gt;
Abraham Maslow's hierarchy - validated across 123 countries and 60,000 respondents - confirms that human needs are universal. Food, safety, belonging, esteem, and purpose. Every person on earth experiences all five. But markets serve them in proportion to purchasing power, not urgency.&lt;br&gt;
Research makes this painfully visible. Healthcare and food, the things people cannot live without, carry the most inelastic demand. People go into debt for insulin. They skip meals to keep the lights on. The market's harshest pressure falls on those with the least power to resist it.&lt;br&gt;
And behavioral research by Kahneman and Tversky adds another layer: much of what we think we need has been constructed for us. Algorithms don't discover our preferences. They manufacture them.&lt;br&gt;
Markets are not broken. They do exactly what they were designed to do - serve effective demand. The problem is that effective demand and genuine human need are rarely the same thing.&lt;br&gt;
Every business decision, every investment, every policy built without understanding that gap is built on incomplete ground.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The distance between what people need and what economies provide is not a gap. It is a choice.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>economics</category>
      <category>needsvswants</category>
    </item>
    <item>
      <title>Why I Started Learning System Design as a Web Developer</title>
      <dc:creator>Prashant Singh</dc:creator>
      <pubDate>Thu, 16 Apr 2026 07:35:23 +0000</pubDate>
      <link>https://dev.to/prashant_singh428/why-i-started-learning-system-design-as-a-web-developer-518d</link>
      <guid>https://dev.to/prashant_singh428/why-i-started-learning-system-design-as-a-web-developer-518d</guid>
      <description>&lt;p&gt;I was reading a discussion on Reddit the other day that made me wonder whether system design is truly important for backend developers or just something emphasized in interviews. It got me thinking about how I approach my work as a developer.&lt;/p&gt;

&lt;p&gt;💡 My Realization&lt;/p&gt;

&lt;p&gt;When I first started as a web developer, I thought system design was for:&lt;br&gt;
• Big systems that handle a lot of users&lt;br&gt;
• Complicated architectures&lt;br&gt;
• Preparing for big tech interviews&lt;/p&gt;

&lt;p&gt;But the more I worked on real projects, the more I realized that system design is actually part of everyday backend development.&lt;/p&gt;

&lt;p&gt;🔍 Where System Design Applies in Practice&lt;/p&gt;

&lt;p&gt;System design shows up in things like:&lt;br&gt;
• Designing APIs that are reliable and scalable&lt;br&gt;
• Handling third-party integrations with different behaviors&lt;br&gt;
• Managing performance using caching, queues, and async processing&lt;br&gt;
• Building systems that are flexible and easy to extend&lt;/p&gt;

&lt;p&gt;Even small applications benefit from good design.&lt;/p&gt;

&lt;p&gt;⁉️ Why I Started Learning It&lt;/p&gt;

&lt;p&gt;I realized system design is not about size-it’s about problem-solving and decision-making.&lt;br&gt;
For example:&lt;br&gt;
• Handling services with different response times&lt;br&gt;
• Managing inconsistent data formats&lt;br&gt;
• Designing systems that continue working even when parts fail&lt;/p&gt;

&lt;p&gt;These are core engineering skills beyond just writing code.&lt;/p&gt;

&lt;p&gt;⬆️ Relevance in Modern Development&lt;/p&gt;

&lt;p&gt;With the rise of:&lt;br&gt;
• Microservices&lt;br&gt;
• Distributed systems&lt;br&gt;
• AI-assisted development&lt;br&gt;
The role of a developer is shifting toward:&lt;br&gt;
• Designing systems&lt;br&gt;
• Making informed decisions&lt;br&gt;
• Managing complexity&lt;/p&gt;

&lt;p&gt;🎯 Current Focus&lt;br&gt;
I’m currently working on:&lt;br&gt;
• Practical system design thinking&lt;br&gt;
• Understanding architectural trade-offs&lt;br&gt;
• Solving real-world backend problems&lt;/p&gt;

&lt;p&gt;💬 Closing Thought&lt;br&gt;
System design is not just an interview topic.&lt;br&gt;
It’s a mindset.&lt;br&gt;
I’m approaching it as a long-term investment to become a better backend engineer-not just a coder.&lt;br&gt;
I’d love to hear how others are approaching system design in their journey.&lt;br&gt;
hashtag#SystemDesign hashtag#BackendDevelopment hashtag#Reddit  i posted it &lt;/p&gt;

</description>
      <category>backend</category>
      <category>learning</category>
      <category>systemdesign</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
