What is TinyURL?

TinyURL is a URL shortening web service, which provides short aliases for redirection of long URLs.

TIPS: Always clarify the assumptions for use case of the system you are going to design.

Understanding the scale:

  1. UserBase: 30M users

2. Short URL length: 7 characters ( su.com/_______) [shorturl.com]

Data capacity model: How much data we insert into the system? Attributes we are gonna save are as follows:

Long URL: 2KB → 2048 chars

Short URL: 17 bytes → 17 chars

Created at: (epoch time) 7 bytes → 7 chars

Expire at: 7 bytes → 7 chars

Data per…


What is caching?

In computing, a cache is a high-speed data storage layer that stores a subset of data, typically transient in nature, so that future requests for that data are served up faster than is possible by accessing the data’s primary storage location. Caching allows you to efficiently reuse previously retrieved or computed data.

The caching system’s data is actually stored in the faster access hardware like RAM. RAM provides faster i/o operation and reduces latency. Caching is used in every layer of technology e.g: …


Hello readers,

Thank you so much for reading and liking my blog. your likes and comments encourage me to keep up with my work. I know it’s been a long since I have posted anything. There are few things coming up in line which includes:

  1. Distributed cache system design
  2. TinyURL system design
  3. Uber system design
  4. Instagram system design
  5. Designing a parking lot (OOPS)

Let me know in the comments if you want to cover some other topics as well. Once again thank you so much.


In the previous article, we have studied transaction and locks.

In this article, we will study more about transactions specifically distributed transactions and locks. We will look at various use cases to see how is transaction is being taken care of in a monolith and in a microservice architecture?


The moment we heard about the transaction, we start thinking about the database. However, the concept of a transaction is not limited only to DB but also to non-DB implementations like OS operations.


Previously, In this series, we have already discussed scaling concepts pretty well.

Let’s learn about distributed datastore.

In the previous blogs, we have already seen and discussed that if we have our database hosted on one single server we will end up with a single point of failure and issues like high latency and more load on a single server. A better option is the “Master-slave” architecture where all the write always happens to the master and read happens from the slave. The data from the master gets sync with the slave asynchronously.


Understanding the scale and features:

  1. User Base: 2 + Billions
  2. Chats
  3. Last seen
  4. Media
  5. Encrypt
  6. Call

In this article, we will see above metioned features.

Consider we have two parties, client A and client B. we need a server in between them, let’s call it a “messaging server” for them to interact /send messages back and forth.


Prerequisite: we have learned in previous microservice blogs about monolithic and microservice architecture, the Advantages and disadvantages of both, and when to go for which architecture.

https://medium.com/system-design-concepts/monolithic-architecture-51272d0b3393

https://medium.com/system-design-concepts/microservice-architecture-47e9581f8be9

Microservice is an architectural style in which an application is basically structured as a group of individual loosely coupled services that are very fine-grained and talks with other microservice/s using a very lightweight protocol(as they are Single purpose, do one thing only e.g REST/HTTP, RPC). These services are also deployed separately and not dependent on any other service/s.

Jolly srivastava

Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store