-
-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0148328
commit 09f7585
Showing
3 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Clustering | ||
|
||
Oban supports running in clusters of nodes. It supports both nodes that are connected to each | ||
other (via *distributed Erlang*), as well as nodes that are not connected to each other but that | ||
communicate via the database's pub/sub mechanism. | ||
|
||
Usually, scheduled job management operates in **global mode** and notifies queues of available | ||
jobs via pub/sub to minimize database load. However, when pub/sub isn't available, staging | ||
switches to a **local mode** where each queue polls independently. | ||
|
||
Local mode is less efficient and will only happen if you're running in an environment where | ||
neither PostgreSQL nor PG notifications work. That situation should be rare and limited to the | ||
following conditions: | ||
|
||
1. Running with a connection pooler, like [pg_bouncer], in transaction mode. | ||
2. Running without clustering, that is, without *distributed Erlang*. | ||
|
||
If **both** of those criteria apply and pub/sub notifications won't work, then | ||
staging will switch to polling in local mode. | ||
|
||
[pg_bouncer]: http://www.pgbouncer.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters