Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add architectural diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jul 29, 2020
1 parent 09aebbc commit 49e804b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Redis, which relays replication commands between processes. This can give a
significant cpu saving on the main process and will be a prerequisite for
upcoming performance improvements.

(See the [Architectural diagram](#architectural-diagram) section at the end for
a visualisation of what this looks like)


## Setting up workers

Expand Down Expand Up @@ -393,3 +396,40 @@ are ones that do specific processing unrelated to requests, e.g. the `pusher`
that handles sending out push notifications for new events. The intention is for
all these to be folded into the `generic_worker` app and to use config to define
which processes handle the various proccessing such as push notifications.


## Architectural diagram

The following shows an example setup using Redis and a reverse proxy:

```
Clients & Federation
|
v
+-----------+
| |
| Reverse |
| Proxy |
| |
+-----------+
| | |
| | | HTTP requests
+-------------------+ | +-----------+
| +---+ |
| | |
v v v
+--------------+ +--------------+ +--------------+ +--------------+
| Main | | Generic | | Generic | | Event |
| Process | | Worker 1 | | Worker 2 | | Persister |
+--------------+ +--------------+ +--------------+ +--------------+
^ ^ | ^ | | ^ | ^ ^
| | | | | | | | | |
| | | | | HTTP | | | | |
| +----------+<--|---|---------+ | | | |
| | +-------------|-->+----------+ |
| | | |
| | | |
v v v v
====================================================================
Redis pub/sub channel
```

0 comments on commit 49e804b

Please sign in to comment.