0%

Book Description

Whether you want to fine-tune operational control or conduct A/B/n tests, feature flags make it easy to deliver software features quickly and safely. With this practical book, software engineers will learn eight best practices for using feature flags in production, including how to configure and manage a growing set of feature flags within your product, maintain them over time, manage infrastructure migrations, and more.

Pete Hodgson and Patricio Echagüe demonstrate how feature flags help modern product delivery teams reduce risk by decoupling code deployment from feature release. You’ll learn how to maintain flag consistency in different scenarios and how to develop, test, and work with feature flags at scale.

With these practices, you will:

  • Make sure users in a test still have access once a feature is ramped up
  • Learn flag strategies for transitioning users from "anonymous" to "logged in"
  • Keep flagging decisions on the server to maintain performance and security
  • Use patterns to make incremental, backward-compatible database changes
  • Implement flagging decisions as close to business logic as possible
  • Have each flag owned by one team responsible for rollout and monitoring
  • Consider testability when using feature flags in combination with CI practices
  • Maintain a process for identifying and tracking flags
  • Examine the effect a feature flag is having on your business

Table of Contents

  1. 1. Introduction
  2. 2. The Moving Parts of a Feature-Flagging System
    1. Creating Separate Code Paths
  3. 3. Best Practice #1: Maintain Flag Consistency
  4. 4. Best Practice #2: Bridge the “Anonymous” to “Logged-In” Transition
  5. 5. Best Practice #3: Make Flagging Decisions on the Server
    1. Performance
    2. Configuration Lag
    3. Security
    4. Implementation Complexity
  6. 6. Best Practice #4: Incremental, Backward-Compatible Database Changes
    1. Code First
    2. Data First
    3. Big Bang
    4. Expand-Contract Migrations
    5. Duplicate Writes and Dark Reads
    6. Working with Databases in a Feature-Flagged World
  7. 7. Best Practice #5: Implement Flagging Decisions Close to Business Logic
    1. A Rule of Thumb for Placing Flagging Decisions
  8. 8. Best Practice #6: Scope Each Flag to a Single Team
  9. 9. Best Practice #7: Consider Testability
  10. 10. Best Practice #8: Have a Plan for Working with Flags at Scale
    1. Naming Your Flags
    2. Managing Your Flags
      1. Establishing a Retirement Plan
      2. Finding Zombie Flags
      3. Ownership and Change Control
      4. Flagging Metadata
  11. 11. Best Practice #9: Build a Feedback Loop
    1. Correlating Changes with Effects
      1. Inference
      2. Causality
    2. Categories of Feedback
  12. 12. Summary
18.221.165.246