Back-end Performance

Book description

Performance simply matters. Technology may allow us to "go bigger", but maybe not necessarily be better when it comes to performance. Now is the time to utilize the amazing tools that are available for making websites faster, and to learn how to improve user experience and satisfaction.

This is a practical collection of tutorials on back-end website performance for web developers. It's packed with useful, real world hints and tips that you can use on your sites today. It contains:

  • How to Optimize MySQL: Indexes, Slow Queries, Configuration by Bruno Skvorc
  • How to Read Big Files with PHP (Without Killing Your Server) by Chris Pitt
  • WordPress Optimization by Tonino Jankov
  • HTTP/2: Background, Performance Benefits and Implementations by Tonino Jankov
  • Apache vs Nginx Performance: Optimization Techniques by Tonino Jankov
  • An In-depth Walkthrough of Supercharging Apps with Blackfire by Reza Lavaryan
  • How to Boost Your Server Performance with Varnish by Tonino Jankov
  • How to Process Server Logs by Daniel Berman


This book is for all back-end developers who wish to build sites and apps that are more performant. You'll need to be familiar with server-side development in order to follow the discussion.

Publisher resources

View/Submit Errata

Table of contents

  1. Back-End Performance
  2. Notice of Rights
  3. Notice of Liability
  4. Trademark Notice
  5. About SitePoint
  6. Preface
    1. Who Should Read This Book?
    2. Conventions Used
      1. Code Samples
      2. Tips, Notes, and Warnings
  7. Chapter 1: How to Optimize MySQL: Indexes, Slow Queries, Configuration
    1. by Bruno Škvorc
    2. Configuration Optimization
      1. Editing Configuration
      2. Manual Tweaks
      3. Variable Inspector
      4. MySQL Tuner
    3. Indexes
      1. Unique / Primary Indexes
      2. Regular Indexes
      3. Fulltext Indexes
      4. Descending Indexes
      5. Helper Tools: Explain
      6. Helper Tools: Percona for Duplicate Indexes
      7. Helper Tools: Percona for Unused Indexes
    4. Bottlenecks
    5. Conclusion
  8. Chapter 2: How to Read Big Files with PHP (Without Killing Your Server)
    1. by Chris Pitt
    2. Measuring Success
    3. What Are Our Options?
    4. Reading Files, Line By Line
    5. Piping Between Files
      1. Other Streams
    6. Filters
    7. Customizing Streams
    8. Making Custom Protocols and Filters
    9. Summary
  9. Chapter 3: WordPress Optimization
    1. by Tonino Jankov
    2. Choice of Hosting
    3. Software Considerations
      1. Data model
      2. Meta queries can be expensive
      3. Database hygiene
    4. Caching
      1. Page Caching
      2. Fragment caching
      3. Object cache
      4. Browser caching
    5. Static Files
    6. Other random tips
    7. Conclusion
  10. Chapter 4: HTTP/2: Background, Performance Benefits and Implementations
    1. by Tonino Jankov
    2. HTTP/1
    3. SPDY
    4. How to See If a Website Is Serving Resources over HTTP/2
    5. Implementations
      1. Servers
    6. Conclusion
  11. Chapter 5: Apache vs Nginx Performance: Optimization Techniques
    1. by Tonino Jankov
    2. Hardware Considerations
    3. Monitoring
    4. Testing the System
    5. Tuning Apache
      1. Apache's mpm modules
      2. Other tips for tuning Apache:
    6. Nginx
      1. Nginx settings
      2. Caching with Nginx
    7. Conclusion
  12. Chapter 6: An In-depth Walkthrough of Supercharging Apps with Blackfire
    1. by Reza Lavaryan
    2. Getting Started
    3. Building Blocks of Blackfire
    4. Some Terms to Know before We Start
    5. Profiling a Script
      1. Generating Dummy Data
      2. Setting up the MySQL Database
      3. Writing the Main Script
      4. Running the First Profile
      5. Analyzing the Profile Information
      6. Optimizing the Existing Code
    6. Using the Command Line Interface
      1. Profiling HTTP Requests
      2. Profiling CLI Scripts
    7. Performance Tests
    8. Wrapping Up
  13. Chapter 7: How to Boost Your Server Performance with Varnish
    1. by Tonino Jankov
    2. How It Works
    3. Varnish Features
    4. Installing Varnish
    5. Simplicity of Setup
      1. Setting up Varnish with NodeJS
    6. Other Tips
    7. Conclusion
  14. Chapter 8: How to Process Server Logs
    1. by Daniel Berman
    2. Installing Java
    3. Installing ELK
      1. Installing Elasticsearch
      2. Installing Logstash
      3. Installing Kibana
    4. Shipping Logs
    5. Analyzing Logs
      1. Searching
      2. Visualizing
    6. Conclusion

Product information

  • Title: Back-end Performance
  • Author(s): Bruno Skvorc, Christopher Pitt, Tonino Jankov, Reza Lavaryan, Daniel Berman
  • Release date: August 2018
  • Publisher(s): SitePoint
  • ISBN: 9781925836110