System Design on AWS

Book description

Enterprises building complex and large-scale applications in the cloud face multiple challenges. From figuring out the right tools to estimating the right provisioning, nearly every solution comes with a complicated set of choices and trade-offs. AWS provides a one-stop shop for building and scaling these applications, and this practical guide helps you decide which pieces to use and how to fit them together.

Authors Jayanth Kumar and Mandeep Singh equip software architects and engineers with essential AWS and system design knowledge to help you make good decisions and overcome the challenges of designing and scaling enterprise software architecture. By diving into specific use cases, you'll understand how these principles and resources can be applied to real-world problems.

With this book, you will:

  • Learn the basics and best practices of successful system design
  • Understand key AWS services and their strengths and limitations for building large-scale systems
  • Examine engineering patterns and principles that best support large-scale systems, and learn how to design architecture with scalability, operations, and resilience in mind
  • Learn what highly performant and cost-optimized architectures look like on AWS and the tools and frameworks that are best for specific use cases

    Publisher resources

    View/Submit Errata

    Table of contents

    1. Foreword
    2. Preface
      1. How This Book Is Organized
      2. What This Book Isn’t
      3. Who Should Read This Book
      4. Conventions Used in This Book
      5. O’Reilly Online Learning
      6. How to Contact Us
      7. Acknowledgments
        1. Mandeep Singh
        2. Jayanth Kumar
    3. I. System Design Basics
    4. 1. System Design Trade-offs and Guidelines
      1. System Design Concepts
        1. Communication
        2. Consistency
        3. Availability
        4. Reliability
        5. Scalability
        6. Maintainability
        7. Fault Tolerance
      2. Fallacies of Distributed Computing
      3. System Design Trade-offs
        1. Time Versus Space
        2. Latency Versus Throughput
        3. Performance Versus Scalability
        4. Consistency Versus Availability
      4. System Design Guidelines
        1. Guideline of Isolation: Build It Modularly
        2. Guideline of Simplicity: Keep It Simple, Silly
        3. Guideline of Performance: Metrics Don’t Lie
        4. Guideline of Trade-offs: There Is No Such Thing as a Free Lunch
        5. Guideline of Use Cases: It Always Depends
      5. Conclusion
    5. 2. Storage Types and Relational Stores
      1. Data Storage Format
        1. File-Based Storage
        2. Block-Based Storage
        3. Object-Based Storage
      2. Relational Databases
        1. Relational Database Concepts
        2. Relational Database Management System Architecture
        3. Optimizing Relational Databases
        4. Scaling Relational Databases
        5. Open Source Relational Database Systems
      3. Conclusion
    6. 3. Nonrelational Stores
      1. Nonrelational Database Concepts
        1. Schema Flexibility
        2. Data Models
        3. Scalability
        4. High Availability and Fault Tolerance
        5. BASE
      2. Key-Value Databases
        1. Data Model
        2. Data Access and Retrieval Operations
        3. Scaling Key-Value Stores
        4. Availability in Key-Value Stores
        5. Advantages, Trade-offs, and Considerations
        6. Dynamo: Key-Value Database
      3. Document Databases
        1. Data Model
        2. Availability in Document Stores
        3. Advantages, Trade-offs, and Considerations
        4. MongoDB: Open Source Document Database
      4. Columnar Databases
        1. Data Model
        2. Consistency Levels
        3. Columnar Store Architecture
        4. Advantages, Trade-offs, and Considerations
        5. Apache Cassandra: Open Source Columnar Database
      5. Graph Databases
        1. Data Model
        2. Data Access and Retrieval
        3. Advantages, Trade-offs, and Considerations
        4. Neo4j: Open Source Graph Database
      6. Conclusion
    7. 4. Caching Policies and Strategies
      1. Benefits of Caching
      2. Cache Eviction Policies
        1. Belady’s Algorithm
        2. Queue-Based Policies
        3. Recency-Based Policies
        4. Frequency-Based Policies
        5. Allowlist Policy
      3. Cache Invalidation
      4. Caching Strategies
        1. Read-Intensive Strategies
        2. Write-Intensive Strategies
      5. Cache Deployment
        1. In-Process Caching
        2. Interprocess Caching
        3. Remote Caching
        4. Choosing a Cache Deployment Approach
      6. Caching Mechanisms
      7. Content Delivery Networks
        1. Push CDNs
        2. Pull CDNs
      8. Open Source Caching Solutions
        1. Memcached
        2. Redis
      9. Conclusion
    8. 5. Load Balancing Approaches and Techniques
      1. Networking Components
      2. Benefits of Load Balancing
      3. LB Deployment and Placement Strategies
        1. Global Server Load Balancing
        2. Local Load Balancing
      4. Load Balancing Algorithms
        1. Static Load Balancing Algorithms
        2. Dynamic Load Balancing Algorithms
      5. Session Persistence in LBs
        1. Stateful Load Balancers
        2. Stateless Load Balancers
      6. Types of Load Balancers
        1. LB Types Based on Functionality
        2. LB Types Based on Configuration
      7. Nginx: Open Source Load Balancer
      8. Conclusion
    9. 6. Communication Networks and Protocols
      1. Communication Models and Protocols
        1. OSI Model
        2. TCP/IP Model
      2. Communication Types
        1. Pull Mechanism: HTTP Polling
        2. Push Mechanism: WebSockets
        3. Push Mechanism: Server-Sent Events
      3. Common Communication Protocol Standards
        1. Remote Procedure Call
        2. REST
        3. GraphQL
        4. Web Real-Time Communication
      4. Conclusion
    10. 7. Containerization, Orchestration, and Deployments
      1. Evolution of Application Deployment
      2. Containerization
        1. Docker
        2. Container Orchestration
        3. Container Deployment Strategies
      3. CI/CD Pipeline with Gitflow and Automated Deployment Strategies
        1. Gitflow Workflow for Branch Management
        2. Continuous Integration
        3. Continuous Deployment
        4. Monitoring and Incident Management
      4. Conclusion
    11. 8. Architectural Designs and Patterns
      1. Change Data Capture
      2. Publisher-Subscriber Architecture
        1. Message Brokers
        2. Message Queues
      3. Choreography and Orchestration
        1. Choreography
        2. Orchestration
        3. Deciding Between Choreography and Orchestration
      4. Big Data Architecture
        1. Lambda Architecture
        2. Kappa Architecture
        3. Data Lake Architecture
      5. Solution Architecture
        1. Monoliths
        2. N-tier Architectures
        3. Microservices
      6. Event-Driven Architecture
        1. EDA Concepts and Implementations
        2. Paradigms of Event-Driven Implementations
      7. Common Cloud Architecture Patterns
        1. Event-Based Patterns: CQRS and Saga
        2. Failure-Tolerant Patterns: Circuit Breaker, Retry with Backoff, and Rate Limiter
        3. Domain-Based Patterns: Domain-Driven Design and Decompose by Subdomains
        4. API Routing Strategies and Patterns
        5. Other Cloud Architecture Patterns
      8. Open Source Distributed Systems Architecture
        1. HDFS
        2. Apache Kafka: Distributed Message Queue
        3. Comparing HDFS and Kafka
      9. Conclusion
    12. II. Diving Deep into AWS Services
    13. 9. AWS Network Services
      1. Getting Started with AWS
        1. AWS Regions
        2. AWS Availability Zones
        3. AWS Local Zones
        4. AWS Edge Locations
      2. Introduction to AWS Networking Services
        1. Amazon VPC
        2. Subnets
      3. Internet Connectivity
        1. Route Tables
        2. Security Groups
        3. Network Access Control Lists
        4. Amazon VPC-to-Internet Connectivity
        5. Connectivity Between Amazon VPCs
        6. Hybrid Connectivity
      4. Amazon Route 53
      5. AWS Elastic Load Balancer
      6. Amazon API Gateway
      7. Amazon CloudFront
      8. Conclusion
    14. 10. AWS Storage Services
      1. Cloud Storage on AWS
        1. Amazon Elastic Block Store
        2. Amazon Elastic File System
        3. Amazon Simple Storage Service
      2. AWS Databases
        1. Amazon RDS
        2. Amazon DynamoDB
        3. Amazon DocumentDB
        4. Amazon Neptune
        5. Amazon ElastiCache
        6. Amazon OpenSearch
        7. Amazon Timestream
        8. Amazon Keyspaces
      3. Conclusion
    15. 11. AWS Compute Services
      1. Amazon Elastic Compute Cloud
        1. Amazon Machine Image
        2. Instance Type
        3. Autoscaling
      2. AWS Lambda
      3. Containerization Services
        1. Amazon Elastic Container Service
        2. Amazon Elastic Kubernetes Service
      4. Conclusion
    16. 12. AWS Messaging, Orchestration, Monitoring, and Access Management Services
      1. Amazon Managed Streaming for Apache Kafka
      2. Amazon Kinesis
        1. Amazon Kinesis Data Streams
        2. Amazon Kinesis Data Analytics
        3. Amazon Kinesis Data Firehose
        4. Amazon Kinesis Video Streams
      3. Amazon Simple Queue Service
      4. Amazon Simple Notification Service
      5. Workflow Orchestration
        1. AWS Step Functions
        2. Amazon Managed Workflow for Apache Airflow
      6. Amazon CloudWatch
        1. Application Logs
        2. Metrics and Alarms
      7. AWS Identity and Access Management
      8. Amazon Cognito
      9. AWS AppSync
      10. Conclusion
    17. 13. Big Data, Analytics, and Machine Learning Services
      1. AWS Big Data and Analytics
        1. Amazon Elastic MapReduce
        2. AWS Glue
        3. Amazon Athena
        4. Amazon QuickSight
        5. Amazon Redshift
      2. Machine Learning on AWS
        1. Amazon SageMaker
        2. AWS ML Application Services
        3. AWS ML Infrastructure
      3. Conclusion
    18. III. System Design Use Cases
    19. 14. Designing a URL Shortener Service
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
        3. Storage Space
      2. Starting with the Design
        1. URL Shortening Algorithm
        2. System APIs
        3. System Considerations
        4. Database Selection
        5. Custom Domain Support
      3. Launching the System on AWS
        1. Day Zero Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    20. 15. Designing a Web Crawler and Search Engine
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
      2. Starting with the Design
        1. Designing the Web Crawler
        2. Designing the Search Engine
      3. Launching the System on AWS
        1. Day 0 Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    21. 16. Designing a Social Network and Newsfeed System
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
      2. Starting with the Design
        1. Handling New Posts
        2. Managing User Connections
        3. Search Service
      3. Launching the System on AWS
        1. Day 0 Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    22. 17. Designing an Online Game Leaderboard
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
      2. Starting with the Design
        1. Concepts and Principles
        2. A Rough System Design
      3. Launching the System on AWS
        1. Day 0 Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    23. 18. Designing a Hotel Reservation System
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
      2. Starting with the Design
        1. Property Onboarding Architecture
        2. Property Search Architecture
        3. Property Booking Architecture
        4. Property Reviews Architecture
      3. Launching the System on AWS
        1. Day 0 Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    24. 19. Designing a Chat Application
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
      2. Starting with the Design
        1. Messaging Architecture
        2. WhatsApp Architecture with Erlang
      3. Launching the System on AWS
        1. Day 0 Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    25. 20. Designing a Video-Processing Pipeline for a Streaming Service
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
      2. Starting with the Design
        1. Video Encoding
        2. Video-Quality Validation
        3. Content Indexing
        4. Content Distribution
      3. Launching the System on AWS
        1. Day 0 Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    26. 21. Designing an Online Stock-Trading Platform
      1. System Requirements
        1. Functional and Nonfunctional Requirements
        2. System Scale
      2. Starting with the Design
        1. Designing a Stock Tick System
        2. Designing the Order Management System
        3. Designing Ultra-Low-Latency Systems
        4. Building the P&L Dashboard
      3. Launching the System on AWS
        1. Day 0 Architecture
        2. Scaling to Millions and Beyond
        3. Day N Architecture
      4. Conclusion
    27. Index
    28. About the Authors

    Product information

    • Title: System Design on AWS
    • Author(s): Jayanth Kumar, Mandeep Singh
    • Release date: February 2025
    • Publisher(s): O'Reilly Media, Inc.
    • ISBN: 9781098146894