Responsiveness is a system’s ability to handle requests within an acceptably short time, even as load rises or unexpected errors occur. It is a system-level property alongside scalability, fault tolerance, and high availability. section 1.1 section 1.1.1
BEAM systems protect responsiveness through several implementation choices:
- Preemptive schedulers give each process a small execution window, preventing one long-running process from blocking the system. section 1.1.2
- Separate I/O threads or kernel polling prevent processes waiting on I/O from stopping other processes. section 1.1.2
- Per-process garbage collection avoids system-wide pauses and can run concurrently with ordinary processing on other cores. section 1.1.2
- Concurrency lets the system serve multiple requests concurrently and degrade more gracefully under overload. section 12.2.6
A highly concurrent service
A distributed to-do system uses BEAM processes to handle requests concurrently. Frequent preemption keeps lengthy tasks from blocking the whole service, while isolated garbage collection supports fairly constant latency. Adding machines or nodes provides further capacity as demand grows. section 12.2.6
Use the virtual-machine diagram to visualize how schedulers interleave Erlang processes. section 1.1.2
