1. What is the Actor Model?#
The Actor model is a conceptual model for concurrent computing that originated in 1973. In the Actor model, the Actor is the basic unit of computation, and everything is considered an Actor.
Basic operations of an Actor:
- Create another Actor
- Send messages
- Specify how to handle the next message
Actors can maintain their own state and decide how to process the next message based on their current state.
Example: An Actor maintains the total account balance. When receiving a new transaction message, it updates the balance in its state. For the next message, the Actor’s state will have changed.
- Actors are very lightweight and can be easily created in thousands or even millions because they require fewer resources than threads.
- Actors are isolated from each other and do not share memory. Each has its own state, but the only way to change state is by receiving messages.
- Each Actor has its own mailbox, similar to a message queue. Messages are stored in the mailbox, and Actors process messages in FIFO (First-In-First-Out) order.
- Actors can only communicate through messages. Messages are simple immutable data structures that can be easily transmitted over a network.
- An Actor can only process one message at a time. Actors are decoupled and work asynchronously without waiting for responses from other Actors.
- Actors have multiple addresses. They can only send messages to Actors with known addresses, which include their own address, addresses of child Actors, addresses of sender Actors from received messages, and addresses of other instances of the same Actor type.
An Actor can have multiple addresses (instances). Addresses are not equivalent to an Actor’s unique identity.
- Actors can run locally or remotely (on other machines). Since the Actor model communicates through addresses, local or remote calls are completely transparent to the system.
2. Fault Tolerance Mechanism#
In the Actor model, Actors can supervise their child Actors, including liveness detection, restarting, and redirection after message failure, achieving self-healing capabilities.

3. Pros and Cons Summary#
Pros#
- Easy to scale
- Strong fault tolerance capabilities
- Supports distributed deployment
- Effectively avoids traditional concurrency issues
Cons#
- Risk of deadlocks
- Message queues may overflow
The Actor model is a conceptual model, and its specific performance and characteristics depend on the specific implementation framework. Currently, well-known implementation frameworks include Akka and Elixir.
Article content source: https://www.youtube.com/watch?v=ELwEdb_pD0k
