How long does it take for your website to load? Web performance is just as critical for small and medium-sized websites as it is for massive websites that receive tons of hits. Before you pour money and time into rewriting your code or replacing your infrastructure, first consider a reverse-caching proxy server like Varnish. With this practical book, you’ll learn how Varnish can give your website or API an immediate performance boost.
Table of Contents
- 1. What Is Varnish Cache?
- 2. Go, Go, Go and Get Started!
3. Varnish Speaks HTTP
- Conditional Requests
- Cache Variations
- Varnish Built-In VCL Behavior
4. The Varnish Configuration Language
- Hooks and Subroutines
- Return Statements
- The execution flow
- VCL Syntax
- Backends and Health Probes
- Access Control Lists
- VCL Variables
- Varnish’s Built-In VCL
- A Real-World VCL File
- 5. Invalidating the Cache
- 6. Dealing with Backends
7. Improving Your Hit Rate
- Common Mistakes
- Do You Really Want to Cache Static Assets?
- URL Blacklists and Whitelists
- Decide What Gets Cached with Cache-Control Headers
- There Will Always Be Cookies
- Hit/Miss Marker
- Caching Blocks
- An All-in-One Code Example
- 8. Logging, Measuring, and Debugging
- 9. What Does This Mean for Your Business?
- 10. Taking It to the Next Level
- Title: Getting Started with Varnish Cache
- Release date: March 2017
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491972229