Search test library by skills or roles
⌘ K

Adaface Sample System Design Questions

Here are some sample System Design questions from our premium questions library (10273 non-googleable questions).

Skills

🧐 Question

Medium

Optimal Data Replication and Consistency in Distributed Systems
Data Consistency
Load Balancing
Fault Tolerance
Solve
Consider a distributed e-commerce platform designed to handle high traffic volumes and ensure data consistency across its services. The platform uses a distributed database that replicates data across multiple nodes to increase availability and performance. To balance the load, it employs a load balancer that distributes user requests evenly across these nodes. The system is designed to tolerate the failure of up to two nodes without affecting the platform's overall availability.
            
            Given the critical requirement for strong consistency to prevent issues such as overselling of products, the system uses a consensus algorithm for replication. The database is configured with a replication factor of 5, meaning each piece of data is stored on 5 nodes. For read and write operations to be considered successful, they must be acknowledged by a majority of the nodes involved in the operation.
            
            Assuming all nodes have equal hardware resources and network latency between nodes is negligible, which of the following configurations would best meet the platform's requirements for high availability, performance, and strong consistency?
A: Reads require acknowledgment from 2 nodes, and writes require acknowledgment from 4 nodes.
            B: Reads and writes both require acknowledgment from 3 nodes.
            C: Reads require acknowledgment from 3 nodes, and writes require acknowledgment from 2 nodes.
            D: Reads and writes both require acknowledgment from 4 nodes.
            E: Reads require acknowledgment from 1 node, and writes require acknowledgment from 5 nodes.
            F: Reads and writes both require acknowledgment from 5 nodes.

Easy

Real-time Vehicle Tracking for Logistics Company
Data Storage
Scalability
Real-time Updates
NoSQL
Solve
TransitTrack is a logistics company that needs to store real-time location data (latitude, longitude) of their vehicles as they move across the city. The system should be optimized for fast read and write operations to provide real-time tracking. TransitTrack can tolerate occasional data loss since the vehicle locations are updated frequently. Which of the following data storage solutions should TransitTrack implement for their vehicle tracking system?
A: Utilize a relational database management system (RDBMS) like PostgreSQL with a table indexed on the vehicle_id column for efficient data insertion and retrieval.
            B: Implement an in-memory cache like Redis to store the vehicle location data, with the vehicle_id as the key and the latitude-longitude pair as the value.
            C: Use a document-oriented database like MongoDB to store the vehicle location data as GeoJSON documents, enabling geospatial querying capabilities.
            D: Develop a custom in-memory data structure using a spatial indexing technique like an R-tree to store and query the vehicle location data efficiently.
            E: Use a time-series database like InfluxDB to store the vehicle location data along with timestamps, allowing for efficient querying and analysis of historical location data.

Medium

Session stickiness with ELB
Cookies
Solve
Johnny Bravo is setting up a new e-commerce store for men's clothing. He set up session stickiness with ELB. But he does not want ELB to manage the cookie, he wants the application to manage the cookie. When the server instance, which is bound to a cookie, crashes what do you expect will happen?
A: ELB will throw an error due to cookie unavailability
            B: The response will have a cookie but stickiness will be deleted
            C: The session will be sticky and ELB will route requests to another server as ELB keeps replicating the Cookie
            D: The session will not be sticky until a new cookie is inserted

Medium

Updating UI after Encoding
UI Design
Decoupling
Solve
Imagine you’re a developer at Songbird Inc, working on a music editing app for mobile devices. The app allows users to edit audio clips and export them in various audio formats. Once a user finishes editing a clip, they can choose an output format and initiate the encoding process. This encoding process can take a while depending on the chosen format and the length of the clip. Because it’s a mobile app, you want to avoid freezing the UI while encoding is in progress.
            
            What’s the most appropriate approach to notify the user when the encoding is complete and the exported file is ready?
A: Directly modify the UI elements from within the encoding logic. When encoding finishes, the encoding system can directly tell the UI components to update themselves with the new information (e.g., change a button text to “Export Complete”).
            B: Separate the UI update logic from the encoding process. The encoding system should trigger a custom event (e.g., “EncodingFinishedEvent”) upon completion. UI components can listen for this event and update themselves accordingly when it’s received.
            C:  Have the UI code continuously check on the encoding status with a loop (often referred to as busy waiting or polling). The loop would keep checking a flag or variable set by the encoding system until the encoding is complete. Once complete, the UI can update itself.
            D:  Introduce a central message queue or event bus. The encoding system can publish a message to the message queue upon finishing the task. Separate UI update logic would be subscribed to the queue, listening for relevant messages. When it receives the message about encoding completion, it can update the UI.
            E: Let the encoding logic return a callback function to the UI layer when it’s initiated. Once encoding is finished, the encoding system calls back this function, allowing the UI to update itself.
🧐 Question🔧 Skill

Medium

Optimal Data Replication and Consistency in Distributed Systems
Data Consistency
Load Balancing
Fault Tolerance

2 mins

System Design
Solve

Easy

Real-time Vehicle Tracking for Logistics Company
Data Storage
Scalability
Real-time Updates
NoSQL

2 mins

System Design
Solve

Medium

Session stickiness with ELB
Cookies

2 mins

System Design
Solve

Medium

Updating UI after Encoding
UI Design
Decoupling

2 mins

System Design
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
Optimal Data Replication and Consistency in Distributed Systems
Data Consistency
Load Balancing
Fault Tolerance
System Design
Medium2 mins
Solve
Real-time Vehicle Tracking for Logistics Company
Data Storage
Scalability
Real-time Updates
NoSQL
System Design
Easy2 mins
Solve
Session stickiness with ELB
Cookies
System Design
Medium2 mins
Solve
Updating UI after Encoding
UI Design
Decoupling
System Design
Medium2 mins
Solve

Trusted by recruitment teams in enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
customers across world
Join 1500+ companies in 80+ countries.
Try the most candidate friendly skills assessment tool today.
g2 badges
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
logo
40 min tests.
No trick questions.
Accurate shortlisting.
ada
Ada
● Online
Previous
Score: NA
Next
✖️