Category: System Design
-
KISS Principle
1. Origins and Evolution of KISS The KISS principle is widely attributed to Kelly Johnson, a lead engineer at Lockheed Skunk Works (the advanced development program of Lockheed Martin). He is said to have coined the phrase in the 1960s. Johnson was renowned for his innovative and efficient aircraft designs, and his philosophy emphasized practicality…
-
HTTP methods
HTTP (Hypertext Transfer Protocol) is the foundation of any data exchange on the Web and a protocol used for client-server communication. HTTP defines several methods (also known as verbs) that indicate the desired action to be performed on the identified resource. 1. GET Purpose: The GET method is used to request data from a server…
-
Priority Queue pattern
The priority queue pattern enables a workload to process high-priority tasks more quickly than lower-priority tasks. This pattern uses messages sent to one or more queues and is useful in applications that offer different service level guarantees to individual clients. Context and problem Workloads often need to manage and process tasks with varying levels of…
-
Bulkhead pattern
Introduction The Bulkhead pattern is a type of application design that is tolerant of failure. In a bulkhead architecture, also known as cell-based architecture, elements of an application are isolated into pools so that if one fails, the others will continue to function. It’s named after the sectioned partitions (bulkheads) of a ship’s hull. If…
-
CAP Theorem
Introduction The CAP Theorem, formulated by Eric Brewer in 2000, is a fundamental principle in distributed systems. It states that in a distributed data store, it is impossible to simultaneously achieve all three of the following properties: The CAP theorem is crucial for designing databases, cloud-based applications, and large-scale distributed architectures. It helps developers understand…
-
Token Bucket Algorithm
Introduction The Token Bucket Algorithm is a popular mechanism used in rate limiting to control data transmission, API requests, and network traffic efficiently. It allows bursty traffic while ensuring a steady overall rate of transmission. This algorithm is widely adopted in network traffic management, API rate limiting, cloud computing, and telecommunications to prevent excessive load…
-
Circuit Breaker pattern
Introduction The Circuit Breaker Pattern is a software design pattern used to improve the stability and resilience of distributed systems. It helps prevent repeated failures when a system or service is experiencing issues, reducing the risk of cascading failures. Why is it Needed? In modern microservices and cloud-based architectures, services depend on multiple external components…
-
Gateway Routing Pattern
Introduction The Gateway Routing Pattern is a design pattern used in microservices architecture to route client requests through a single entry point, known as an API Gateway. The gateway handles authentication, request routing, load balancing, monitoring, and more. This pattern enhances security, reduces direct client interaction with internal microservices, and simplifies the architecture. The pattern…
-
Rate Limiting Pattern
Introduction Many services implement throttling to regulate resource usage, restricting the rate at which applications or services can access them. By adopting a rate-limiting pattern, you can reduce or prevent throttling errors, manage these limits effectively, and predict throughput more accurately. This approach is particularly beneficial in scenarios involving large-scale, repetitive automated tasks, such as…
-
Sidecar pattern
Introduction Deploy components of an application into a separate process or container to provide isolation and encapsulation. This pattern can also enable applications to be composed of heterogeneous components and technologies. This pattern is named Sidecar because it resembles a sidecar attached to a motorcycle. In the pattern, the sidecar is attached to a parent application and…