Basics of Scaling

In this blog we’ll learn the basics required to scale an application. Lets start with how does the architecture of a small application looks like. Basic API Architecture At the most basic level any application has following parts: Client - which requests the API and gets back a response. Server - which processes the request and sends back the response. Database - which stores any data that the server needs to process any subsequent requests....

December 27, 2022 · 6 min · Ashish Gaur

CAP Theorem

When designing distributed systems it’s important to know CAP(Consistency, Availability and Partition Tolerance) theorem in order to understand trade offs in designing different distributed systems. CAP Theorem states that in a distributed system, one can choose two out of three - Consistency, Availability and Partition Tolerance. What does these three terms mean: Consistency - means a client sees the same data irrespective of the node it connects to....

October 11, 2022 · 7 min · Ashish Gaur

Designing an LRU Cache

A cache is a in-memory data structure which is designed for fast access, insertion and deletion. All caches have memory limit which requires cache eviction policy. Whenever the memory of cache is full, we use a cache eviction policy to delete an item to make space for the new item. Today we’re going to look at how to design a cache which uses Least Recently Used as its cache eviction policy....

May 9, 2022 · 3 min · Ashish Gaur