Best Practices

Stability vs. Productivity

  • Goal: Balance system stability with developer productivity.

  • Exploratory coding: Temporary code for problem exploration; not meant for production.

  • Production systems: Prioritize stability, but reliable processes should also enhance productivity.

    • Faster bug detection and fixes in reliable systems.

    • Focus on system performance and functionality.


Boring = Good

  • In software, "boring" systems are predictable and stable.

  • Essential complexity: Unavoidable complexity inherent to a problem.

  • Accidental complexity: Extra complexity introduced by poor design choices (e.g., Java's garbage collection in a web server).

  • SRE's job: Minimize accidental complexity.


Eliminate Dead Code

  • Unused code = Liability

    • Creates confusion and increases the risk of bugs.

    • Negative lines of code: Removing unnecessary code can be more valuable than adding features.

    • Smaller codebase = Easier to maintain and understand.


Minimal APIs

  • Fewer methods and arguments = Easier to use and maintain.

  • Simplicity in API design improves focus on core functionality.

  • Antoine de Saint-Exupery quote: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away."


Modularity

  • Loose coupling = Flexibility and scalability.

    • Independent updates to system components minimize disruption.

    • Apply to distributed systems and APIs.

  • Versioning APIs allows for smooth upgrades without breaking dependencies.

  • Modular systems help manage growing complexity.


Simple Releases

  • Releases should be incremental—small batches, not big ones.

    • Easier to test and troubleshoot.

    • If many changes are released together, it’s harder to track down the cause of any issues.

  • Incremental releases = more control, faster progress.


Key Points to Remember

  • Simplicity = Reliability: Keeping things simple helps ensure systems are more reliable.

  • Boring is good: Predictable, stable systems are the goal.

  • Focus on clarity: Eliminate unnecessary code and complexity.

  • Minimalism in design: Smaller APIs and modular systems are easier to maintain and scale.

Last updated