top of page


Tutorials, Errors and Exceptions
Its a journey to understand things better. It will have tutorials, any error/exceptions encountered, its resolutions and lots of learning.

Search


Built a Webhook Inspector from Scratch and Shipped It β Here's Everything That Went Wrong
Live at: https://hookspy.in HookSpy - Walk Through Every developer integrating Stripe, Razorpay, or GitHub has been there. You set up a webhook, fire a test event, and... nothing. The endpoint didn't respond. Or it did but your handler crashed silently. Or you just want to see the exact payload the service sends before writing a single line of handler code. Tools like RequestBin and Webhook.site exist. But I wanted to build my own β one I understood end to end, could deploy m
Ankit Agrahari
May 127 min read
Β
Β
Β


Building DevOps Intelligence using MCP Server with Spring AI: Tools, Challenges & Solutions
Devops Intelligence Today, I successfully built and deployed a Model Context Protocol (MCP) server using Spring AI that exposes real DevOps infrastructure through intelligent tools. But the journey? Let's just say it involved more debugging than coding. In this post, I'll walk you through: What we built (the DevOps Intelligence Platform) The tools we created (K8s, Prometheus, Logs, Deployments) Every challenge we faced (and how we solved them) Why Spring AI 2.0.0-M2 is the s
Ankit Agrahari
Mar 147 min read
Β
Β
Β


Production Monitoring: You Can't Fix What You Can't See
Previous parts: Part 1: Kafka Producer | Part 2: Consumer + DLQ | Part 3: Real-Time Aggregations | Part 4: Docker + Kubernetes Infographics - NotebookLM You know that feeling when your app is running in production and someone asks "Is everything okay?" and you respond with "...I think so?" Yeah, that's not good enough. After deploying StreamMetrics to Kubernetes with a 3-node KRaft Kafka cluster, dockerized microservices, and validated 10K events/sec throughput, I realized
Ankit Agrahari
Mar 78 min read
Β
Β
Β
Contact
bottom of page



![If this shifted how you think about AI β
you're ready to Harness it. π₯
π¬ Comment "HARNESS" below
β I'll DM you the open-source agent template
π Save this carousel β refer back when you build
π€ Share with one engineer who's still copy-pasting
Follow @backendbrilliance for more content on
AI agents, Spring Boot architecture & backend systems
that actually scale.
#AIHarnessing #BackendBrilliance #JavaDeveloper
#SpringBoot #SpringAI
[AIAgents SystemDesign BackendEngineering SoftwareDevelopment LLMOps]](https://scontent-lhr6-1.cdninstagram.com/v/t51.71878-15/729219604_894359219640315_5276418046541229917_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=102&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=1cP3gMSWqEoQ7kNvwFTC0A6&_nc_oc=AdrjOcpINFOo8GFz1UXprDBBWOU-90Q27wQK1Y1cD11LUfgHBhySp-Y1kmigB63abjQ&_nc_zt=23&_nc_ht=scontent-lhr6-1.cdninstagram.com&edm=ANo9K5cEAAAA&_nc_gid=YPm-vwR3N_cplKTxDFcQRw&_nc_tpa=Q5bMBQFskmtRGXZlRCOXjpLdfsHpsbRBY1qPF7NvJzwhYdicD_SR2T3IZfvXljWzjk-VxlX_gcg2FS9m&oh=00_AQAPU0Dv5RBBhX4EQAakoqiUwuw5SUFpgN_ofcBVclx4Kw&oe=6A685C6F)























![You think HashMap is always O(1).
It isn't. Here's what actually happens. π§΅
HashMap stores pairs using `index = hash(key) % capacity` β direct slot access, no scanning. Pure O(1). Until two keys land on the same slot. That's a collision β not a bug, a math inevitability.
Two ways to fix it π
π Chaining β each bucket holds a linked list. Collisions append to the list. Simple, handles high load, easy deletion. Downside: pointer overhead, poor cache performance, chains degrade to O(n) at high load. Java's fix? At 8 nodes, the list auto-converts to a Red-Black Tree β O(log n) worst case.
π¦ Open Addressing β no linked lists. Collision at slot X? Probe X+1, X+2 until empty. Cache-friendly, zero memory overhead. Downside: deletion needs tombstone markers, and keys cluster together making future collisions worse. Used by C++, Go, Redis.
βοΈ Load Factor = entries Γ· capacity
π’ Below 0.5 β rare collisions, wasted memory
π 0.75 β Java's sweet spot, triggers resize + rehash
π΄ Above 0.9 β collision cascade, O(n) territory
Double hashing kills clustering by varying the probe step per key:
`probe(i) = (h1 + i Γ h2) % m`
Elements scatter evenly. No bunching. O(1) preserved.
The truth: HashMap is O(1) until a bad hash function, wrong load factor, or wrong strategy turns it into O(n).
Three things protect you:
β Well-distributed hash function
β Load factor under 0.75
β Right collision strategy for your use case
π¬ Java interview question: what happens when a chain hits 8 nodes?
Drop your answer below π
π Save this before your next interview.
#java #hashmap #datastructures #dsa #algorithms
[codinginterview programming 100daysofcode]](https://scontent-lhr6-1.cdninstagram.com/v/t51.71878-15/641188820_1859196944673752_5535080284006983284_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=102&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=oJIVCrVxaLAQ7kNvwHmI7qF&_nc_oc=AdrQcjLVBdKUNQDpNTrLO21cx2YzmdLHRvWie1agZ-w-EZKcZ574DHBk5RKQdhMpVd0&_nc_zt=23&_nc_ht=scontent-lhr6-1.cdninstagram.com&edm=ANo9K5cEAAAA&_nc_gid=YPm-vwR3N_cplKTxDFcQRw&_nc_tpa=Q5bMBQENzdP_XswWVV26MRjpTMLZ1BIMP_nINuvXvP8FMfwaEYTajiG2Dnv4_0_9yy9B7iFmeH-lpw4Z&oh=00_AQCwhalGCQ5x6fFQ74322-UoMff1VN66O2RquIXJegCuWg&oe=6A6888FE)


