Backend engineering · System design

Notes on building
reliable systems.

A software engineer who is enthusiastic about back-end engineering and system design. I love to write about the new concepts that I learn. I use this blog as personal technical notes.

distributed systemsdatabasesbackend engineering
Writing

Latest articles

18 published notes
distributed system

Design of Fault-Tolerant Virtual Machines

In some situations where failure is caused by a hardware failure, it's useful to have replication in hand. There are other types of failures that can't be resolved with replication, such as software bugs or network issues. In this article, we deal wi…

Read article
distributed system

The Google File System - Case Study

Introduction The Google file system's main goal is to support their applications' workload. Which affected their design decisions, they implemented what they actually need, rather than the de-facto distributed file system. There are 4 main different …

Read article
concurrency

Pessimistic Concurrency Control - 2PL

Introduction In today's high-traffic database management systems (DBMS), leveraging the full potential of hardware is essential. With the advent of modern CPUs, the opportunity for parallel processing has increased significantly. However, executing m…

Read article
Databases

Query Optimization

Introduction SQL is a declarative language, which means that when you request a query, you specify the data you want, but not how to get it. The database management system (DBMS) is responsible for determining the most efficient way to retrieve the r…

Read article
Databases

Query Execution - Joins

Introduction Joins are used to combine data from multiple tables in a database and retrieve the combined data as a single result set. This allows us to effectively retrieve data that is spread across multiple tables and can be especially useful when …

Read article
query-execution

Query Execution - Aggregations

Introduction Once the query planner has determined the optimal plan for executing a query, it's time to implement that plan. But before we can do that, it's important to understand the algorithms used to execute the various operations in the plan. In…

Read article
hashing-schemes

Understanding hash indexes

Why database indexes? When it comes to querying databases, one of the most time-consuming and performance-intensive operations is to do a linear scan of the entire table. This requires the database management system (DBMS) to retrieve all of the page…

Read article
database

Database Buffer Pool - Part 2

Introduction As explained in Database Buffer Pool - Part 1, a buffer pool is a limited chunk of memory, which means that whenever we bring something from the disk, we need to evict something from the buffer pool and replace it. Buffer replacement is …

Read article
buffer-pool

Database Buffer Pool - Part 1

Introduction In order to allow the database execution engine to perform its operations, it needs the pages containing the table records to be brought from disk to memory. However, we want to optimize I/O operations, so there is a subsystem of the dat…

Read article
Databases

Compression In Databases

Introduction It's well-known that the database's main bottleneck lies in I/O. That's what makes database designers aim toward reducing it in any possible way, one of them is to look carefully at the workload and choose the suitable storage model (for…

Read article
View all 18 articles →