Components of System Design - Interview Questions

System design involves identifying the 'components' and laying out the interaction between these components, based on the functional and non-functional requirements given for a specific system to be designed.

Components, in system design context, are like building blocks, each performing a unique and independent function, which can be used in many system design solutions.

System design components can be compared to bricks or lego blocks. Just like bricks or lego blocks can be used to build different structures, system design components can use used to build different systems.

Examples of system design components are web servers, firewalls, load balancers, databases, messaging queues, caches, etc. which can be selectevely identified and used to design a system.

Many cloud providers like Microsoft Azure, AWS, and GCP provide these components in their cloud environments ready to use.

Below we will review 12 common system design components, many of which you will use in your system design in some form or other.

Domain Name System (DNS)

 

Domain Name System (DNS) is a distributed system that maintains mapping of human readable domain names such as 'www.google.com' to their IP addresses.

When a user enters a domain name on the browser URL the request is sent to a DNS server provided by the user's ISP. The DNS server checks if it has the IP address for the domain, else it sends a lookup request to other DNS servers.

The DNS server then returns the IP address back to the browser, which receives the web page by contacting the server by it IP address.

Web Servers

 

Web servers serve static content such as HTML pages, images, videos, and files to client browser.

Web servers support server side scripting, log incoming requests, and usually support HTTP protocol.

Web servers interact with application servers, which has application and business logic, to serve more dynamic and interactive content to requests.

Application Servers

 

Application servers have more complex business logic to process data and return dynamic data to web servers, which in turn returns it to the client browsers.

To return dynamic data application servers interact and pull data from various sources such as databases, APIs, message queues etc.

Databases (SQL, NOSQL)

 

Databases store data that can be retrieved, modified, or deleted using processes provided by the database.

Databases can be relational (SQL) or Non-relational (NoSQL). NoSQL databases can be key-value store, document store, wide column store, or a graph database.

Each database type has advantages and dis-advantages and the selection of the database depends on the use case and the data that we need to store.

Blob Storage

 

Blob storage is typically used to store large unstructured data such as multimedia files, binary executables etc.

Load Balancers

 

A load balancer distributes network traffic across a cluster of servers. This ensures that no single server is over-loaded; hence improving the responsiveness of an application, and also improving the availability of the application.

In a distributed application multiple load balancers are commonly put between different layers -

  • Between the client and web servers
  • Between the web servers and application servers
  • Between the application servers and database servers.

Content Delivery Network (CDN)

 

Content Delivery Network (CDN) is a globally distributed network of servers that serve content from locations closest to the users.

Traditionally CDNs served static content files and pre-generated files such as HTML, CSS, JS, image and images. CDNs have evolved since to now serve dynamic content as well, including rich media.

Content served from CDN significantly improves the performance by reducing latency, since the content is served from servers closest to the users. In addition the load on the servers is also reduced since they do not have to serve content that is served from CDN.

Caching

 

Caching is the mechanism of storing data in a temporary storage location, either in memory or on disc, so that request to the data can be served faster.

Caching improves performance by decreasing page load times, and reduces the load on servers and databases.

In a typical caching model, when a new client request for a resource comes in, a lookup is done on the temporary storage to see if a similar request came in earlier. If a similar request is found then the previous result is returned with out hitting the server or database. If a similar request is not found, then the client request is send to the server or database to fetch the result, the result is updated in the temporary storage, and the result is returned back to the client.

Asynchronous processors

 

Asynchronous workflows help decouple processes, reduce request times for expensive operations, and can complete time-consuming work in advance.

Asynchronous workflows can be implemented via message queues which receive and hold messages in an asynchronous workflow. Producers post messages to the queue and consumers consume messages from the queues.

Batch Processors

 

Batch Processors

Rate Limiters

 

A rate limiter limits the number of requests that a service fulfills. It throttles or blocks requests if they exceed the limit.

A rate limiter protects services against attacks such as denial-of-service (DOS) attacks and brute-force password attempts.

Rate limiter also acts as a defensive layer for services to prevent excessive usage, whether intended or unintended.

Distributed Search

 

Distributed Search

 
Subscribe to our Questions

 

System Design - Interview Questions

Components of System Design
 
RECOMMENDED RESOURCES
Behaviorial Interview
Top resource to prepare for behaviorial and situational interview questions.

STAR Interview Example