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

Commit 49e804b

Browse files
committed
Add architectural diagram
1 parent 09aebbc commit 49e804b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/workers.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Redis, which relays replication commands between processes. This can give a
3535
significant cpu saving on the main process and will be a prerequisite for
3636
upcoming performance improvements.
3737

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

3942
## Setting up workers
4043

@@ -393,3 +396,40 @@ are ones that do specific processing unrelated to requests, e.g. the `pusher`
393396
that handles sending out push notifications for new events. The intention is for
394397
all these to be folded into the `generic_worker` app and to use config to define
395398
which processes handle the various proccessing such as push notifications.
399+
400+
401+
## Architectural diagram
402+
403+
The following shows an example setup using Redis and a reverse proxy:
404+
405+
```
406+
Clients & Federation
407+
|
408+
v
409+
+-----------+
410+
| |
411+
| Reverse |
412+
| Proxy |
413+
| |
414+
+-----------+
415+
| | |
416+
| | | HTTP requests
417+
+-------------------+ | +-----------+
418+
| +---+ |
419+
| | |
420+
v v v
421+
+--------------+ +--------------+ +--------------+ +--------------+
422+
| Main | | Generic | | Generic | | Event |
423+
| Process | | Worker 1 | | Worker 2 | | Persister |
424+
+--------------+ +--------------+ +--------------+ +--------------+
425+
^ ^ | ^ | | ^ | ^ ^
426+
| | | | | | | | | |
427+
| | | | | HTTP | | | | |
428+
| +----------+<--|---|---------+ | | | |
429+
| | +-------------|-->+----------+ |
430+
| | | |
431+
| | | |
432+
v v v v
433+
====================================================================
434+
Redis pub/sub channel
435+
```

0 commit comments

Comments
 (0)