Mar Java Mit Java Blog

Scalable Stats Collection in a URL Shortener

A URL shortener may handle millions of redirects per second.Each redirect is also a click event we want to count. But there’s a challenge: Redirects must be ultra fast, while stats storage is write-heavy....

Virtual Nodes in Consistent Hashing — Why They Matter

When building large-scale systems (like URL shorteners, distributed caches, or databases), we often use consistent hashing to decide which server stores which data. But consistent hashing alone isn’t enough. To make it truly scalable...

Caching Strategy in a Planet-Scale URL Shortener

When designing a large-scale URL shortener (like Bitly), the biggest challenge isn’t storing URLs — it’s serving billions of redirects with low latency. The solution? Multi-layer caching. This article explains how caching works across...

Understanding CORS Preflight Requests: Why Your MCP Server Needs OPTIONS Support

f you’ve ever built a web API or MCP (Model Context Protocol) server, you’ve probably encountered mysterious OPTIONS requests appearing in your server logs. Or worse, you’ve seen CORS errors in the browser console blocking your perfectly valid requests. Today, we’ll demystify CORS preflight requests and show you why they’re essential for secure web applications. What...