Posts

How to Process Same-Key Requests Sequentially Using Redis and Cloud Tasks

Image
Suppose you get thousands of requests of a same category which you will not be able to process in parallel because it might be trying to update the same database entity or you depend on some external API call that has some rate limit. But, you still need to process all the requests. How would you do that? Well, there is no one answer. Solution can differ based on your specific use-case or constraint. For me, I recently encountered this problem in a multi-tenant architecture where each tenant could have thousands of users generating similar requests that impacted shared tenant-level resources. I needed to ensure all these requests were processed successfully, but in a controlled, sequential manner to avoid exceeding external API rate limits and risking failed or out-of-order processing. Finding the Solution Multiple Queues First, it hit me that all i need to do is process one tenant’s request in a serial manner that i can do simply by creating a cloud task queue for each tenant as i get...

Databases Demystified: What They Are and Why They Matter

Image
📌 Introduction Whether you’re building a personal blog, launching a startup, or designing enterprise software, there’s one common foundation:  data . And wherever there’s data, there’s a  database  behind the scenes making sure it’s stored, retrieved, and organised efficiently. In this post, we’ll break down: What a database actually is Types of databases (with examples) When to use SQL vs NoSQL Real-world analogies to help you remember How to choose the right database for your project Let’s dive in. 🧠 What Is a Database? At its core, a  database  is simply an organised collection of data. Think of it like a super-smart filing cabinet — one that can answer questions like: “Give me all users who signed up this week.” “What’s the price of this product?” “Did Abhishek complete the task?” A database doesn’t just store data. It  structures ,  indexes , and  optimizes  how that data is accessed, making it a powerful tool for any application. 🧱 T...