<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Nguyen Dai Long – Engineering Blog</title>
    <link>https://ndlong.site/blog</link>
    <description>Technical deep-dives into backend scalability, PostgreSQL optimization, Redis caching, Docker, GCP Cloud Run, and real-time WebSockets by Nguyen Dai Long.</description>
    <language>en-us</language>
    <lastBuildDate>Tue, 22 Sep 2026 08:23:44 GMT</lastBuildDate>
    <atom:link href="https://ndlong.site/feed.xml" rel="self" type="application/rss+xml"/>
    
    <item>
      <title><![CDATA[Scaling PostgreSQL & Redis for High-Throughput Systems (30,000+ Concurrent Users)]]></title>
      <link>https://ndlong.site/blog/postgresql-query-optimization-redis-scaling</link>
      <guid isPermaLink="true">https://ndlong.site/blog/postgresql-query-optimization-redis-scaling</guid>
      <pubDate>Fri, 28 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Battle-tested engineering playbook for scaling PostgreSQL and Redis under 30K+ concurrent users: compound index-only scans, PgBouncer transaction pooling, and cache stampede mitigation cutting p99 latency from 2,850ms to 64ms.]]></description>
      <category><![CDATA[Database & Performance]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Handling 5GB+ Chunked File Uploads in Django with Background Processing]]></title>
      <link>https://ndlong.site/blog/chunked-file-upload-5gb-django-pdf-pipeline</link>
      <guid isPermaLink="true">https://ndlong.site/blog/chunked-file-upload-5gb-django-pdf-pipeline</guid>
      <pubDate>Tue, 14 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[How we architected a resilient, resumable chunked upload system supporting multi-gigabyte files with Django, Celery, and Google Cloud Storage without memory exhaustion.]]></description>
      <category><![CDATA[Backend Architecture]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Optimizing Google Cloud Run and Docker Containers for 60% Cost Reduction]]></title>
      <link>https://ndlong.site/blog/gcp-cloud-run-docker-cost-optimization</link>
      <guid isPermaLink="true">https://ndlong.site/blog/gcp-cloud-run-docker-cost-optimization</guid>
      <pubDate>Tue, 02 Jun 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Architectural strategies for tuning CPU allocation, startup concurrency, memory limits, and container image layers on GCP Cloud Run to slash cloud infrastructure expenses.]]></description>
      <category><![CDATA[DevOps & Cloud]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Building Real-Time Notification Systems with Django Channels and Redis Pub/Sub]]></title>
      <link>https://ndlong.site/blog/websocket-realtime-notifications-redis</link>
      <guid isPermaLink="true">https://ndlong.site/blog/websocket-realtime-notifications-redis</guid>
      <pubDate>Tue, 19 May 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Architecting a horizontally scalable WebSocket notification engine using Django Channels, Redis Pub/Sub channels, and client-side reconnection protocols.]]></description>
      <category><![CDATA[Real-Time Systems]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Zero-Server Image Compression Using HTML5 Canvas and Web Workers]]></title>
      <link>https://ndlong.site/blog/client-side-image-compression-canvas-web-worker</link>
      <guid isPermaLink="true">https://ndlong.site/blog/client-side-image-compression-canvas-web-worker</guid>
      <pubDate>Sat, 11 Apr 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Offloading intensive image resizing, format transcoding, and JPEG/WebP compression to the client's browser using OffscreenCanvas and Web Workers for zero server cost.]]></description>
      <category><![CDATA[Web Performance]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[System Design: Scaling a Production URL Shortener to 100M Requests/Month]]></title>
      <link>https://ndlong.site/blog/system-design-url-shortener-100m-requests</link>
      <guid isPermaLink="true">https://ndlong.site/blog/system-design-url-shortener-100m-requests</guid>
      <pubDate>Fri, 18 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Detailed architectural breakdown of ShortLink: Base62 encoding algorithms, Key Generation Service (KGS), Bloom Filters for 404 suppression, and Redis distributed caching.]]></description>
      <category><![CDATA[System Design & Architecture]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[PostgreSQL Connection Pooling in High-Concurrency Environments with PgBouncer]]></title>
      <link>https://ndlong.site/blog/postgresql-pgbouncer-connection-pooling-guide</link>
      <guid isPermaLink="true">https://ndlong.site/blog/postgresql-pgbouncer-connection-pooling-guide</guid>
      <pubDate>Tue, 15 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Why PostgreSQL process-based architecture struggles beyond 200 concurrent connections, and how to configure PgBouncer in transaction pooling mode for maximum scalability.]]></description>
      <category><![CDATA[Database & Performance]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Benchmarking Async Python: FastAPI vs. Django Ninja in High-Throughput Microservices]]></title>
      <link>https://ndlong.site/blog/fastapi-vs-django-ninja-high-throughput-benchmark</link>
      <guid isPermaLink="true">https://ndlong.site/blog/fastapi-vs-django-ninja-high-throughput-benchmark</guid>
      <pubDate>Sat, 12 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[A comprehensive load-testing comparison between FastAPI and Django Ninja: Pydantic v2 serialization speeds, async ORM bottlenecks, and memory footprints under 10,000 req/s.]]></description>
      <category><![CDATA[Backend Engineering]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Mastering Distributed Locks with Redis: When Redlock Fails and How to Fix It]]></title>
      <link>https://ndlong.site/blog/redis-distributed-lock-redlock-pitfalls</link>
      <guid isPermaLink="true">https://ndlong.site/blog/redis-distributed-lock-redlock-pitfalls</guid>
      <pubDate>Tue, 08 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Analyzing distributed lock race conditions, garbage collection pause vulnerabilities, clock drift hazards, and how to implement safe fencing tokens in high-stakes systems.]]></description>
      <category><![CDATA[Distributed Systems]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Hardening Production Docker Images: From 1.2GB Bloat to 48MB Distroless Containers]]></title>
      <link>https://ndlong.site/blog/docker-multistage-builds-production-security</link>
      <guid isPermaLink="true">https://ndlong.site/blog/docker-multistage-builds-production-security</guid>
      <pubDate>Fri, 04 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[A practical guide to multi-stage Docker builds, eliminating build toolchains, executing containers under non-root users, and achieving zero-vulnerability container scanning.]]></description>
      <category><![CDATA[DevOps & Cloud]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Designing High-Throughput API Rate Limiters: Token Bucket vs. Sliding Window Log in Redis]]></title>
      <link>https://ndlong.site/blog/building-rate-limiter-token-bucket-redis</link>
      <guid isPermaLink="true">https://ndlong.site/blog/building-rate-limiter-token-bucket-redis</guid>
      <pubDate>Sun, 30 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Engineering distributed API rate limiters with Redis and Lua scripts to prevent API abuse, manage burst traffic, and return standard RFC 6585 headers.]]></description>
      <category><![CDATA[API Architecture]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Next.js App Router Architecture: Demystifying the 4 Layers of Server Caching]]></title>
      <link>https://ndlong.site/blog/nextjs-15-app-router-caching-deep-dive</link>
      <guid isPermaLink="true">https://ndlong.site/blog/nextjs-15-app-router-caching-deep-dive</guid>
      <pubDate>Sat, 22 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Understanding how Request Memoization, Data Cache, Full Route Cache, and Client Router Cache interact in Next.js, and how to achieve instantaneous page loads with on-demand revalidation.]]></description>
      <category><![CDATA[Web Architecture]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Database Scaling Strategies: Declarative Table Partitioning vs. Horizontal Sharding]]></title>
      <link>https://ndlong.site/blog/database-sharding-vs-partitioning-guide</link>
      <guid isPermaLink="true">https://ndlong.site/blog/database-sharding-vs-partitioning-guide</guid>
      <pubDate>Sun, 16 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[When single-node databases run out of headroom: choosing between PostgreSQL declarative range/hash partitioning and application-level horizontal database sharding.]]></description>
      <category><![CDATA[Database Engineering]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[gRPC vs. REST for Internal Microservices: Real-World Latency and Throughput Comparison]]></title>
      <link>https://ndlong.site/blog/grpc-vs-rest-microservices-communication</link>
      <guid isPermaLink="true">https://ndlong.site/blog/grpc-vs-rest-microservices-communication</guid>
      <pubDate>Mon, 10 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Why we migrated internal service-to-service communication from JSON REST to gRPC with Protocol Buffers: achieving 7x throughput and eliminating contract drift.]]></description>
      <category><![CDATA[Microservices]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Applying Clean Architecture and Domain-Driven Design (DDD) in Enterprise Python]]></title>
      <link>https://ndlong.site/blog/clean-architecture-python-domain-driven-design</link>
      <guid isPermaLink="true">https://ndlong.site/blog/clean-architecture-python-domain-driven-design</guid>
      <pubDate>Sun, 02 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Structuring maintainable enterprise Python backends using Hexagonal Architecture, decoupling domain entities from ORM frameworks, and unit testing business logic in isolation.]]></description>
      <category><![CDATA[Software Engineering]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Zero-Downtime Database Migrations: The Expand and Contract Pattern in Production]]></title>
      <link>https://ndlong.site/blog/zero-downtime-deployment-database-migrations</link>
      <guid isPermaLink="true">https://ndlong.site/blog/zero-downtime-deployment-database-migrations</guid>
      <pubDate>Sun, 26 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Executing non-breaking relational database schema migrations under active user traffic without table locks, downtime, or application deployment failures.]]></description>
      <category><![CDATA[Database & DevOps]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Bulletproof Authentication Architecture: JWT Access Tokens with Rotating HttpOnly Refresh Cookies]]></title>
      <link>https://ndlong.site/blog/jwt-security-best-practices-refresh-tokens</link>
      <guid isPermaLink="true">https://ndlong.site/blog/jwt-security-best-practices-refresh-tokens</guid>
      <pubDate>Sat, 18 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Why storing JWTs in localStorage exposes users to XSS token theft, and how to build a production-grade authentication flow with silent token rotation and reuse detection.]]></description>
      <category><![CDATA[Web Security]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
    <item>
      <title><![CDATA[Event-Driven Architecture: When to Choose Apache Kafka vs. RabbitMQ for Production]]></title>
      <link>https://ndlong.site/blog/kafka-vs-rabbitmq-event-driven-architecture</link>
      <guid isPermaLink="true">https://ndlong.site/blog/kafka-vs-rabbitmq-event-driven-architecture</guid>
      <pubDate>Mon, 06 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[A deep architectural analysis of message brokers: comparing RabbitMQ smart-broker queue patterns with Apache Kafka distributed commit logs for high-throughput event streaming.]]></description>
      <category><![CDATA[Message Queues & Architecture]]></category>
      <author><![CDATA[ndl.long.nguyendai@gmail.com (Nguyen Dai Long)]]></author>
    </item>
  </channel>
</rss>