Stuff Goes Bad: Erlang in Anger
Free

Stuff Goes Bad: Erlang in Anger

By Fred Hébert
Free
Book Description

This book intends to be a little guide about how to be the Erlang medic in a time of war. It is first and foremost a collection of tips and tricks to help understand where failures come from, and a dictionary of different code snippets and practices that helped developers debug production systems that were built in Erlang.

Table of Contents
  • Introduction
  • I Writing Applications
    • How to Dive into a Code Base
      • Raw Erlang
      • OTP Applications
        • Library Applications
        • Regular Applications
        • Dependencies
      • OTP Releases
      • Exercises
    • Building Open Source Erlang Software
      • Project Structure
        • OTP Applications
        • OTP Releases
      • Supervisors and start_link Semantics
        • It's About the Guarantees
        • Side Effects
        • Example: Initializing without guaranteeing connections
        • In a nutshell
        • Application Strategies
      • Exercises
    • Planning for Overload
      • Common Overload Sources
        • error_logger Explodes
        • Locks and Blocking Operations
        • Unexpected Messages
      • Restricting Input
        • How Long Should a Time Out Be
        • Asking For Permission
        • What Users See
      • Discarding Data
        • Random Drop
        • Queue Buffers
        • Stack Buffers
        • Time-Sensitive Buffers
        • Dealing With Constant Overload
        • How Do You Drop
      • Exercises
  • II Diagnosing Applications
    • Connecting to Remote Nodes
      • Job Control Mode
      • Remsh
      • SSH Daemon
      • Named Pipes
      • Exercises
    • Runtime Metrics
      • Global View
        • Memory
        • CPU
        • Processes
        • Ports
      • Digging In
        • Processes
        • OTP Processes
        • Ports
      • Exercises
    • Reading Crash Dumps
      • General View
      • Full Mailboxes
      • Too Many (or too few) Processes
      • Too Many Ports
      • Can't Allocate Memory
      • Exercises
    • Memory Leaks
      • Common Sources of Leaks
        • Atom
        • Binary
        • Code
        • ETS
        • Processes
        • Nothing in Particular
      • Binaries
        • Detecting Leaks
        • Fixing Leaks
      • Memory Fragmentation
        • Finding Fragmentation
        • Erlang's Memory Model
        • Fixing Memory Fragmentation with a Different Allocation Strategy
      • Exercises
    • CPU and Scheduler Hogs
      • Profiling and Reduction Counts
      • System Monitors
        • Suspended Ports
      • Exercises
    • Tracing
      • Tracing Principles
      • Tracing with Recon
      • Example Sessions
      • Exercises
  • Conclusion
    You May Also Like
    Erlang Handbook
    Free
    Erlang Handbook
    By Bjarne Däcker
    Pro Git (2nd Edition)
    Free
    Pro Git (2nd Edition)
    By Scott Chacon
    I Love Ruby
    Free
    I Love Ruby
    By Karthikeyan A K
    JavaScript Allongé
    Free
    JavaScript Allongé
    By Reginald Braithwaite
    What is Code?
    Free
    What is Code?
    By Paul Ford
    A Byte of Vim
    Free
    A Byte of Vim
    By Swaroop C H
    Pro Git
    Free
    Pro Git
    By Scott Chacon
    Also Available On
    Categories
    Curated Lists