Posts

Showing posts from November, 2025

5 REST API Authentication Methods

 5 REST API Authentication Methods Article by:  Radhakrishnan A 1. Basic Authentication: Clients include a Base64-encoded username and password in every request header, which is simple but insecure since credentials are transmitted in plaintext. Useful in quick prototypes or internal services over secure networks. 2. Session Authentication: After login, the server creates a session record and issues a cookie. Subsequent requests send that cookie so the server can validate user state. Used in traditional web-apps. 3. Token Authentication: Clients authenticate once to receive a signed token, then present the token on each request for stateless authentication. Used in single-page applications and modern APIs that require scalable, stateless authentication. 4. OAuth-Based Authentication: Clients obtain an access token via an authorization grant from an OAuth provider, then use that token to call resource servers on the user’s behalf. Used in cases of third-party integrations or...

Serverless .NET with Azure Functions — Simplify, Scale & Save!

Image
Serverless .NET with Azure Functions — Simplify, Scale & Save! Article by:  Radhakrishnan A   Tired of managing servers, scaling infrastructure, or worrying about uptime? Serverless computing is here to change the game — and Azure Functions makes it effortless for .NET developers. What is Azure Functions? Azure Functions lets you run small pieces of code — functions — without managing servers. Write your logic, deploy, and let Azure handle the rest — scaling automatically based on demand. Think of it as “code that runs only when needed” — perfect for: Background jobs APIs Webhooks Integrations Why It’s Powerful for .NET Developers ✔ Write in C#, F#, or any .NET language ✔ Pay only for execution time — no idle costs ✔ Seamless integration with Azure services (Storage, Cosmos DB, Event Grid, etc.) ✔ Auto-scales with zero configuration ✔ Local debugging & deployment via Visual Studio or Azure CLI Common Use Cases ✔ Send emails or notifications after an event ✔ Proc...

10 ASP.NET Core Performance Tweaks Every Dev Should Know

  10 ASP.NET Core Performance Tweaks Every Dev Should Know A.Radhakrishnan  Most ASP.NET Core apps don’t need a full rewrite, They need these ๐Ÿ”Ÿ micro-tweaks: 1. Use Minimal APIs for Lightweight Endpoints Ditch MVC where it’s overkill. Less overhead, faster routing. 2. Avoid .ToList() Too Early  Let EF Core compose the query — don’t force it prematurely. 3. Enable Response Caching  Static content? Cache it and save the CPU for real work. 4. Use AsNoTracking() for Read-Only Queries  Need blazing read speed? Stop EF from tracking changes you don't need. 5. Trim Middleware  Each middleware = overhead. Audit your pipeline. 6. Compress Responses (Gzip/Brotli)  Small payload = faster load. Your API will thank you. 7. Benchmark with BenchmarkDotNet  Guessing is for gamblers. Profile your bottlenecks. 8. Pool DbContext in High-Load Apps  DbContext pooling = fewer allocations = faster throughput. 9. Tune Kestrel Server Settings  Thread count, lim...

Recall ai reduced AWS bill by >$1,000,000 / year

 Recall ai reduced AWS bill by >$1,000,000 / year  Reducing bots CPU usage by up to 50% doing ๐Ÿ‘‡ Problem They identified majority of CPU time was spent in two "copy memory" functions 1. __memmove_avx_unaligned_erms  2. __memcpy_avx_unaligned_erms Biggest callers of these functions are, 1. Python WebSocket that was receiving the data 2. Chromium's WebSocket that was sending the data Expensive sockets - Single 1080p 30fps video stream, in uncompressed I420 format = 93.312 MB/s - Monitoring showed that at scale, the p99 bot receives 150MB/s of video data Solution - Shared Memory was implemented simultaneously accessed by multiple processes at a time  - Chromium writes to a block of memory, which is read directly by video encoder with no copying - Ring buffer was chosen as high level transport design Ring Buffer implementation Three pointers on Ring buffer - Write pointer: the next address to write to - Peek pointer: the address of the next frame to read - Read pointe...

๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป - ๐—ฅ๐—˜๐—ฆ๐—ง ๐—”๐—ฃ๐—œ ๐—•๐—ฒ๐˜€๐˜ ๐—ฃ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฒ๐˜€

Image
       ๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป - ๐—ฅ๐—˜๐—ฆ๐—ง ๐—”๐—ฃ๐—œ ๐—•๐—ฒ๐˜€๐˜ ๐—ฃ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฒ๐˜€             Article By: Radhakrishnan A Perumal   A REST API defines a set of rules that developers should follow when creating APIs. While designing REST APIs seems straightforward, there are some common mistakes you should avoid in interviews๐Ÿ‘‡ ๐Ÿญ) ๐—จ๐˜€๐—ถ๐—ป๐—ด ๐˜ƒ๐—ฒ๐—ฟ๐—ฏ๐˜€ ๐—ถ๐—ป ๐—จ๐—ฅ๐—Ÿ๐˜€ The endpoint URL should represent a resource (a noun), not an action (a verb). The HTTP method already indicates the action to be performed. ❌ GET /getAllBooks ❌ POST /createNewBook ✅ GET /books ✅ POST /books ๐Ÿฎ) ๐—ก๐—ผ๐˜ ๐—จ๐˜€๐—ถ๐—ป๐—ด ๐—”๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฝ๐—ฟ๐—ถ๐—ฎ๐˜๐—ฒ ๐—›๐—ง๐—ง๐—ฃ ๐— ๐—ฒ๐˜๐—ต๐—ผ๐—ฑ๐˜€ Using the appropriate HTTP method makes your API intuitive. ↳ GET = retrieve data ↳ POST = create new resources ↳ PUT = replace the entire resource with a new representation provided in the request body. ↳ PATCH = Used to apply partial modifications to a resource ...