Chapter 10. Sharing state

This chapter covers

  • Overcoming single-process bottlenecks
  • Using ETS tables

From chapter 5 on, we’ve relied on processes to maintain state. Managing a state is one of the most important reasons to reach for processes. But when this state must be used by many processes, then the single server process (the one that manages the state) may become a bottleneck. Whenever a single process must serve many clients, those clients effectively become serialized while accessing that single process. This happens because a process can handle only one client at a time. Such behavior can have some negative consequences on the system performance and scalability. To resolve this situation, we have a facility called Erlang Term Storage ...

Get Elixir in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.