0%

Book Description

This invaluable roadmap for startup engineers reveals how to successfully handle web application scalability challenges to meet increasing product and traffic demands.

Web Scalability for Startup Engineers shows engineers working at startups and small companies how to plan and implement a comprehensive scalability strategy. It presents broad and holistic view of infrastructure and architecture of a scalable web application. Successful startups often face the challenge of scalability, and the core concepts driving a scalable architecture are language and platform agnostic.

The book covers scalability of HTTP-based systems (websites, REST APIs, SaaS, and mobile application backends), starting with a high-level perspective before taking a deep dive into common challenges and issues. This approach builds a holistic view of the problem, helping you see the big picture, and then introduces different technologies and best practices for solving the problem at hand. The book is enriched with the author's real-world experience and expert advice, saving you precious time and effort by learning from others' mistakes and successes.

  • Language-agnostic approach addresses universally challenging concepts in Web development/scalability—does not require knowledge of a particular language
  • Fills the gap for engineers in startups and smaller companies who have limited means for getting to the next level in terms of accomplishing scalability
  • Strategies presented help to decrease time to market and increase the efficiency of web applications

Table of Contents

  1. Cover
  2. Title Page
  3. Copyright Page
  4. About the Author
  5. Dedication
  6. Contents at a Glance
  7. Contents
  8. Acknowledgments
  9. Introduction
  10. Chapter 1 Core Concepts
    1. What Is Scalability?
    2. Evolution from a Single Server to a Global Audience
      1. Single-Server Configuration
      2. Making the Server Stronger: Scaling Vertically
      3. Isolation of Services
      4. Content Delivery Network: Scalability for Static Content
      5. Distributing the Traffic: Horizontal Scalability
      6. Scalability for a Global Audience
    3. Overview of a Data Center Infrastructure
      1. The Front Line
      2. Web Application Layer
      3. Web Services Layer
      4. Additional Components
      5. Data Persistence Layer
      6. Data Center Infrastructure
    4. Overview of the Application Architecture
      1. Front End
      2. Web Services
      3. Supporting Technologies
    5. Summary
  11. Chapter 2 Principles of Good Software Design
    1. Simplicity
      1. Hide Complexity and Build Abstractions
      2. Avoid Overengineering
      3. Try Test-Driven Development
      4. Learn from Models of Simplicity in Software Design
    2. Loose Coupling
      1. Promoting Loose Coupling
      2. Avoiding Unnecessary Coupling
      3. Models of Loose Coupling
    3. Don’t Repeat Yourself (DRY)
      1. Copy and Paste Programming
    4. Coding to Contract
    5. Draw Diagrams
      1. Use Case Diagrams
      2. Class Diagrams
      3. Module Diagrams
    6. Single Responsibility
      1. Promoting Single Responsibility
      2. Examples of Single Responsibility
    7. Open-Closed Principle
    8. Dependency Injection
    9. Inversion of Control (IOC)
    10. Designing for Scale
      1. Adding More Clones
      2. Functional Partitioning
      3. Data Partitioning
    11. Design for Self-Healing
    12. Summary
  12. Chapter 3 Building the Front-End Layer
    1. Managing State
      1. Managing HTTP Sessions
      2. Managing Files
      3. Managing Other Types of State
    2. Components of the Scalable Front End
      1. DNS
      2. Load Balancers
      3. Web Servers
      4. Caching
      5. Auto-Scaling
    3. Deployment Examples
      1. AWS Scenario
      2. Private Data Center
    4. Summary
  13. Chapter 4 Web Services
    1. Designing Web Services
      1. Web Services as an Alternative Presentation Layer
      2. API-First Approach
      3. Pragmatic Approach
    2. Types of Web Services
      1. Function-Centric Services
      2. Resource-Centric Services
    3. Scaling REST Web Services
      1. Keeping Service Machines Stateless
      2. Caching Service Responses
      3. Functional Partitioning
    4. Summary
  14. Chapter 5 Data Layer
    1. Scaling with MySQL
      1. Replication
      2. Data Partitioning (Sharding)
    2. Scaling with NoSQL
      1. The Rise of Eventual Consistency
      2. Faster Recovery to Increase Availability
      3. Cassandra Topology
    3. Summary
  15. Chapter 6 Caching
    1. Cache Hit Ratio
    2. Caching Based on HTTP
      1. HTTP Caching Headers
      2. Types of HTTP Cache Technologies
      3. Scaling HTTP Caches
    3. Caching Application Objects
      1. Common Types of Object Caches
      2. Scaling Object Caches
    4. Caching Rules of Thumb
      1. Cache High Up the Call Stack
      2. Reuse Cache Among Users
      3. Where to Start Caching?
      4. Cache Invalidation Is Difficult
    5. Summary
  16. Chapter 7 Asynchronous Processing
    1. Core Concepts
      1. Synchronous Example
      2. Asynchronous Example
      3. Shopping Analogy
    2. Message Queues
      1. Message Producers
      2. Message Broker
      3. Message Consumers
      4. Messaging Protocols
      5. Messaging Infrastructure
    3. Benefits of Message Queues
      1. Enabling Asynchronous Processing
      2. Easier Scalability
      3. Evening Out Traffic Spikes
      4. Isolating Failures and Self-Healing
      5. Decoupling
    4. Message Queue–Related Challenges
      1. No Message Ordering
      2. Message Requeueing
      3. Race Conditions Become More Likely
      4. Risk of Increased Complexity
    5. Message Queue–Related Anti-Patterns
      1. Treating the Message Queue as a TCP Socket
      2. Treating Message Queue as a Database
      3. Coupling Message Producers with Consumers
      4. Lack of Poison Message Handling
    6. Quick Comparison of Selected Messaging Platforms
      1. Amazon Simple Queue Service
      2. RabbitMQ
      3. ActiveMQ
      4. Final Comparison Notes
    7. Introduction to Event-Driven Architecture
      1. Request/Response Interaction
      2. Direct Worker Queue Interaction
      3. Event-Based Interaction
    8. Summary
  17. Chapter 8 Searching for Data
    1. Introduction to Indexing
    2. Modeling Data
      1. NoSQL Data Modeling
      2. Wide Column Storage Example
    3. Search Engines
      1. Introduction to Search Engines
      2. Using a Dedicated Search Engine
    4. Summary
  18. Chapter 9 Other Dimensions of Scalability
    1. Scaling Productivity through Automation
      1. Testing
      2. Build and Deployment
      3. Monitoring and Alerting
      4. Log Aggregation
    2. Scaling Yourself
      1. Overtime Is Not a Way to Scale
      2. Managing Yourself
    3. Scaling Agile Teams
      1. Adding More People
      2. Procedures and Innovation
      3. Culture of Alignment
    4. Summary
  19. Appendix References
    1. Books
    2. White Papers
    3. Talks
    4. Links
  20. Index