Building Scalable Web Sites
Chapter 1. Introduction
Section 1.1. What Is a Web Application?
Section 1.2. How Do You Build Web Applications?
Section 1.3. What Is Architecture?
Section 1.4. How Do I Get Started?
Chapter 2. Web Application Architecture
Section 2.1. Layered Software Architecture
Section 2.2. Layered Technologies
Section 2.3. Software Interface Design
Section 2.4. Getting from A to B
Section 2.5. The Software/Hardware Divide
Section 2.6. Hardware Platforms
Section 2.7. Hardware Platform Growth
Section 2.8. Hardware Redundancy
Section 2.9. Networking
Section 2.10. Languages, Technologies, and Databases
Chapter 3. Development Environments
Section 3.1. The Three Rules
Section 3.2. Use Source Control
Section 3.3. One-Step Build
Section 3.4. Issue Tracking
Section 3.5. Scaling the Development Model
Section 3.6. Coding Standards
Section 3.7. Testing
Chapter 4. i18n, L10n, and Unicode
Section 4.1. Internationalization and Localization
Section 4.2. Unicode in a Nutshell
Section 4.3. Unicode Encodings
Section 4.4. The UTF-8 Encoding
Section 4.5. UTF-8 Web Applications
Section 4.6. Using UTF-8 with PHP
Section 4.7. Using UTF-8 with Other Languages
Section 4.8. Using UTF-8 with MySQL
Section 4.9. Using UTF-8 with Email
Section 4.10. Using UTF-8 with JavaScript
Section 4.11. Using UTF-8 with APIs
Chapter 5. Data Integrity and Security
Section 5.1. Data Integrity Policies
Section 5.2. Good, Valid, and Invalid
Section 5.3. Filtering UTF-8
Section 5.4. Filtering Control Characters
Section 5.5. Filtering HTML
Section 5.6. Cross-Site Scripting (XSS)
Section 5.7. SQL Injection Attacks
Chapter 6. Email
Section 6.1. Receiving Email
Section 6.2. Injecting Email into Your Application
Section 6.3. The MIME Format
Section 6.4. Parsing Simple MIME Emails
Section 6.5. Parsing UU Encoded Attachments
Section 6.6. TNEF Attachments
Section 6.7. Wireless Carriers Hate You
Section 6.8. Character Sets and Encodings
Section 6.9. Recognizing Your Users
Section 6.10. Unit Testing
Chapter 7. Remote Services
Section 7.1. Remote Services Club
Section 7.2. Sockets
Section 7.3. Using HTTP
Section 7.4. Remote Services Redundancy
Section 7.5. Asynchronous Systems
Section 7.6. Exchanging XML
Section 7.7. Lightweight Protocols
Chapter 8. Bottlenecks
Section 8.1. Identifying Bottlenecks
Section 8.2. External Services and Black Boxes
Chapter 9. Scaling Web Applications
Section 9.1. The Scaling Myth
Section 9.2. Scaling the Network
Section 9.3. Load Balancing
Section 9.4. Scaling MySQL
Section 9.5. MyISAM
Section 9.6. MySQL Replication
Section 9.7. Database Partitioning
Section 9.8. Scaling Large Database
Section 9.9. Scaling Storage
Chapter 10. Statistics, Monitoring, and Alerting
Section 10.1. Tracking Web Statistics
Section 10.2. Application Monitoring
Section 10.3. Alerting
Chapter 11. APIs
Section 11.1. Data Feeds
Section 11.2. Mobile Content
Section 11.3. Web Services
Section 11.4. API Transports
Section 11.5. API Abuse
Section 11.6. Authentication
Section 11.7. The Future
This book is primarily about web application design: the design of software and
hardware systems for web applications. We'll be looking at application architecture,
development practices, technologies, Unicode, and general infrastructural work.
Perhaps as importantly, this book is about the development of web applications:
the practice of building the hardware and implementing the software systems that we design.
While the theory of application design is all well and good (and an essential part of the
whole process), we need to recognize that the implementation plays a very important part
in the construction of large applications and needs to be borne in mind during the design process.
If we're designing things that we can't build, then we can't know if we're designing the right thing.
This book is not about programming. At least, not really. Rather than talking about snippets of
code, function names, and so forth, we'll be looking at generalized techniques and approaches
for building web applications. While the book does contain some snippets of example code,
they are just that: examples. Most of the code examples in this book can be used only in
the context of a larger application or infrastructure.
A lot of what we'll be looking at relates to designing application architectures
and building application infrastructures. In the field of web applications,
infrastructures tend to mean a combination of hardware platform, software platform,
and maintenance and development practices. We'll consider how all of these fit together
to build a seamless infrastructure for large-scale applications.