<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kamal Kant Prasad on Medium]]></title>
        <description><![CDATA[Stories by Kamal Kant Prasad on Medium]]></description>
        <link>https://medium.com/@kamalkant975?source=rss-669e202cea78------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tKxePZOGaYCyyRDHPrRYFQ@2x.jpeg</url>
            <title>Stories by Kamal Kant Prasad on Medium</title>
            <link>https://medium.com/@kamalkant975?source=rss-669e202cea78------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 01:22:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kamalkant975/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[5 JWT Authentication Bugs I Keep Seeing in Django REST Framework Projects]]></title>
            <link>https://medium.com/@kamalkant975/5-jwt-authentication-bugs-i-keep-seeing-in-django-rest-framework-projects-df3a49304d53?source=rss-669e202cea78------2</link>
            <guid isPermaLink="false">https://medium.com/p/df3a49304d53</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[django-rest-framework]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Kamal Kant Prasad]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 03:41:22 GMT</pubDate>
            <atom:updated>2026-11-17T03:41:22.311Z</atom:updated>
            <content:encoded><![CDATA[<h4>What 14 years of debugging production auth taught me, with fixes you can use today</h4><p>JWT authentication looks simple on a whiteboard. A user logs in, gets a token, and sends it with every request. But almost every Django team I’ve worked with has shipped at least one JWT bug to production, and a few of them were serious.</p><p>I’ve led backend teams on CRMs, CMS platforms and microservices for more than 14 years. These are the five JWT problems I see most often in Django REST Framework (DRF) projects, along with how to fix each one.</p><h3>1. Treating the payload as secret</h3><p>A JWT is signed, not encrypted. Anyone holding the token can Base64-decode the payload and read it. I’ve seen tokens carrying phone numbers, internal role names and even salary bands.</p><p><strong>The fix:</strong> Put only what the server needs to identify the user in the payload. Usually that’s a user ID and a token type.</p><pre>from rest_framework_simplejwt.tokens import RefreshToken</pre><pre>def get_tokens_for_user(user):<br>    refresh = RefreshToken.for_user(user)<br>    # Add only non-sensitive claims<br>    refresh[&quot;role&quot;] = user.role_code<br>    return {<br>        &quot;refresh&quot;: str(refresh),<br>        &quot;access&quot;: str(refresh.access_token),<br>    }</pre><p>A quick test: if you’d be uncomfortable seeing a claim printed in a browser console, it doesn’t belong in the token.</p><h3>2. Access tokens that live for days</h3><p>Long-lived access tokens are tempting because users never see “session expired.” The trouble is that a leaked token stays valid until it expires, and you can’t easily revoke a stateless JWT.</p><p><strong>The fix:</strong> Keep access tokens short and refresh tokens longer, and rotate the refresh tokens.</p><pre># settings.py<br>from datetime import timedelta</pre><pre>SIMPLE_JWT = {<br>    &quot;ACCESS_TOKEN_LIFETIME&quot;: timedelta(minutes=15),<br>    &quot;REFRESH_TOKEN_LIFETIME&quot;: timedelta(days=7),<br>    &quot;ROTATE_REFRESH_TOKENS&quot;: True,<br>    &quot;BLACKLIST_AFTER_ROTATION&quot;: True,<br>}</pre><p>Add rest_framework_simplejwt.token_blacklist to INSTALLED_APPS and run migrations, or the blacklist setting won&#39;t do anything.</p><h3>3. “Works locally, fails in production” because of clock skew</h3><p>This one wastes a lot of hours. Tokens work on a laptop, then randomly fail on staging with Token is invalid or expired. Often the cause is servers whose clocks are a few seconds apart, especially when one service issues tokens and another verifies them.</p><p><strong>The fix:</strong> Sync clocks with NTP on every node, then allow a small leeway:</p><pre>SIMPLE_JWT = {<br>    # ...<br>    &quot;LEEWAY&quot;: 10,  # seconds<br>}</pre><p>When I’m debugging this, the first thing I do is decode the token and compare the iat and exp timestamps with the server&#39;s current UTC time. A browser-based JWT decoder, like the ones in the free developer tools at <a href="https://onlinetoolkithub.com/">OnlineToolkitHub</a>, makes this a ten-second check. Only use test or expired tokens for this, never live production credentials.</p><h3>4. Storing tokens in localStorage</h3><p>Any JavaScript on your page can read localStorage, and that includes a compromised third-party script. One XSS vulnerability and every user’s token is gone.</p><p><strong>The fix:</strong> For browser clients, put the refresh token in an HttpOnly, Secure, SameSite cookie and keep the access token in memory.</p><pre>response.set_cookie(<br>    key=&quot;refresh_token&quot;,<br>    value=str(refresh),<br>    httponly=True,<br>    secure=True,<br>    samesite=&quot;Strict&quot;,<br>    max_age=7 * 24 * 60 * 60,<br>)</pre><p>Yes, this means handling CSRF for the refresh endpoint. That’s a much smaller problem than token theft.</p><h3>5. Not invalidating tokens when a password changes</h3><p>A user changes their password because they think their account was compromised, but the old tokens keep working. This is one of the most common audit findings I’ve seen.</p><p><strong>The fix:</strong> Store a per-user token version and check it during authentication.</p><pre># models.py<br>class User(AbstractUser):<br>    token_version = models.PositiveIntegerField(default=0)</pre><pre># authentication.py<br>from rest_framework_simplejwt.authentication import JWTAuthentication<br>from rest_framework_simplejwt.exceptions import InvalidToken</pre><pre>class VersionedJWTAuthentication(JWTAuthentication):<br>    def get_user(self, validated_token):<br>        user = super().get_user(validated_token)<br>        if validated_token.get(&quot;ver&quot;) != user.token_version:<br>            raise InvalidToken(&quot;Token has been revoked&quot;)<br>        return user</pre><p>Increment token_version on password change or &quot;log out of all devices,&quot; and add ver as a claim when you issue tokens. Every older token stops working right away.</p><h3>A quick checklist before you ship</h3><ul><li>Payload holds identifiers only, nothing sensitive</li><li>Access token lifetime is 15 minutes or less</li><li>Refresh tokens rotate and are blacklisted after use</li><li>Server clocks are synced, with a small leeway set</li><li>Browser clients keep refresh tokens in HttpOnly cookies</li><li>Password changes revoke existing tokens</li></ul><h3>Final thoughts</h3><p>JWTs aren’t insecure, but they’re easy to misuse because their failures are quiet. Nothing crashes. A token just keeps working longer than it should. If you go through the checklist above on your current project, there’s a good chance you’ll find at least one item to fix.</p><p>What JWT bug has caught your team out? Tell me in the comments.</p><p><em>Disclosure: I built OnlineToolkitHub, the free tools site linked above.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df3a49304d53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is a JWT? A Practical Guide to JSON Web Tokens]]></title>
            <link>https://medium.com/@kamalkant975/what-is-a-jwt-a-practical-guide-to-json-web-tokens-f12418fcf2bf?source=rss-669e202cea78------2</link>
            <guid isPermaLink="false">https://medium.com/p/f12418fcf2bf</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Kamal Kant Prasad]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 16:11:50 GMT</pubDate>
            <atom:updated>2026-11-07T16:11:50.902Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve built an API or added login to an app, you’ve almost certainly met a JWT. A JSON Web Token is a small piece of signed JSON that the server hands to a client after login. The client sends it back with every request, and the server checks the signature to confirm the token is genuine and unchanged.</p><h3>Three parts, separated by dots</h3><ul><li>Header: the signing algorithm, for example {“alg”:”HS256&quot;,”typ”:”JWT”}</li><li>Payload: the claims, such as sub (user ID), iat (issued at) and exp (expiry)</li><li>Signature: an HMAC, RSA or ECDSA signature over the header and payload</li></ul><p>A handy tip: almost every JWT starts with eyJ. That’s how {“ looks in base64url, so it’s a quick way to spot a token in logs or cookies.</p><h3>Signed, not encrypted</h3><p>Anyone holding a JWT can decode the payload without a key. The signature only stops tampering. Never put passwords, API keys or personal data in a token.</p><h3>HS256 vs RS256 vs ES256</h3><ul><li>HS256: one shared secret both signs and verifies. Fine when a single backend issues and checks its own tokens.</li><li>RS256: a private key signs and a public key verifies. The default at most identity providers, but the tokens are much larger.</li><li>ES256: public-key verification with far smaller signatures.</li></ul><h3>Verify, don’t just decode</h3><p>A safe verifier pins the algorithm instead of trusting the token’s header, checks exp and nbf with a few seconds of clock skew, confirms iss and aud, and only then reads the claims. Pinning the algorithm also blocks the classic “alg: none” and algorithm-confusion attacks.</p><h3>Mistakes I see most often</h3><ol><li>Using decode() where you meant verify().</li><li>Long-lived access tokens. Keep them to 5 to 15 minutes and pair them with a refresh token.</li><li>Writing exp in milliseconds instead of seconds.</li><li>Short HMAC secrets. Use at least 32 random bytes for HS256.</li><li>Stuffing so many claims into the token that it breaks proxy header limits.</li></ol><p>The full guide builds a real token in Node, tampers with it, and lists the exact error messages from jsonwebtoken and PyJWT for each mistake: <a href="https://www.onlinetoolkithub.com/blog/what-is-a-jwt">What Is a JWT? JSON Web Token Explained With Examples</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f12418fcf2bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is MCP? A Simple Guide to Model Context Protocol]]></title>
            <link>https://medium.com/@kamalkant975/what-is-mcp-a-simple-guide-to-model-context-protocol-380a2c3c0c2a?source=rss-669e202cea78------2</link>
            <guid isPermaLink="false">https://medium.com/p/380a2c3c0c2a</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Kamal Kant Prasad]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 05:44:08 GMT</pubDate>
            <atom:updated>2026-09-11T05:44:08.880Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve been following AI development recently, you’ve probably seen <strong>MCP</strong> mentioned everywhere.<br>MCP stands for <strong>Model Context Protocol</strong>.</p><p>At first, it can sound like another complicated AI acronym that you need to learn before building anything useful.</p><p>But the basic idea is actually quite simple:</p><blockquote><strong><em>MCP provides a standard way for AI applications to connect with external tools, data and systems.</em></strong></blockquote><p>And that matters because an AI model is much more useful when it can do things beyond generating text.</p><p>Imagine asking an AI assistant:</p><ul><li>“Check my GitHub issues.”</li><li>“Look up this customer in our database.”</li><li>“Read this file.”</li><li>“Create a support ticket.”</li><li>“Check today’s calendar.”</li><li>“Query our internal API.”</li></ul><p>The AI needs some way to communicate with all those systems.</p><p>That’s where MCP comes in.</p><h3>The problem MCP is trying to solve</h3><p>Before MCP, connecting an AI application to external systems often meant building custom integrations.<br>Suppose you have an AI application that needs access to:</p><ul><li>a database</li><li>GitHub</li><li>a calendar</li><li>a filesystem</li></ul><p>You might build a separate integration for every connection.<br>Now imagine you have five different AI applications.<br>You can quickly end up maintaining a large number of integrations.<br>That’s the real problem.<br>Instead of thinking:<br><strong>AI application → Database<br>AI application → GitHub<br>AI application → Calendar</strong></p><p>MCP introduces a standardized layer between the AI application and those systems.</p><p>Conceptually:</p><p><strong>AI Application → MCP → Tool/Data Source</strong></p><p>The result is a much more reusable integration model.</p><p>Your MCP server doesn’t need to know which particular AI application will connect to it.</p><p>It simply exposes its capabilities through the MCP protocol.</p><h3>So, what exactly is MCP?</h3><p>MCP is an <strong>open protocol</strong> introduced by Anthropic in late 2024.</p><p>It defines how an AI application can discover and interact with external capabilities.</p><p>One useful way to think about MCP is:</p><blockquote><strong><em>MCP is like a common language between AI applications and external tools.</em></strong></blockquote><p>The AI application speaks MCP.<br>The MCP server speaks MCP.</p><p>They can then communicate without requiring the server to have a custom integration for every individual AI application.<br>And importantly, MCP isn’t limited to Claude.</p><p>The protocol is model-agnostic. The host application decides which model it uses, while MCP standardizes communication between the host’s client and external servers.</p><h3>The three important parts of MCP</h3><p>One of the easiest ways to understand MCP is to learn its three main roles:<br><strong>Host → Client → Server<br></strong>Let’s break them down.</p><h3>1. Host</h3><p>The <strong>host</strong> is the AI application you’re actually using.<br>For example, it could be:</p><ul><li>an AI assistant</li><li>an IDE</li><li>a custom AI agent</li><li>another application that integrates an AI model</li></ul><p>The host is what the user interacts with.</p><h3>2. Client</h3><p>The <strong>MCP client</strong> lives inside the host application.<br>Its job is to communicate with MCP servers.<br>It handles things such as:</p><ul><li>connecting to servers</li><li>negotiating capabilities</li><li>discovering available tools</li><li>forwarding requests</li><li>returning results</li></ul><p>You can think of the client as the communication layer between the AI application and MCP servers.</p><h3>3. Server</h3><p>The <strong>MCP server</strong> exposes a particular capability.<br>That capability could be connected to:</p><ul><li>PostgreSQL</li><li>GitHub</li><li>Slack</li><li>files</li><li>an internal API</li><li>a SaaS application</li><li>another data source</li></ul><p>For example:</p><pre>AI Host<br>   |<br>   +-- MCP Client → GitHub MCP Server → GitHub<br>   |<br>   +-- MCP Client → Database MCP Server → PostgreSQL<br>   |<br>   +-- MCP Client → Internal MCP Server → Company API</pre><p>The same host can connect to multiple MCP servers.</p><h3>What does an MCP server actually provide?</h3><p>This is where MCP becomes particularly interesting.<br>An MCP server can expose different types of capabilities.<br>The important MCP primitives include:</p><h3>Tools</h3><p>Tools are actions that an AI application can invoke.<br>For example:</p><pre>create_ticket<br>send_email<br>run_query<br>search_repository</pre><p>The AI can decide when one of these tools is useful and request it.</p><h3>Resources</h3><p>Resources represent information that the AI can read.<br>For example:</p><ul><li>files</li><li>database records</li><li>documentation</li><li>Slack conversations</li><li>other data</li></ul><h3>Prompts</h3><p>MCP can also expose reusable prompt templates.<br>For example:</p><pre>summarize_incident</pre><p>A host application can make these prompts available to users or models.</p><h3>Sampling</h3><p>Sampling allows a server to request a model completion through the host, subject to the host’s approval and capabilities.</p><p>For most developers starting with MCP, <strong>Tools and Resources</strong> are probably the concepts you’ll encounter most often.</p><h3>How does an MCP connection work?</h3><p>You don’t necessarily need to understand the protocol internals to start using MCP, but having a basic picture helps.</p><p>MCP uses <strong>JSON-RPC 2.0</strong> messages.</p><p>Connections can use different transports, including:</p><ul><li><strong>stdio</strong> — commonly used when the host launches a local MCP server</li><li><strong>Streamable HTTP</strong> — useful when the MCP server is running remotely</li></ul><p>When the client connects to a server, they first perform a handshake.</p><p>They exchange information such as:</p><ul><li>protocol versions</li><li>supported capabilities</li><li>available features</li></ul><p>After that, the client can discover what the server provides.<br>For example:</p><pre>Client → Server<br>&quot;What capabilities do you support?&quot;</pre><pre>Server → Client<br>&quot;I support tools and resources.&quot;</pre><pre>Client → Server<br>&quot;What tools are available?&quot;</pre><pre>Server → Client<br>&quot;search_customer&quot;<br>&quot;create_ticket&quot;<br>&quot;get_customer_orders&quot;</pre><p>The AI application can then make those capabilities available to the model.</p><h3>MCP vs Function Calling</h3><p>This is probably one of the most common questions developers have.</p><p><strong>Is MCP the same thing as function calling?<br></strong>No.<br>But they are closely related.</p><p>With function calling, an LLM can be given definitions for functions that it is allowed to call.</p><p>For example:</p><pre>{<br>  &quot;name&quot;: &quot;get_weather&quot;,<br>  &quot;arguments&quot;: {<br>    &quot;location&quot;: &quot;Delhi&quot;<br>  }<br>}</pre><p>The model decides that it needs the weather information and requests the function.</p><p>MCP takes a broader approach.</p><p>Function definitions are typically part of a particular application’s implementation.</p><p>An MCP server, on the other hand, provides a standardized and discoverable interface that different MCP-compatible hosts can use.</p><p>A simple way to remember it:</p><p><strong>Function Calling</strong></p><blockquote><em>“My application has these functions. The model can call them.”</em></blockquote><p><strong>MCP</strong></p><blockquote><em>“Here is a standardized protocol through which compatible AI applications can discover and use my tools and data.”</em></blockquote><p>Neither automatically replaces the other.</p><p>In fact, an MCP-based application can still use function calling internally.</p><p>If you want a deeper comparison, I’ve also written a separate guide on <strong>MCP vs Function Calling</strong>.</p><h3>Do you actually need MCP?</h3><p>Here’s something I think is important to say:</p><p><strong>You don’t need MCP for every AI project.</strong></p><p>If you’re building a small internal chatbot with three hard-coded functions, introducing another protocol might simply make the project more complicated.</p><p>Traditional function calling could be perfectly fine.</p><p>MCP becomes more interesting when your application starts growing.</p><p>For example, MCP may make sense when:</p><h3>You have multiple AI applications</h3><p>Suppose your company has:</p><ul><li>an internal chatbot</li><li>an AI coding assistant</li><li>a customer-support agent</li></ul><p>All three need access to the same internal systems.</p><p>A standardized integration can become very useful.</p><h3>You want reusable integrations</h3><p>Instead of building the same database or GitHub integration separately for every AI application, you can expose the capability through an MCP server.</p><h3>You want users to add integrations</h3><p>If you’re building an AI platform, you might eventually want users to connect their own tools and services without requiring you to ship custom application code for every integration.</p><h3>You’re building an AI platform</h3><p>This is where the architecture becomes particularly interesting.</p><p>As the number of AI applications and external systems increases, maintaining individual integrations becomes increasingly expensive.</p><p>MCP can provide a common interface for those connections.</p><h3>MCP isn’t a replacement for APIs</h3><p>This is another important point.</p><p><strong>MCP does not replace your APIs.</strong></p><p>If you already have:</p><pre>Frontend → REST API → Database</pre><p>you don’t suddenly need to throw that architecture away.</p><p>Instead, you can think of MCP as an additional interface that makes capabilities available to AI applications.</p><p>For example:</p><pre>┌── Web Application<br>                     │<br>Database ← API ← Backend<br>                     │<br>                     └── MCP Server ← AI Application</pre><p>Your existing API can continue serving your normal applications while an MCP server provides an AI-friendly interface to selected capabilities.</p><p>This distinction is important because MCP is about <strong>how AI applications interact with tools and data</strong>, not about replacing every existing application architecture.</p><h3>Is MCP secure?</h3><p>MCP itself shouldn’t be treated as a magic security layer.</p><p>The protocol defines communication and message structures, but security still depends heavily on how the host and server are implemented.</p><p>Think about what happens when an AI can interact with real systems.<br>If an AI agent can:</p><ul><li>read private files</li><li>query a database</li><li>send emails</li><li>create tickets</li><li>modify records</li></ul><p>then permissions become extremely important.</p><p>You need to think about:</p><ul><li>authentication</li><li>authorization</li><li>least-privilege access</li><li>input validation</li><li>tool permissions</li><li>data exposure</li><li>logging</li><li>user consent</li></ul><p>In other words:</p><p><strong>Giving an AI access to a tool is powerful. Giving it unrestricted access is dangerous.</strong></p><p>MCP doesn’t automatically solve that problem. The host and server implementations still need proper security controls.</p><h3>Where MCP is heading</h3><p>The interesting thing about MCP isn’t just the protocol itself.<br>It’s the ecosystem developing around it.</p><p>As more developer tools, SaaS platforms and internal systems expose MCP servers, AI applications can potentially connect to a much wider range of services using a common approach.</p><p>That’s where the idea becomes powerful.<br>Imagine building an AI application without having to create a completely custom integration for every service.</p><p>Instead, your application can connect to compatible MCP servers.<br>The long-term value isn’t simply:</p><p><strong>“AI can call tools.”</strong></p><p>AI could already do that.</p><p>The bigger idea is:</p><blockquote><strong><em>AI applications can use a standardized way to discover and interact with a growing ecosystem of tools and data sources.</em></strong></blockquote><h3>A simple mental model for MCP</h3><p>If you remember only one thing from this article, remember this:</p><pre>AI Application<br>                    │<br>                MCP Client<br>                    │<br>          ┌─────────┼─────────┐<br>          ↓         ↓         ↓<br>       MCP Server MCP Server MCP Server<br>          ↓         ↓         ↓<br>       GitHub    Database   Internal API</pre><p>The <strong>host</strong> is the AI application.</p><p>The <strong>client</strong> handles MCP communication.</p><p>The <strong>server</strong> exposes tools and data.</p><p>And MCP defines the common protocol that allows them to communicate.</p><p>That’s the core idea.</p><h3>Final thoughts</h3><p>MCP can sound complicated when you first encounter terms like <strong>host, client, server, JSON-RPC, transports, resources and sampling</strong>.</p><p>But the underlying problem is quite practical.</p><p>AI applications increasingly need to interact with the world outside their context window.</p><p>They need access to databases, files, APIs, SaaS platforms and business systems.</p><p>Without a standard approach, every AI application can end up building its own collection of custom integrations.</p><p>MCP attempts to make those integrations more reusable and portable.</p><p>It’s not something every project needs.</p><p>For a small application with a handful of functions, traditional function calling may be simpler.</p><p>But if you’re building <strong>AI agents, AI platforms, developer tools or applications that need to connect to many external systems</strong>, MCP is definitely a technology worth understanding.</p><p>And that’s probably the best way to look at MCP:</p><p><strong>Not as another AI buzzword, but as an attempt to solve a very real integration problem.</strong></p><h3>What’s next?</h3><p>If you’re learning MCP, I would recommend going beyond the basic definition.</p><p>The next useful topics are:</p><ul><li><strong>MCP vs Function Calling</strong> — understand where the two approaches differ.</li><li><strong>MCP Architecture</strong> — understand hosts, clients, servers, transports and capability negotiation.</li><li><strong>MCP Security</strong> — understand the risks of allowing AI agents to interact with real systems.</li></ul><p>That gives you a much better foundation for deciding where MCP actually belongs in an AI architecture.</p><p><strong>Original OnlineToolkitHub guide:</strong> <a href="https://www.onlinetoolkithub.com/blog/what-is-mcp">What Is MCP (Model Context Protocol)? A Complete Guide</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=380a2c3c0c2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Redis vs Memcached: Which One Should You Use?]]></title>
            <link>https://medium.com/@kamalkant975/redis-vs-memcached-which-one-should-you-use-d5fe0d2fd010?source=rss-669e202cea78------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5fe0d2fd010</guid>
            <category><![CDATA[backend-engineering]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[memcached]]></category>
            <dc:creator><![CDATA[Kamal Kant Prasad]]></dc:creator>
            <pubDate>Thu, 03 Sep 2026 09:48:41 GMT</pubDate>
            <atom:updated>2026-09-03T09:48:41.185Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever worked on an application that was hitting the database too often, you’ve probably looked at caching.</p><p>Redis and Memcached are two popular choices. Both store data in memory and can make applications much faster, but they aren’t really designed for the same kind of work.</p><p><strong>Memcached is simple.</strong><br> It’s a great fit when you need a straightforward, fast cache for frequently accessed data and don’t need much more than key-value storage.</p><p><strong>Redis gives you more options.</strong><br> Along with caching, it supports data structures such as lists, sets, hashes and sorted sets. It also supports features like persistence, replication, Pub/Sub and Streams.</p><p>So how do I usually think about the choice?</p><ul><li>Need a simple distributed cache → <strong>Memcached</strong></li><li>Need richer data structures → <strong>Redis</strong></li><li>Need Pub/Sub or real-time features → <strong>Redis</strong></li><li>Need persistence options → <strong>Redis</strong></li><li>Want the simplest caching model → <strong>Memcached</strong></li></ul><p>There isn’t a universal winner. The right choice depends on what your application actually needs.</p><p>I recently wrote a more detailed comparison covering <strong>performance, scalability, persistence, high availability, data structures and real-world use cases</strong>:</p><p>👉 <strong>Read the full comparison:</strong><br> <a href="https://www.onlinetoolkithub.com/blog/redis-vs-memcached?utm_source=chatgpt.com">https://www.onlinetoolkithub.com/blog/redis-vs-memcached</a></p><p>If you’re deciding between Redis and Memcached for a project, benchmark your actual workload rather than choosing based only on a benchmark you found online.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5fe0d2fd010" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django vs FastAPI: How I Decide Which Python Framework to Use]]></title>
            <link>https://medium.com/@kamalkant975/django-vs-fastapi-how-i-decide-which-python-framework-to-use-bf31f7f126df?source=rss-669e202cea78------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf31f7f126df</guid>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[djano]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Kamal Kant Prasad]]></dc:creator>
            <pubDate>Tue, 25 Aug 2026 03:12:02 GMT</pubDate>
            <atom:updated>2026-08-25T03:12:02.341Z</atom:updated>
            <content:encoded><![CDATA[<p>Choosing a Python framework isn’t always about finding the fastest option.</p><p>When starting a new backend project, developers often compare <strong>Django</strong> and <strong>FastAPI</strong>. Both are excellent frameworks, but they solve somewhat different problems.</p><p>I’ve found that the better question isn’t:</p><blockquote><strong><em>Which framework is better?</em></strong></blockquote><p>It’s:</p><blockquote><strong><em>Which framework fits the application I’m building?</em></strong></blockquote><p>Here’s the way I think about the decision.</p><h3>Django: The “Batteries Included” Approach</h3><p>Django is a full-featured web framework.</p><p>It gives you many things that a typical business application needs:</p><ul><li>ORM</li><li>Authentication</li><li>Admin panel</li><li>URL routing</li><li>Forms</li><li>Sessions</li><li>Security features</li><li>Middleware</li><li>Templates</li><li>Database migrations</li></ul><p>That makes Django particularly attractive for applications where you need more than just an API.</p><p>For example, imagine building a:</p><ul><li>CRM</li><li>ERP</li><li>E-commerce application</li><li>CMS</li><li>Admin dashboard</li><li>Business management system</li></ul><p>You may need authentication, users, permissions, database models and an administrative interface.</p><p>Django provides many of these building blocks from the beginning.</p><p>That’s a major productivity advantage.</p><h3>FastAPI: API First</h3><p>FastAPI takes a different approach.</p><p>Instead of trying to provide everything required for a complete web application, it focuses heavily on API development.<br>Some of its strengths include:</p><ul><li>Python type hints</li><li>Automatic API documentation</li><li>OpenAPI support</li><li>Pydantic validation</li><li>Async programming</li><li>Lightweight API development</li></ul><p>This makes FastAPI particularly interesting for:</p><ul><li>REST APIs</li><li>Microservices</li><li>AI applications</li><li>Machine learning services</li><li>Mobile backends</li><li>SaaS APIs</li><li>Real-time services</li></ul><p>For an API-first project, FastAPI can provide a very clean development experience.</p><h3>Performance Isn’t the Only Factor</h3><p>One mistake I see when developers compare Django and FastAPI is focusing only on benchmark numbers.</p><p>FastAPI is generally a strong choice for high-concurrency API workloads, but the framework itself isn’t the only thing determining application performance.<br>Your actual performance depends on things such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*XxNnafyA7ChKu3ea2isXKg.png" /></figure><p>For example, if an API spends 400 milliseconds waiting for a database query, changing the framework may not suddenly make the application dramatically faster.</p><p>That’s why I wouldn’t choose a framework based only on a benchmark.</p><h3>When I Would Choose Django</h3><p>I’d lean toward Django when the project needs a complete web application.<br>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*PToQOAUjnb3L28RBu0GLVQ.png" /></figure><p>Django becomes especially attractive when the project needs:</p><p><strong>Authentication + Admin + ORM + Business Logic + Web Application</strong></p><p>The built-in admin panel is another major advantage.</p><p>For internal business applications, it can save significant development time.</p><h3>When I Would Choose FastAPI</h3><p>I’d lean toward FastAPI when the primary requirement is an API.<br>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*E95VZoVz9Ioh45aLi_1dHA.png" /></figure><p>Or:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*2wBnMYdujQLouRg2E7BslQ.png" /></figure><p>FastAPI is particularly appealing when asynchronous operations, API performance, automatic documentation and lightweight services are important.</p><h3>What About Microservices?</h3><p>This is another area where FastAPI can be attractive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*gkwT4lB0YdecjXKplXkkww.png" /></figure><p>Imagine an application consisting of:<br>Each service can be independently developed and deployed.<br>However, this doesn’t mean Django cannot be used for microservices.<br>The architectural requirements should determine the technology.</p><h3>Django and FastAPI Can Work Together</h3><p>This is something developers sometimes overlook.<br>You don’t necessarily have to choose only one.<br>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lfvdQzJx6AANLaRIRxUuiA.png" /></figure><p>Django can handle:</p><ul><li>Main application</li><li>Authentication</li><li>Admin</li><li>Business logic</li></ul><p>While FastAPI can handle:</p><ul><li>High-performance APIs</li><li>AI services</li><li>Async workloads</li><li>Specialized microservices</li></ul><p>This hybrid architecture can make sense when there is a genuine reason to separate responsibilities.</p><h3>A Simple Decision Guide</h3><p>Here’s how I’d approach the decision.</p><h3>Choose Django when:</h3><ul><li>You are building a complete web application.</li><li>You need an admin panel.</li><li>Authentication is important.</li><li>You have many database-driven features.</li><li>You want a mature ecosystem.</li><li>Rapid development is important.</li></ul><h3>Choose FastAPI when:</h3><ul><li>Your application is primarily API-driven.</li><li>You need asynchronous processing.</li><li>You’re building microservices.</li><li>You’re developing AI/ML APIs.</li><li>Automatic API documentation is valuable.</li><li>You want a lightweight API framework.</li></ul><h3>Consider both when:</h3><p>Your architecture contains different workloads that benefit from different frameworks.</p><h3>Final Thoughts</h3><p>Django and FastAPI are not really competitors in every situation.</p><p>They have different strengths.</p><p><strong>Django is excellent when you want a complete web framework with many features already integrated.</strong></p><p><strong>FastAPI is excellent when you’re building modern APIs and want a lightweight, type-driven and async-friendly framework.</strong></p><p>The best choice depends on your application’s requirements, team experience, architecture and expected workload.</p><p>If you’re currently deciding between the two, I also put together a more detailed comparison covering <strong>performance, scalability, authentication, admin panels, ORM, API development, documentation and real-world use cases</strong>:</p><p>👉 <strong>Read the full Django vs FastAPI comparison on OnlineToolkitHub:</strong><br> <a href="https://www.onlinetoolkithub.com/blog/django-vs-fastapi">Django vs FastAPI: Which Python Framework Should You Choose?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf31f7f126df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Public IP Quota Exceeded: What It Means and How to Fix It]]></title>
            <link>https://medium.com/@kamalkant975/azure-public-ip-quota-exceeded-what-it-means-and-how-to-fix-it-2f7afc93ee5d?source=rss-669e202cea78------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f7afc93ee5d</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Kamal Kant Prasad]]></dc:creator>
            <pubDate>Wed, 19 Aug 2026 09:43:42 GMT</pubDate>
            <atom:updated>2026-08-19T09:52:50.874Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve worked with Microsoft Azure, you may eventually run into an error like:</p><p>Subscription has a quota of 3 for resources of type PublicIPAddress.<br>This can be confusing, especially when you’re simply trying to create a new VM, deploy an application, or configure a load balancer.<br>The good news is that this usually isn’t a problem with your VM or application. You’ve reached the Public IP quota for your Azure subscription and region.<br>I recently encountered this situation while working with Azure, and here are the practical ways to handle it.</p><p>What Does the Azure Public IP Quota Error Mean?</p><p>Azure places limits on certain resources to help manage capacity.<br>For example, imagine your subscription has:<br>Public IP quota: 3<br>Current usage: 3<br>New IP requested: 1</p><p>Azure sees that creating another IP would exceed the current limit, so the deployment fails.</p><p>Azure documents Public IP limits as being scoped by subscription and region. The default limits can also vary depending on the subscription offer.</p><p>When Can You See This Error?</p><p>You may encounter a Public IP quota error while:<br>Creating an Azure Virtual Machine<br>Creating a Public IP resource<br>Deploying an ARM template<br>Using Terraform<br>Deploying AKS<br>Creating a Load Balancer<br>Configuring other Azure networking resources</p><p>For example, AKS operations that trigger creation of a public IP can fail with PublicIPCountLimitReached when the subscription has reached its allowed limit.</p><p>4 Ways to Fix It</p><p>1. Delete Unused Public IP Addresses<br>The first thing I recommend checking is your existing Public IP resources.<br>Go to:<br>Azure Portal → Public IP Addresses<br>Look for IP addresses that are:<br>No longer required<br>Not attached to a VM<br>Not associated with a Load Balancer<br>Left over from old projects</p><p>If you’re certain an IP is no longer needed, deleting it can free quota for another deployment.</p><p>Be careful: Don’t delete a Public IP simply because it looks unused. Confirm that it isn’t required by another application or infrastructure component.</p><p>2. Reuse an Existing Public IP</p><p>If you already have an available Public IP, consider reusing it instead of creating another one.</p><p>This is often a better approach than creating a new IP for every resource.</p><p>For example:<br>Existing Public IP<br> |<br> + — — Application<br> |<br> + — — Reverse Proxy</p><p>Depending on your architecture, you may be able to expose multiple applications through the same public IP.</p><p>3. Request a Quota Increase</p><p>If your application genuinely requires more Public IP addresses, you can request a quota increase.</p><p>Microsoft’s current guidance is to use Azure’s quota/support process and request a higher limit for the relevant networking resource.</p><p>The exact Azure Portal experience can vary, but you can generally start from:</p><p>Azure Portal → Quotas / Help + Support → Service and subscription limits (Quotas)</p><p>Then select the appropriate networking resource, region, and requested limit.</p><p>For example:<br>Current limit: 3<br>Required: 10<br>After the quota increase is approved, retry the deployment.</p><p>4. Use One Public IP with Nginx</p><p>This is an architectural option that can be particularly useful for smaller projects. Instead of:<br>Public IP 1 → Website<br>Public IP 2 → API<br>Public IP 3 → Jenkins</p><p>you can use:</p><pre>Internet<br>   │<br>   ▼<br>Static Public IP<br>   │<br>   ▼<br>Nginx<br> ├── example.com<br> ├── api.example.com<br> └── jenkins.example.com</pre><p>Nginx can route traffic based on the hostname.<br>For example:<br>example.com<br>api.example.com<br>jenkins.example.com</p><p>can potentially be served through the same public IP, depending on your network architecture.</p><p>This can reduce unnecessary Public IP consumption.</p><p>Does Every Azure VM Need Its Own Public IP?</p><p>No.</p><p>A VM doesn’t necessarily need a dedicated public IP to communicate with the internet.</p><p>Azure documentation notes that resources without an assigned public IP can still have outbound connectivity through Azure’s networking mechanisms.</p><p>For many architectures, keeping application servers private and exposing only the required entry point is also a cleaner design.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*JVMLW7xu7R87vnB8dQJUwg.png" /></figure><p>This can improve both resource management and security when designed correctly.</p><p><strong>My Recommended Approach</strong></p><p>When you hit a Public IP quota error, don’t immediately request a quota increase.<br>I recommend this order:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eagTS6pLrcekdTdY_c-qig.png" /></figure><p>This approach helps avoid creating unnecessary infrastructure.</p><p>One More Important Point: Public IPs Cost Money<br>Public IP addresses aren’t simply unlimited free resources.</p><p>Azure’s current documentation states that public IPv4 addresses have a charge, while public IPv6 addresses currently have no charge.<br>Therefore, periodically reviewing your Public IP resources can help you avoid both:<br>Quota problems<br>Unnecessary infrastructure costs</p><p><strong>Final Thoughts</strong></p><p>The Azure Public IP quota error looks more complicated than it actually is.<br>If you see:<br>PublicIPAddress quota exceeded start by checking your existing Public IP resources.<br>In many cases, the solution is simply:<br>Delete → Reuse → Reduce → or Request an Increase</p><p>For larger applications, consider whether every service really needs its own public IP. Using a load balancer, reverse proxy, or other suitable architecture can reduce unnecessary public exposure and resource usage.</p><p>I wrote a more detailed step-by-step guide, including the Azure Portal workflow and practical examples:</p><p>👉 <a href="https://www.onlinetoolkithub.com/blog/azure-public-ip-quota-exceeded-fix">[Azure Public IP Quota Exceeded: Subscription Has a Quota of 3 Public IP Addresses (Solved)] Read the full guide on OnlineToolkitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f7afc93ee5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Choose the Right Hosting Architecture for a Next.js Website]]></title>
            <link>https://medium.com/@kamalkant975/how-to-choose-the-right-hosting-architecture-for-a-next-js-website-c1235d1b0572?source=rss-669e202cea78------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1235d1b0572</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Kamal Kant Prasad]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 17:45:07 GMT</pubDate>
            <atom:updated>2026-08-12T17:45:07.290Z</atom:updated>
            <content:encoded><![CDATA[<p>Choosing the right hosting architecture is one of the most important decisions when launching a Next.js website. A small personal project may need only simple hosting, while a growing application may require databases, APIs, file storage, caching, and automated deployments.</p><p>The good news is that developers no longer need to start with an expensive server. Modern platforms provide several hosting options, including serverless platforms, managed cloud services, VPS servers, containers, and traditional virtual machines.</p><p>The right choice depends on your application’s requirements, expected traffic, budget, and technical expertise.</p><h3>What Should You Consider Before Choosing Hosting?</h3><p>Before selecting a hosting platform, consider a few important questions:</p><ul><li>Is the application static or dynamic?</li><li>Does it require a backend API?</li><li>Does it need a database?</li><li>Will users upload files?</li><li>How much traffic do you expect?</li><li>Do you need automatic scaling?</li><li>How frequently will you deploy?</li><li>Do you need full control over the server?</li><li>What is your monthly hosting budget?</li></ul><p>Answering these questions can help you avoid choosing infrastructure that is either unnecessarily expensive or insufficient for your application.</p><h3>Option 1: Serverless Hosting</h3><p>Serverless hosting is an attractive option for many modern Next.js applications.</p><p>Instead of managing a traditional virtual machine, you deploy your application to a managed platform. The infrastructure provider handles much of the underlying server management, scaling, and availability.</p><p>A serverless architecture can include services such as:</p><ul><li>Next.js frontend</li><li>Cloudflare Workers</li><li>AWS Lambda</li><li>API Gateway</li><li>DynamoDB</li><li>Object storage</li><li>CDN and DNS</li></ul><p>This approach can be particularly useful for startups, personal projects, blogs, portfolios, SaaS applications, and websites that don’t require long-running server processes.</p><p>If you’re interested in this approach, you can read this <strong>complete guide to hosting a Next.js website for free</strong>, which explains a practical architecture using Cloudflare Workers, AWS Lambda, API Gateway, DynamoDB, and Cloudflare R2.</p><p><a href="https://www.onlinetoolkithub.com/blog/host-nextjs-website-free">Complete guide to hosting a Next.js website for free</a></p><h3>Option 2: VPS Hosting</h3><p>A Virtual Private Server gives you considerably more control over your infrastructure.</p><p>You can install:</p><ul><li>Ubuntu</li><li>Nginx</li><li>Docker</li><li>Node.js</li><li>PostgreSQL</li><li>Redis</li><li>GitLab Runner</li><li>SSL certificates</li><li>Monitoring tools</li></ul><p>You can also configure the server according to your application’s requirements.</p><p>The main disadvantage is that you are responsible for managing the server.</p><p>You need to handle operating system updates, security, backups, monitoring, resource utilization, SSL configuration, and application deployment.</p><p>For developers who want to learn DevOps or require more control, VPS hosting can be an excellent option.</p><h3>Option 3: Container-Based Hosting</h3><p>Docker has become a popular way to package and deploy modern web applications.</p><p>Instead of installing every dependency directly on the server, you can package your application into a Docker image.</p><p>A typical architecture might look like:</p><pre>Git Repository<br>      |<br>      v<br>CI/CD Pipeline<br>      |<br>      v<br>Docker Image<br>      |<br>      v<br>Container Platform<br>      |<br>      v<br>Next.js Application</pre><p>This approach makes deployments more consistent because the same container environment can be used across development, testing, and production.</p><p>However, containers introduce additional concepts that developers need to understand, including images, containers, networking, volumes, registries, and resource limits.</p><h3>Option 4: Managed Platforms</h3><p>Managed application platforms can be a good middle ground between serverless hosting and VPS hosting.</p><p>These platforms typically provide:</p><ul><li>Automated deployments</li><li>SSL</li><li>Scaling</li><li>Application monitoring</li><li>Git integration</li><li>Build environments</li><li>Logs</li></ul><p>They can significantly reduce infrastructure management.</p><p>The trade-off is that you have less control over the underlying environment, and costs can increase as traffic and resource consumption grow.</p><h3>Why CI/CD Matters</h3><p>Hosting is only one part of deploying a Next.js application.</p><p>Your development workflow is equally important.</p><p>A basic CI/CD workflow might look like:</p><pre>Developer<br>    |<br>    v<br>Git Push<br>    |<br>    v<br>CI/CD Pipeline<br>    |<br>    v<br>Install Dependencies<br>    |<br>    v<br>Run Tests<br>    |<br>    v<br>Build Application<br>    |<br>    v<br>Deploy</pre><p>With CI/CD, developers don’t need to manually upload files or execute deployment commands every time they make a change.</p><p>This becomes especially valuable when a project is under active development and deployments happen frequently.</p><p>GitLab CI/CD, GitHub Actions, and other CI/CD platforms can automate this process.</p><h3>Serverless vs VPS: Which Should You Choose?</h3><p>There isn’t a single answer that works for every project.</p><h3>Choose serverless when:</h3><ul><li>You want minimal server management.</li><li>Your application has variable traffic.</li><li>You want automatic scaling.</li><li>You are building an MVP.</li><li>You want to keep initial infrastructure costs low.</li><li>Your application works well with managed services.</li></ul><h3>Choose a VPS when:</h3><ul><li>You need complete server control.</li><li>You need long-running processes.</li><li>You require custom networking.</li><li>You want to run Docker yourself.</li><li>You need specific software configurations.</li><li>You are comfortable managing Linux servers.</li></ul><h3>Choose managed container hosting when:</h3><ul><li>You want Docker-based deployments.</li><li>You don’t want to manage an entire server.</li><li>You need more flexibility than a serverless platform.</li><li>Your application has multiple services.</li></ul><h3>Don’t Optimize for Traffic You Don’t Have</h3><p>One common mistake is designing infrastructure for millions of users before the application has even launched.</p><p>A small startup or personal project may not need:</p><ul><li>Multiple production servers</li><li>Kubernetes</li><li>Complex load balancing</li><li>Dedicated database clusters</li><li>Advanced distributed systems</li></ul><p>Start with an architecture that matches your current requirements.</p><p>As traffic grows, you can gradually introduce:</p><ul><li>CDN caching</li><li>Database optimization</li><li>Load balancing</li><li>Horizontal scaling</li><li>Dedicated services</li><li>Monitoring</li><li>Advanced cloud infrastructure</li></ul><p>This approach keeps both complexity and costs under control.</p><h3>Consider the Total Cost</h3><p>Hosting cost isn’t limited to the monthly server price.</p><p>You should also consider:</p><ul><li>Database costs</li><li>Storage</li><li>Bandwidth</li><li>API requests</li><li>Build minutes</li><li>Backup costs</li><li>Monitoring</li><li>Domain registration</li><li>Email services</li><li>Developer time</li></ul><p>A platform that looks cheap initially may become expensive as usage increases.</p><p>Similarly, a slightly more expensive solution may save significant engineering time.</p><h3>Security Should Be Part of the Decision</h3><p>Regardless of the hosting architecture, security should be considered from the beginning.</p><p>At minimum:</p><ul><li>Use HTTPS.</li><li>Keep dependencies updated.</li><li>Protect environment variables.</li><li>Never commit secrets to Git.</li><li>Use strong authentication.</li><li>Validate API input.</li><li>Configure appropriate access permissions.</li><li>Keep backups.</li><li>Monitor application errors.</li><li>Restrict unnecessary network access.</li></ul><p>Managed platforms can reduce some infrastructure responsibilities, but they do not automatically make your application secure.</p><p>Application-level security remains the developer’s responsibility.</p><h3>Final Thoughts</h3><p>Choosing hosting for a Next.js application doesn’t have to be complicated.</p><p>For a small project, serverless or managed hosting can provide an excellent starting point. For applications that require more control, a VPS or container-based architecture may be more appropriate.</p><p>The best architecture is the one that balances:</p><p><strong>Cost + Performance + Scalability + Security + Maintenance + Developer Experience</strong></p><p>Start simple, measure your requirements, and improve the infrastructure as your application grows.</p><p>For developers who want to explore a practical low-cost architecture, a combination of <strong>Next.js, Cloudflare Workers, AWS Lambda, API Gateway, DynamoDB, object storage, and CI/CD</strong> can be a powerful starting point.</p><p>The important thing is not to choose the most complicated architecture.</p><p>Choose the architecture that solves your current problem — and leave room to grow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1235d1b0572" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>