System Design Series: Chapter 2 - Why Do We Need System Design?

Rohit GawandeRohit Gawande
10 min read

Introduction to Chapter 2

In the world of software development, building applications isn’t just about writing code. It’s about understanding and solving real-world problems effectively. The goal of system design is to transform complex user needs into scalable and efficient solutions that seamlessly integrate into their lives.

In this chapter, we dive deeper into why system design is crucial. We’ll explore practical examples, discuss foundational steps in building systems, and analyze how real-world applications like Facebook, Amazon, and Uber address common user requirements.


Why Do We Need System Design?

Imagine solving a puzzle where each piece represents a real-world problem—be it social connectivity, online shopping, or financial transactions. System design ensures that every piece fits perfectly to create a comprehensive solution.


Examples of Real-Life Problems and Their Solutions

  1. Social Connectivity

    • Problem: People want to build and maintain social networks.

    • Solution: Social media platforms like Facebook, LinkedIn, and Instagram allow users to create profiles, connect with friends, and share updates.

Detailed Use Case:

  • User Requirement: Create a friend network.

  • Application Design:

    • Feature 1: Add friends via friend requests.

    • Feature 2: Chat and share media.

    • Backend Requirements:

      • Database: Store user profiles, connections, and messages.

      • Algorithms: Suggest friends, detect spam requests.


  1. E-Commerce

    • Problem: Users want to purchase goods online.

    • Solution: Platforms like Amazon, Flipkart, and eBay simplify shopping through search filters, recommendations, and seamless payments.

Detailed Use Case:

  • User Requirement: Buy a smartphone.

  • Application Design:

    • Feature 1: Search and filter products.

    • Feature 2: Add to cart and proceed to payment.

    • Backend Requirements:

      • Product Catalog: Store product details, images, and inventory.

      • Payment Gateway: Secure transactions with multiple options.

ComponentPurposeExample in Amazon
Product CatalogStores product infoListing of iPhones.
RecommendationSuggests items based on history"You may also like…" section.
Order ManagementTracks orders, shipping, and delivery statusOrder tracking dashboard.

  1. On-Demand Services

    • Problem: Users need quick access to services like transportation or home cleaning.

    • Solution: Applications like Uber or Urban Company address these needs.

Detailed Use Case:

  • User Requirement: Book a ride to the airport.

  • Application Design:

    • Feature 1: Enter pickup and drop locations.

    • Feature 2: Real-time driver tracking.

    • Backend Requirements:

      • Location Services: Use GPS to match riders and drivers.

      • Routing Algorithm: Calculate optimal routes.


  1. Healthcare and Medicine Delivery

    • Problem: Users need easy access to medicines and healthcare services.

    • Solution: Applications like 1mg and NetMeds deliver medicines and provide teleconsultation services.

User RequirementFeatures NeededTechnical Requirements
Order MedicinesSearch, add to cart, and pay.Product catalog, inventory management.
Book ConsultationsSchedule calls with doctors.Calendar integration, video call APIs.
Track OrdersReal-time order status updates.Notification systems, delivery tracking.

Key Insights from Real-Life Problems

  1. Applications Address Real-World Problems: They act as tools to fulfill user needs like communication, shopping, and transportation.

  2. Scalability Is Key: Whether handling a small group of users or millions, the application’s performance must remain consistent.

  3. Non-Stop Availability: Applications must be designed for high uptime, ensuring reliability and user trust.


Steps to Build an Application

Building any application involves systematic steps that ensure functionality, scalability, and user satisfaction. Let’s break these steps down:


1. Requirement Gathering

Definition

The process of understanding what the user needs and translating it into actionable technical requirements.

Sources of Requirements

  • Customers: Direct user feedback helps identify pain points.

  • Surveys/Polls: Broader audience insights guide product direction.

  • Product Managers/Analysts: Define the business vision.

  • Market Research: Analyze industry trends and competitors.

Example: Urban Company

Urban Company connects users with service providers. Its requirement gathering revealed:

  • Customer Needs: Easy booking of home services.

  • Service Provider Needs: Manage appointments efficiently.

StakeholderRequirementFeature Example
CustomerEasy booking systemUser-friendly app interface.
Service ProviderAppointment notificationsPush notifications for bookings.
Admin/ManagementTrack performance and usage statsAdmin dashboard with analytics.

2. Scoping the Project

Scoping defines the features and functionalities to be built.

Feature Segregation

Breaking down the application into smaller modules for better planning and execution.

Example: Facebook Features

  • Feature 1: Add Friends

    • Sending/Accepting Friend Requests.

    • Viewing Friend Profiles.

  • Feature 2: Posting on Walls

    • Text Posts.

    • Media Sharing (Images, Videos).

Timeline for Feature Rollout

YearQuarterFeatures Targeted
2024Q1Login, Profile Management.
2024Q2Friend Requests, Notifications.
2024Q3Wall Posts, Photo Uploads.

3. MVP (Minimal Viable Product)

Definition

An MVP is a basic version of the product with only core functionalities, used to test ideas and attract stakeholders.

Steps to Build an MVP

  1. Identify critical features.

  2. Develop a simple prototype.

  3. Gather feedback from users.

  4. Refine the product based on feedback.

Example: Uber MVP

  • Core Features: Booking rides, matching users with drivers.

  • Advanced Features (Post-MVP): Driver ratings, ride history, payment options.


4. Analyzing Core Components

  1. Compute Resources
    Allocate processing power for fast and efficient execution.

  2. Storage
    Plan database structures to handle user and transactional data.

  3. Network
    Ensure smooth communication between clients and servers.

ComponentPurposeExample in Facebook
ComputeHandle user authentication, posts.Processing login requests.
StorageStore profiles, posts, and connections.Database for user data.
NetworkSync data across devices and servers.Delivering notifications.

Theory: Why System Design Is Critical

  • Scalability: A poorly designed system might crash under heavy load.

  • Reliability: High availability ensures user trust.

  • Performance: Fast response times keep users engaged.

  • Security: Protecting sensitive data from breaches.


Common Pitfalls in System Design

  1. Underestimating Load: Not planning for scalability can lead to downtime.

  2. Ignoring User Feedback: Skipping requirement gathering leads to poor user experience.

  3. Overcomplicating Architecture: Keep it simple for easy maintenance.


Interview Questions on System Design


1. Why do we need System Design in software development?

Answer:

System Design helps to:

  1. Solve real-world problems through efficient software solutions.

  2. Ensure scalability, reliability, and maintainability in applications.

  3. Define the structure and behavior of the software system.

  4. Make critical architectural decisions, including component interaction, data flow, and fault tolerance.


2. What are the key steps involved in designing a system or application?

Answer:

  1. Requirement Gathering: Collect user and business needs via surveys, client discussions, and market research.

  2. Scoping: Break down the system into features, prioritize them, and define an MVP (Minimum Viable Product).

  3. Architecture Design: Define the high-level structure (e.g., monolithic, microservices).

  4. Technology Selection: Choose programming languages, frameworks, databases, and tools.

  5. Implementation: Build the system following the design principles.

  6. Testing and Deployment: Verify functionality, scalability, and performance before going live.


3. What is the difference between MVP and POC in system design?

Answer:

FeatureMVP (Minimum Viable Product)POC (Proof of Concept)
PurposeDeliver a basic version of the product to users.Validate the feasibility of an idea.
AudienceEnd-users/customers.Internal teams or investors.
ScopeFunctional but minimal features.Limited functionality to prove an idea.
OutcomeA usable product.Decision on whether to proceed.

4. What are some challenges faced during requirement gathering?

Answer:

  • Ambiguity: Vague or unclear requirements from stakeholders.

  • Conflicts: Contradictory requirements from different stakeholders.

  • Scope Creep: Continuous addition of requirements without adjusting timelines.

  • Communication Gaps: Misunderstanding between technical teams and non-technical stakeholders.

Solution: Use clear documentation, prototypes, and regular stakeholder meetings.


5. How would you prioritize features for a new application?

Answer:

Use frameworks like MoSCoW or Weighted Scoring.

  1. MoSCoW:

    • Must have: Essential features for the application to function.

    • Should have: Important but not critical.

    • Could have: Nice-to-have features.

    • Won’t have: Features deferred for later.

  2. Weighted Scoring: Assign weights based on business impact, user demand, and technical complexity.


6. What are common pitfalls in designing scalable systems?

Answer:

  1. Overengineering: Adding unnecessary complexity.

  2. Underestimating Load: Not planning for future traffic growth.

  3. Single Points of Failure: Lack of redundancy in key components.

  4. Inefficient Data Models: Poor database design leading to bottlenecks.

  5. Ignoring Monitoring: No real-time tracking of system health.

Solution: Design incrementally, implement load testing, and monitor continuously.


7. What is the role of architecture in system design?

Answer:

Architecture provides the blueprint for building the system and defines:

  • System Components: Services, databases, APIs.

  • Interactions: How components communicate (e.g., REST, GraphQL).

  • Non-Functional Requirements: Scalability, fault tolerance, latency.

  • Technology Stack: Tools and frameworks to use.


8. Explain the difference between monolithic and microservices architecture.

FeatureMonolithic ArchitectureMicroservices Architecture
StructureSingle, tightly integrated application.Modular, loosely coupled services.
ScalabilityLimited to scaling the entire application.Scales individual components independently.
DeploymentOne large deployment unit.Separate deployment for each service.
Failure ImpactOne failure can affect the whole system.Isolated failures minimize impact.

9. What is the purpose of scoping in system design?

Answer:

  • Define Boundaries: Determine what the system will and will not do.

  • Prioritize Features: Decide the order of feature implementation.

  • Resource Allocation: Plan time, budget, and human resources.

  • Set Milestones: Break down the project into achievable goals.


10. How do you ensure high availability in an application?

Answer:

  1. Redundancy: Use multiple servers and databases.

  2. Load Balancing: Distribute traffic across servers.

  3. Failover Mechanisms: Automatically switch to backup systems during failures.

  4. Data Replication: Ensure data consistency across regions.

  5. Monitoring and Alerts: Detect and resolve issues proactively.


11. What is scalability, and how can it be achieved?

Answer:

Scalability: The system's ability to handle increasing loads efficiently.

  1. Vertical Scaling: Add more resources (CPU, RAM) to a single server.

    • Pros: Simpler to implement.

    • Cons: Limited by hardware capacity.

  2. Horizontal Scaling: Add more servers to distribute the load.

    • Pros: No single point of failure, supports massive growth.

    • Cons: Complex coordination between servers.


ApplicationInitial MVP
FacebookBasic friend network and messaging features.
UberSimple ride-booking between two locations.
AirbnbListing and booking of properties online.

13. How do you identify non-functional requirements (NFRs)?

Answer:

NFRs describe how the system performs rather than what it does. Examples include:

  • Performance: Response time under load.

  • Scalability: Support for user growth.

  • Security: Data protection and compliance.

  • Reliability: Uptime guarantees (e.g., 99.9%).

  • Maintainability: Ease of updates and bug fixes.


By combining real-world examples, theoretical foundations, and practical applications, this chapter sets the stage for exploring deeper concepts in system design. Let me know if you'd like additional diagrams or elaborations on specific sections!

Chapter 2:Mastering the Web: A Journey Through HTML and Beyond

Chapter 2: Comprehensive Guide to HTML Tables, iFrames, and Forms: Practical Examples and Best Practices


Other Series:


Connect with Me
Stay updated with my latest posts and projects by following me on social media:

  • LinkedIn: Connect with me for professional updates and insights.

  • GitHub: Explore my repository and contributions to various projects.

  • LeetCode: Check out my coding practice and challenges.

Your feedback and engagement are invaluable. Feel free to reach out with questions, comments, or suggestions. Happy coding!


Rohit Gawande
Full Stack Java Developer | Blogger | Coding Enthusiast

0
Subscribe to my newsletter

Read articles from Rohit Gawande directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Rohit Gawande
Rohit Gawande

🚀 Tech Enthusiast | Full Stack Developer | System Design Explorer 💻 Passionate About Building Scalable Solutions and Sharing Knowledge Hi, I’m Rohit Gawande! 👋I am a Full Stack Java Developer with a deep interest in System Design, Data Structures & Algorithms, and building modern web applications. My goal is to empower developers with practical knowledge, best practices, and insights from real-world experiences. What I’m Currently Doing 🔹 Writing an in-depth System Design Series to help developers master complex design concepts.🔹 Sharing insights and projects from my journey in Full Stack Java Development, DSA in Java (Alpha Plus Course), and Full Stack Web Development.🔹 Exploring advanced Java concepts and modern web technologies. What You Can Expect Here ✨ Detailed technical blogs with examples, diagrams, and real-world use cases.✨ Practical guides on Java, System Design, and Full Stack Development.✨ Community-driven discussions to learn and grow together. Let’s Connect! 🌐 GitHub – Explore my projects and contributions.💼 LinkedIn – Connect for opportunities and collaborations.🏆 LeetCode – Check out my problem-solving journey. 💡 "Learning is a journey, not a destination. Let’s grow together!" Feel free to customize or add more based on your preferences! 😊