Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

@vasanthk
Last activeDecember 17, 2025 13:16

    Select an option

    Save vasanthk/485d1c25737e8e72759f to your computer and use it in GitHub Desktop.
    System Design Cheatsheet

    Picking the right architecture = Picking the right battles + Managing trade-offs

    Basic Steps

    1. Clarify and agree on the scope of the system
    • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
      • Who is going to use it?
      • How are they going to use it?
    • Constraints
      • Mainly identifytraffic and data handling constraints at scale.
      • Scale of the system such as requests per second, requests types, data written per second, data read per second)
      • Special system requirements such as multi-threading, read or write oriented.
    1. High level architecture design (Abstract design)
    • Sketch the important components and connections between them, but don't go into some details.
      • Application service layer (serves the requests)
      • List different services required.
      • Data Storage layer
      • eg. Usually a scalable system includes webserver (load balancer), service (service partition), database (master/slave database cluster) and caching systems.
    1. Component Design
    • Component + specificAPIs required for each of them.
    • Object oriented design for functionalities.
      • Map features to modules: One scenario for one module.
      • Consider the relationships among modules:
        • Certain functions must have unique instance (Singletons)
        • Core object can be made up of many other objects (composition).
        • One object is another object (inheritance)
    • Database schema design.
    1. Understanding Bottlenecks
    • Perhaps your system needs a load balancer and many machines behind it to handle the user requests. * Or maybe the data is so huge that you need to distribute your database on multiple machines. What are some of the downsides that occur from doing that?
    • Is the database too slow and does it need some in-memory caching?
    1. Scaling your abstract design
    • Vertical scaling
      • You scale by adding more power (CPU, RAM) to your existing machine.
    • Horizontal scaling
      • You scale by adding more machines into your pool of resources.
    • Caching
      • Load balancing helps you scale horizontally across an ever-increasing number of servers, but caching will enable you to make vastly better use of the resources you already have, as well as making otherwise unattainable product requirements feasible.
      • Application caching requires explicit integration in the application code itself. Usually it will check if a value is in the cache; if not, retrieve the value from the database.
      • Database caching tends to be "free". When you flip your database on, you're going to get some level of default configuration which will provide some degree of caching and performance. Those initial settings will be optimized for a generic usecase, and by tweaking them to your system's access patterns you can generally squeeze a great deal of performance improvement.
      • In-memory caches are most potent in terms of raw performance. This is because they store their entire set of data in memory and accesses to RAM are orders of magnitude faster than those to disk. eg. Memcached or Redis.
      • eg. Precalculating results (e.g. the number of visits from each referring domain for the previous day),
      • eg. Pre-generating expensive indexes (e.g. suggested stories based on a user's click history)
      • eg. Storing copies of frequently accessed data in a faster backend (e.g. Memcache instead of PostgreSQL.
    • Load balancing
      • Public servers of a scalable web service are hidden behind a load balancer. This load balancer evenly distributes load (requests from your users) onto your group/cluster of application servers.
      • Types: Smart client (hard to get it perfect), Hardware load balancers ($$$ but reliable), Software load balancers (hybrid - works for most systems)

    Load Balancing

    • Database replication
      • Database replication is the frequent electronic copying data from a database in one computer or server to a database in another so that all users share the same level of information. The result is a distributed database in which users can access data relevant to their tasks without interfering with the work of others. The implementation of database replication for the purpose of eliminating data ambiguity or inconsistency among users is known as normalization.
    • Database partitioning
      • Partitioning of relational data usually refers to decomposing your tables either row-wise (horizontally) or column-wise (vertically).
    • Map-Reduce
      • For sufficiently small systems you can often get away with adhoc queries on a SQL database, but that approach may not scale up trivially once the quantity of data stored or write-load requires sharding your database, and will usually require dedicated slaves for the purpose of performing these queries (at which point, maybe you'd rather use a system designed for analyzing large quantities of data, rather than fighting your database).
      • Adding a map-reduce layer makes it possible to perform data and/or processing intensive operations in a reasonable amount of time. You might use it for calculating suggested users in a social graph, or for generating analytics reports. eg. Hadoop, and maybe Hive or HBase.
    • Platform Layer (Services)
      • Separating the platform and web application allow you to scale the pieces independently. If you add a new API, you can add platform servers without adding unnecessary capacity for your web application tier.
      • Adding a platform layer can be a way to reuse your infrastructure for multiple products or interfaces (a web application, an API, an iPhone app, etc) without writing too much redundant boilerplate code for dealing with caches, databases, etc.

    Platform Layer

    Key topics for designing a system

    1. Concurrency
    • Do you understand threads, deadlock, and starvation? Do you know how to parallelize algorithms? Do you understand consistency and coherence?
    1. Networking
    • Do you roughly understand IPC and TCP/IP? Do you know the difference between throughput and latency, and when each is the relevant factor?
    1. Abstraction
    • You should understand the systems you’re building upon. Do you know roughly how an OS, file system, and database work? Do you know about the various levels of caching in a modern OS?
    1. Real-World Performance
    • You should be familiar with the speed of everything your computer can do, including the relative performance of RAM, disk, SSD and your network.
    1. Estimation
    • Estimation, especially in the form of a back-of-the-envelope calculation, is important because it helps you narrow down the list of possible solutions to only the ones that are feasible. Then you have only a few prototypes or micro-benchmarks to write.
    1. Availability & Reliability
    • Are you thinking about how things can fail, especially in a distributed environment? Do know how to design a system to cope with network failures? Do you understand durability?

    Web App System design considerations:

    • Security (CORS)
    • Using CDN
      • A content delivery network (CDN) is a system of distributed servers (network) that deliver webpages and other Web content to a user based on the geographic locations of the user, the origin of the webpage and a content delivery server.
      • This service is effective in speeding the delivery of content of websites with high traffic and websites that have global reach. The closer the CDN server is to the user geographically, the faster the content will be delivered to the user.
      • CDNs also provide protection from large surges in traffic.
    • Full Text Search
      • Using Sphinx/Lucene/Solr - which achieve fast search responses because, instead of searching the text directly, it searches an index instead.
    • Offline support/Progressive enhancement
      • Service Workers
    • Web Workers
    • Server Side rendering
    • Asynchronous loading of assets (Lazy load items)
    • Minimizing network requests (Http2 + bundling/sprites etc)
    • Developer productivity/Tooling
    • Accessibility
    • Internationalization
    • Responsive design
    • Browser compatibility

    Working Components of Front-end Architecture

    • Code
      • HTML5/WAI-ARIA
      • CSS/Sass Code standards and organization
      • Object-Oriented approach (how do objects break down and get put together)
      • JS frameworks/organization/performance optimization techniques
      • Asset Delivery - Front-end Ops
    • Documentation
      • Onboarding Docs
      • Styleguide/Pattern Library
      • Architecture Diagrams (code flow, tool chain)
    • Testing
      • Performance Testing
      • Visual Regression
      • Unit Testing
      • End-to-End Testing
    • Process
      • Git Workflow
      • Dependency Management (npm, Bundler, Bower)
      • Build Systems (Grunt/Gulp)
      • Deploy Process
      • Continuous Integration (Travis CI, Jenkins)

    Links

    System Design Interviewing

    Scalability for Dummies

    Introduction to Architecting Systems for Scale

    Scalable System Design Patterns

    Scalable Web Architecture and Distributed Systems

    What is the best way to design a web site to be highly scalable?

    How web works?

    @princeadi
    Copy link

    This is one of the best cheat sheets I have applied onKhaleejday.com and I have gotten amazing results.

    @riteshjain01
    Copy link

    Great resource! This is a concise and comprehensive guide for understandingfront-end technologies. I appreciate how you've broken down the landscape into clear categories—it really helps in grasping the big picture. A quick suggestion: adding links to official documentation or popular tutorials for each technology might make this even more actionable for beginners. Keep up the great work!

    @michaelharrington19

    This system design guide is incredibly well-written! It's clear, concise, and covers all the essential topics. As someone who works in mobile app development, I can see how the concepts here can be applied directly to real-world projects. Whether you're scaling an app or optimizing your database structure, the insights here are invaluable. If you're building a mobile app and looking for expert advice, working with aTop Mobile App Development Company In Delaware could be the perfect way to ensure your app is both scalable and efficient.

    @nimbleappgenieuae
    Copy link

    This cheatsheet is a goldmine for anyone diving into the complexities of system design. From handling concurrency and caching to understanding bottlenecks and choosing the right scaling strategy, it captures everything in a structured and approachable way. For amobile app development company in Dubai, where performance and scalability are non-negotiable, these principles are not just useful—they're essential. Implementing concepts like database partitioning, service-oriented architecture, and smart load balancing helps ensure that applications remain robust under real-world loads. Truly an invaluable reference for modern app developers aiming to build systems that scale seamlessly.

    @smithdainel
    Copy link

    Great resource! The System Design Cheatsheet is super helpful for understanding architecture fundamentals and scaling strategies. Whether you're a beginner or experienced developer, it’s a solid reference. If you're working with amobile app development company, sharing this guide with your tech team can streamline planning and build more efficient, scalable apps. Thanks for sharing!

    @justinhall1988
    Copy link

    The "System Design Cheatsheet" provides a solid overview of key architectural principles like caching, load balancing, and database partitioning. It’s a practical guide for designing scalable systems.
    A great real-world example of these principles in action isMEV, a software development company that builds cloud-native, modular solutions for industries like healthcare and fashion. Their focus on scalable, data-driven architectures reflects many of the best practices outlined in the article.

    @goyalvikas13456
    Copy link

    goyalvikas13456 commentedJun 6, 2025
    edited
    Loading

    Thanks for sharing the System Design Cheatsheet—this is a great resource for both beginners and experienced developers! It’s essential to understand key components like load balancing, caching, database scaling, and microservices architecture when working on large-scale applications. If you're working on a real-world project or planning to launch a scalable mobile application, collaborating with an expertmobile app development company in Denver can help you implement these system design principles effectively. They bring practical experience and tech know-how that align with modern architecture standards.

    @sgsg456
    Copy link

    This is one of the best cheat sheets I have applied ontopmost.ae and I have gotten very good results.

    @computerrepairsydney

    Great article on the System Design Cheatsheet! AtComputer Repairs Sydney, we see firsthand how crucial a well-designed system is for smooth performance—whether it's troubleshooting hardware, optimizing software, or setting up efficient networks. If you're in Sydney, Australia, and need reliable onsite or online computer repair services, we’ve got you covered! From slow PCs to complex system errors, our expert team ensures fast and affordable fixes.

    @taimuransari4221
    Copy link

    Chicago, a bustling hub of commerce and innovation, is home to a thriving tech ecosystem that fuels business growth across industries. As companies strive to stay competitive,custom app development in Chicagohas emerged as a critical strategy for creating tailored solutions that meet unique business needs.

    @taimuransari4221
    Copy link

    Accountants Middlesbrough: Why Skzee is Your Top Choice for Financial Success
    When it comes to managing finances, finding reliable and professional accountants in Middlesbrough is crucial for individuals and businesses alike. Whether you're a small business owner, a freelancer, or an individual seeking expert tax advice, partnering with a trusted accountancy firm can make all the difference. Skzee, a leading name in Middlesbrough’s accountancy scene, stands out as the go-to solution for all your financial needs. In this article, we’ll explore why Skzee is the top choice for accountants in Middlesbrough, delving into their services, expertise, and commitment to client success.

    @taimuransari4221
    Copy link

    As a premierGrab and Go Foods Manufacturer, FreshGrill has redefined convenience dining by offering high-quality, nutritious, and flavorful meals that cater to the modern consumer’s needs. This article explores FreshGrill’s journey

    @taimuransari4221
    Copy link

    In today’s fast-paced digital landscape, businesses need websites that are visually stunning, highly functional, and easy to manage. For companies in Dubai, a global hub of innovation and commerce, partnering with aWebflow development company in Dubai offers a strategic advantage. Webflow, a powerful no-code platform, empowers businesses to create professional websites with unmatched design flexibility and performance. This article explores why hiring a Webflow development company in Dubai is the smart choice for businesses aiming to elevate their online presence.

    @robert983roberp
    Copy link

    robert983roberp commentedJun 26, 2025
    edited
    Loading

    Fantastic cheatsheet—you’ve nailed the way every system-design decision is really a trade-off between speed, reliability, and cost. I see the same balancing act every day in the pro-AV world: when we roll out enterprise-wide control and monitoring platforms we have to design for peak traffic from hundreds of rooms, cache status data for sub-second touch-panel response, and partition databases so video analytics don’t bog down the scheduling API. If anyone’s curious about how these principles apply beyond pure software, here’s a real-world case study from our team’sav integration services —we’ve used horizontal scaling plus edge caching to keep live video switching latency under 40 ms even during global town-halls. Your notes on load-balancing and in-memory caching line up perfectly with what we’re doing. Great read!

    @Appinginedenver
    Copy link

    Thank you for sharing this comprehensive System Design Cheatsheet — it’s an incredibly valuable reference for engineers, architects, and technical decision-makers alike. The breakdown of components, from abstract architecture to platform services, effectively highlights how modern system design is all about balancing performance, scalability, and resilience while managing trade-offs across layers.

    As someone involved with a mobile app development company in Denver, I can especially relate to how crucial it is to choose the right system architecture from the outset. For our clients, scalability, caching strategies (like Redis/Memcached), and database partitioning are frequent focal points, especially as usage scales.

    I really appreciate the inclusion of real-world considerations like load balancing, MapReduce for large-scale analytics, CDNs for content delivery, and modern front-end architecture elements like service workers and server-side rendering. These are all things we actively implement at ourmobile app development company Denver, especially when crafting apps that must perform reliably under high load or deliver seamless UX across different devices and networks.

    A few highlights I found particularly useful:

    The reminder that caching is often the biggest performance multiplier.

    The distinction between vertical vs. horizontal scaling.

    The emphasis on real-world performance metrics and understanding the limitations of infrastructure.

    Practical advice on designing with concurrency, consistency, and availability in mind—key in distributed systems.

    In today’s fast-moving mobile ecosystem, a well-architected backend is just as vital as the app’s front-end interface. Whether we’re building for startups or enterprise-level clients, this kind of system design thinking ensures that we don’t just ship features, but we ship stable, secure, and scalable products.

    Thanks again for this deep dive it’s a great reminder of how strong foundations in system design directly impact the success of modern mobile applications.

    @kanwarpal-singh01
    Copy link

    Wow, this is such an insightful guide to system architecture and development! The detailed breakdown of crucial steps makes it an excellent resource for app design and implementation. As someone engaged in the mobile app development industry and always learning from thebest mobile app development company in UAE, I found your focus on aspects like load balancing, database replication, and layered platform architecture extremely valuable. These elements are essential for delivering robust, scalable, and high-performing applications. Your comprehensive approach truly simplifies the complexity of system architecture!

    @Shivanigmta
    Copy link

    This cheatsheet is a treasure trove for anyone exploring the principles of system design. It collects and summarizes specific concepts like concurrency, caching, bottlenecks, and scaling methods, in an organized and easily digestible format. For amobile app development company in Singapore where performance and scalability are mandatory, these concepts are not only helpful—they are critical and necessary. Principles like database partitioning, service-oriented architecture, and intelligent load balancing can help applications hold up against real-world weights. Truly an exceptional reference for app developers of today's world wanting to develop and sustain systems that scale.

    @adelina050696-dotcom

    I really appreciate how this resource organizes front-end concepts so clearly. Having a structured overview like this makes it easier to see how different parts of development connect and influence the final product. For me, it also reinforces how crucial it is to integrate design thinking into the process early on. Without intuitive flows and usability in mind, even the best code can fall short. That’s one of the reasons I focus so much onuser experience solutions, because they bridge the gap between technical execution and human needs. At Neuronux, this approach has helped transform complex ideas into seamless digital experiences.

    @jhonemartin41414-sketch

    AnUber clone is a ready-made ride-hailing solution designed to replicate Uber’s core features. It enables businesses to launch their own branded taxi app with real-time tracking, secure payments, driver management, and seamless booking. Scalable and customizable, this solution helps entrepreneurs quickly enter the ride-sharing market and attract loyal users.

    @patriciasmithusa
    Copy link

    Explore a carefully curatedpre-announced list of MVP app development companies recognized for delivering high-quality, scalable MVP solutions. This exclusive lineup helps startups identify reliable partners to build and test product concepts efficiently before full-scale development.

    @patriciasmithusa
    Copy link

    Expedia Clone Development involves creating a comprehensive travel booking platform similar to Expedia. It includes features like flight, hotel, and car rental bookings, secure payments, user-friendly interfaces, and real-time availability. This solution enables businesses to launch a scalable, customizable travel marketplace, enhancing customer experience and boosting revenue.

    @ethan447
    Copy link

    A robust System Design Cheatsheet centers on prioritizing non-functional requirements like scalability and consistency, then applying appropriate architectural patterns and technologies. Key steps involve detailed capacity estimation (QPS/storage), deciding between SQL and NoSQL based on data needs (ACID vs. BASE), and defining communication layers using APIs (synchronous) and Queues (asynchronous). A crucial component of any modern, performant design is the user-facing layer, which requires highly efficient and reactive frontend implementation. To ensure your design translates into a fast, dynamic, and maintainable application, secure the best talent for this critical development phase, you canhire vue.js developers to expertly build your interactive components and SPAs.

    @software-orca
    Copy link

    Excellent breakdown! Clear, structured, and practical — this kind of system design approach is exactly what we follow at ourmobile app development company Dallas, especially when building scalable backend architectures for complex applications.

    @sophiaeddi11
    Copy link

    Excellent breakdown—clear, well-structured, and highly practical. This system design approach closely aligns with how we work at ourmobile app development company Dallas
    and custom AI development company Dallas, particularly when designing scalable backend architectures for complex, high-performance applications.

    @apptunixsingaporeservices

    A reliable mobile app development company Singapore helps businesses build innovative, secure, and scalable mobile solutions tailored to their goals. From Android and iOS app development to cross-platform solutions, UI/UX design, and ongoing support, trusted developers empower startups and enterprises to accelerate digital transformation and achieve long-term growth.

    @almazroueiaaliyah-star

    What if your business could think smarter, move faster, and predict outcomes before they happen? Here as anAI development company in Saudi Arabia helps businesses unlock intelligent automation, data-driven insights, and sharper decision-making. By leveraging machine learning, NLP, and computer vision, these companies build scalable solutions aligned with Vision 2030 goals. From predictive analytics to AI-powered applications, the focus stays on real business impact—an ecosystem subtly influenced by global innovators like Apptunix bringing proven AI expertise to Saudi Arabia’s evolving digital landscape.

    @Hazel2216
    Copy link

    What if your logistics operations could anticipate delays, optimize routes instantly, and cut costs before issues arise? Alogistics software development company helps businesses gain real-time visibility, automated workflows, and data-driven control across the supply chain. By leveraging AI-powered analytics, cloud platforms, IoT integration, and smart fleet management systems, these companies build scalable logistics solutions aligned with modern business needs. From warehouse automation to last-mile delivery optimization, the focus remains on efficiency and reliability—an ecosystem subtly influenced by global innovators like Apptunix, bringing proven logistics software expertise to digitally transforming enterprises.

    @annerossusa-web
    Copy link

    Great insights shared in this article! If you’re exploring ways to grow your business with technology, Apptunix can help. They’re a leading team specializing in:

    1. Web Development Company in Saudi Arabia
    2. Software Development Company in Saudi Arabia
    3. Software Development Services in Bahrain
    4. Beauty and Salon App Development
    5. MVP Development
      Apptunix delivers custom, scalable, and high-performing solutions for startups and enterprises across the Middle East.

    @sgsg456
    Copy link

    sgsg456 commentedDec 17, 2025 via email

    What do you need from our side ?
    On Wed, Dec 17, 2025 at 4:22 PM Apptunix Technologies < ***@***.***> wrote: ***@***.**** commented on this gist. ------------------------------ Great insights shared in this article! If you’re exploring ways to grow your business with technology, Apptunix can help. They’re a leading team specializing in: 1. Web Development Company in Saudi Arabia <https://www.apptunix.com/web-development-company-saudi-arabia/> 2. Software Development Company in Saudi Arabia <https://www.apptunix.com/software-development-company-riyadh-saudi-arabia/> 3. Software Development Services in Bahrain <https://www.apptunix.com/software-development-company-bahrain> 4. Beauty and Salon App Development <https://www.apptunix.com/solutions/salon-app-development/> 5. MVP Development <https://www.apptunix.com/mvp-development/> Apptunix delivers custom, scalable, and high-performing solutions for startups and enterprises across the Middle East. — Reply to this email directly, view it on GitHub <https://gist.github.com/vasanthk/485d1c25737e8e72759f#gistcomment-5908857> or unsubscribe <https://github.com/notifications/unsubscribe-auth/BTKLL7XM3CZ6DS4CPWMVJQD4CFDJVBFHORZGSZ3HMVZKMY3SMVQXIZNMON2WE2TFMN2F65DZOBS2WR3JON2EG33NNVSW45FGORXXA2LDOOIYFJDUPFYGLJDHNFZXJJLWMFWHKZNIGMYDQNRYGQZTFKTBOR2HE2LCOV2GK44TQKSXMYLMOVS2SMRUGA3DMMZSGU22I3TBNVS2QYLDORXXEX3JMSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DF> . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub> .
    -- *Sachin Gupta**SEO **Tech **Experts**Websites | Web Services | S.E.O. | Digital Marketing*130, JMD Megapolis, Sohna RoadGurgaon - 122001 | Haryana, IndiaÈ*: *+91 9871280005**:* ***@***.*** ***@***.***>**Website:* *www.seotechexperts.com <http://www.seotechexperts.com/>**www.facebook.com/SEOTechExperts <http://www.facebook.com/SEOTechExperts>*
    __________________________________________________________________Note: Please send website contents for updation by Email or SMS only. ( 10 A.M to 6 P.M)

    @apptunix02
    Copy link

    Excellent resource! The cheatsheet presents system design concepts in a clear, practical way that’s easy to apply in real-world scenarios. This kind of structured thinking is exactly what we follow at amobile app development company in Australia when designing scalable, high-performance applications. Great work putting this together!

    Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

    [8]ページ先頭

    ©2009-2025 Movatter.jp