<?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"><channel><title><![CDATA[My Personal Space]]></title><description><![CDATA[My Personal Space]]></description><link>https://blog.rajathjaiprakash.com</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 21:07:11 GMT</lastBuildDate><atom:link href="https://blog.rajathjaiprakash.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[𝗧𝘂𝗿𝗻𝗶𝗻𝗴 𝗮 𝗙𝘂𝗻 𝗜𝗱𝗲𝗮 𝗶𝗻𝘁𝗼 𝗮 𝗣𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻-𝗥𝗲𝗮𝗱𝘆 𝗦𝗲𝗿𝘃𝗶𝗰𝗲]]></title><description><![CDATA[I’ve recently been diving into Go, and after a few weeks of exploration, I decided to move beyond tutorials and build a functional sandbox project:
𝗗𝗲𝗻𝘆-𝗕𝘆-𝗗𝗲𝗳𝗮𝘂𝗹𝘁-𝗮𝘀-𝗮-𝗦𝗲𝗿𝘃𝗶𝗰𝗲 ]]></description><link>https://blog.rajathjaiprakash.com/deny-by-default-as-a-service</link><guid isPermaLink="true">https://blog.rajathjaiprakash.com/deny-by-default-as-a-service</guid><category><![CDATA[golang]]></category><category><![CDATA[Golang developer]]></category><category><![CDATA[api]]></category><category><![CDATA[no as a  service]]></category><category><![CDATA[dbdaas]]></category><dc:creator><![CDATA[Rajath Jaiprakash]]></dc:creator><pubDate>Sun, 05 Apr 2026 17:04:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6925c8b745fa60b6cb89725e/338333ee-a3ef-405c-ae9d-7cb036baec1f.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I’ve recently been diving into Go, and after a few weeks of exploration, I decided to move beyond tutorials and build a functional sandbox project:</p>
<p><strong>𝗗𝗲𝗻𝘆-𝗕𝘆-𝗗𝗲𝗳𝗮𝘂𝗹𝘁-𝗮𝘀-𝗮-𝗦𝗲𝗿𝘃𝗶𝗰𝗲 (𝗗𝗕𝗗𝗮𝗮𝗦)</strong></p>
<p>🚀 API: <a href="https://dbdaas.rajathjaiprakash.com/">https://dbdaas.rajathjaiprakash.com/</a><br />💻 GitHub: <a href="https://github.com/rajathjn/deny-by-default-as-a-service">rajathjn/deny-by-default-as-a-service: deny-by-default-as-a-service</a></p>
<p>Inspired by the "No-as-a-Service" concept, the API returns creative and sometimes sassy reasons to say "No," with an optional "Yes" toggle for balance. While the concept is lighthearted, I approached the implementation with the technical rigor expected of a production system.</p>
<p><strong>I strongly believe even hobby projects are opportunities to apply sound engineering principles.</strong></p>
<p>Here are the key choices I focused on:</p>
<p><strong>🔹𝗡𝗲𝘁𝘄𝗼𝗿𝗸 𝗥𝗲𝘀𝗶𝗹𝗶𝗲𝗻𝗰𝗲 &amp; 𝗖𝗼𝗻𝗻𝗲𝗰𝘁𝗶𝗼𝗻 𝗛𝗮𝗻𝗱𝗹𝗶𝗻𝗴</strong></p>
<p>To protect against resource exhaustion and Slowloris-style attacks, I moved beyond default server settings. I had to implement specific read, write, and idle timeout values to ensure the service remains resilient under connection pressure.</p>
<p><strong>🔹𝗥𝗮𝘁𝗲 𝗟𝗶𝗺𝗶𝘁𝗶𝗻𝗴 &amp; 𝗣𝗿𝗼𝘅𝘆 𝗔𝘄𝗮𝗿𝗲𝗻𝗲𝘀𝘀</strong></p>
<p>For a publicly accessible API, abuse prevention is essential. I had to implement a custom middleware and configure trusted proxy settings to ensure accurate client IP resolution behind load balancers, all to enforce a steady limit of 30 requests per minute per IP, ensuring fair usage while maintaining a stateless design.</p>
<p><strong>🔹𝗠𝗶𝗻𝗶𝗺𝗮𝗹𝗶𝘀𝘁 &amp; 𝗦𝗲𝗰𝘂𝗿𝗲 𝗖𝗼𝗻𝘁𝗮𝗶𝗻𝗲𝗿𝗶𝘇𝗮𝘁𝗶𝗼𝗻</strong></p>
<p>Security and efficiency were top priorities. I utilized a multi-stage Docker build to produce a final image based on scratch. This resulted in a hyper-lean container, which has a minimal runtime footprint and significantly reduces the attack surface by including only the compiled binary.</p>
<p><strong>🔹𝗘𝗺𝗯𝗲𝗱𝗱𝗲𝗱 𝗛𝗲𝗮𝗹𝘁𝗵 𝗦𝗶𝗴𝗻𝗮𝗹𝗶𝗻𝗴</strong></p>
<p>Since scratch images lack standard debugging utilities, I embedded a health flag directly into the binary. This allows the container to self-report health status via Docker health checks without external dependencies.</p>
<p><strong>🔹𝗚𝗿𝗮𝗰𝗲𝗳𝘂𝗹 𝗧𝗲𝗿𝗺𝗶𝗻𝗮𝘁𝗶𝗼𝗻</strong></p>
<p>Implemented signal handling to enable controlled shutdowns, allowing in-flight requests to complete while preventing new ones. This is critical for reliability during deployments and scaling events.</p>
<p><strong>Key Takeaway:</strong><br />The most rewarding part of this exercise was realizing how naturally Go supports building reliable, concurrent, and production-ready systems.<br />This project reinforced the importance of treating every system, no matter the scale, as an opportunity to practice production-grade engineering.</p>
<p>I’d love to hear your thoughts or feedback!</p>
<p><a href="https://www.linkedin.com/search/results/all/?keywords=%23golang&amp;origin=HASH_TAG_FROM_FEED"><strong>#Golang</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23cloudnative&amp;origin=HASH_TAG_FROM_FEED"><strong>#CloudNative</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23backenddevelopment&amp;origin=HASH_TAG_FROM_FEED"><strong>#BackendDevelopment</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23goprogramming&amp;origin=HASH_TAG_FROM_FEED"><strong>#GoProgramming</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23softwareengineering&amp;origin=HASH_TAG_FROM_FEED"><strong>#SoftwareEngineering</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23docker&amp;origin=HASH_TAG_FROM_FEED"><strong>#Docker</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23api&amp;origin=HASH_TAG_FROM_FEED"><strong>#API</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23softwarearchitecture&amp;origin=HASH_TAG_FROM_FEED"><strong>#SoftwareArchitecture</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23learninginpublic&amp;origin=HASH_TAG_FROM_FEED"><strong>#LearningInPublic</strong></a></p>
]]></content:encoded></item></channel></rss>