Contents

Acknowledgments

Introduction

Chapter 1 Core Concepts

What Is Scalability?

Evolution from a Single Server to a Global Audience

Single-Server Configuration

Making the Server Stronger: Scaling Vertically

Isolation of Services

Content Delivery Network: Scalability for Static Content

Distributing the Traffic: Horizontal Scalability

Scalability for a Global Audience

Overview of a Data Center Infrastructure

The Front Line

Web Application Layer

Web Services Layer

Additional Components

Data Persistence Layer

Data Center Infrastructure

Overview of the Application Architecture

Front End

Web Services

Supporting Technologies

Summary

Chapter 2 Principles of Good Software Design

Simplicity

Hide Complexity and Build Abstractions

Avoid Overengineering

Try Test-Driven Development

Learn from Models of Simplicity in Software Design

Loose Coupling

Promoting Loose Coupling

Avoiding Unnecessary Coupling

Models of Loose Coupling

Don’t Repeat Yourself (DRY)

Copy and Paste Programming

Coding to Contract

Draw Diagrams

Use Case Diagrams

Class Diagrams

Module Diagrams

Single Responsibility

Promoting Single Responsibility

Examples of Single Responsibility

Open-Closed Principle

Dependency Injection

Inversion of Control (IOC)

Designing for Scale

Adding More Clones

Functional Partitioning

Data Partitioning

Design for Self-Healing

Summary

Chapter 3 Building the Front-End Layer

Managing State

Managing HTTP Sessions

Managing Files

Managing Other Types of State

Components of the Scalable Front End

DNS

Load Balancers

Web Servers

Caching

Auto-Scaling

Deployment Examples

AWS Scenario

Private Data Center

Summary

Chapter 4 Web Services

Designing Web Services

Web Services as an Alternative Presentation Layer

API-First Approach

Pragmatic Approach

Types of Web Services

Function-Centric Services

Resource-Centric Services

Scaling REST Web Services

Keeping Service Machines Stateless

Caching Service Responses

Functional Partitioning

Summary

Chapter 5 Data Layer

Scaling with MySQL

Replication

Data Partitioning (Sharding)

Scaling with NoSQL

The Rise of Eventual Consistency

Faster Recovery to Increase Availability

Cassandra Topology

Summary

Chapter 6 Caching

Cache Hit Ratio

Caching Based on HTTP

HTTP Caching Headers

Types of HTTP Cache Technologies

Scaling HTTP Caches

Caching Application Objects

Common Types of Object Caches

Scaling Object Caches

Caching Rules of Thumb

Cache High Up the Call Stack

Reuse Cache Among Users

Where to Start Caching?

Cache Invalidation Is Difficult

Summary

Chapter 7 Asynchronous Processing

Core Concepts

Synchronous Example

Asynchronous Example

Shopping Analogy

Message Queues

Message Producers

Message Broker

Message Consumers

Messaging Protocols

Messaging Infrastructure

Benefits of Message Queues

Enabling Asynchronous Processing

Easier Scalability

Evening Out Traffic Spikes

Isolating Failures and Self-Healing

Decoupling

Message Queue–Related Challenges

No Message Ordering

Message Requeueing

Race Conditions Become More Likely

Risk of Increased Complexity

Message Queue–Related Anti-Patterns

Treating the Message Queue as a TCP Socket

Treating Message Queue as a Database

Coupling Message Producers with Consumers

Lack of Poison Message Handling

Quick Comparison of Selected Messaging Platforms

Amazon Simple Queue Service

RabbitMQ

ActiveMQ

Final Comparison Notes

Introduction to Event-Driven Architecture

Request/Response Interaction

Direct Worker Queue Interaction

Event-Based Interaction

Summary

Chapter 8 Searching for Data

Introduction to Indexing

Modeling Data

NoSQL Data Modeling

Wide Column Storage Example

Search Engines

Introduction to Search Engines

Using a Dedicated Search Engine

Summary

Chapter 9 Other Dimensions of Scalability

Scaling Productivity through Automation

Testing

Build and Deployment

Monitoring and Alerting

Log Aggregation

Scaling Yourself

Overtime Is Not a Way to Scale

Managing Yourself

Scaling Agile Teams

Adding More People

Procedures and Innovation

Culture of Alignment

Summary

Appendix References

Books

White Papers

Talks

Links

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
44.200.169.91