Architecture
SHAR server uses NATS Message Pull combined with a Stateless Decoupled Monolith pattern to achieve linear scaling.
Each instance pulls a number of concurrent messages from NATS, performs tasks based on the messages and sends messages back to NATS for further processing.
The advantages of this are:
- SHAR server instances are unaware of their participation in a cluster.
- No configuration is needed to cluster SHAR servers.
- The topology is driven from NATS configuration.
- Any instance can handle any message.
- Failed processing is retried automatically.
- Servers only pull as many messages as they can handle.
- Removing or adding servers provides immediate performance alterations.
SHAR is split into 3 components: