Update scaling documentation to adapt to the new "scheduler" sidekiq queue (#875)

* Add scheduler sidekiq queues as the code updates

* 更新sidekiq队列以适应文档

* Update scaling.md

* Update scaling.md
This commit is contained in:
HolgerHuo 2021-05-05 20:16:45 +08:00 committed by GitHub
parent dfeb299d4d
commit 22ae9cabc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -63,6 +63,7 @@ Sidekiq uses different queues for tasks of varying importance, where importance
| `push` | Delivery of payloads to other servers |
| `mailers` | Delivery of e-mails |
| `pull` | Fetching information from other servers |
| `scheduler` | Doing cron jobs like refreshing trending hashtags and cleaning up logs |
The default queues and their priorities are stored in `config/sidekiq.yml`, but can be overridden by the command-line invocation of Sidekiq, e.g.:
@ -76,6 +77,9 @@ The way Sidekiq works with queues, it first checks for tasks from the first queu
As a solution, it is possible to start different Sidekiq processes for the queues to ensure truly parallel execution, by e.g. creating multiple systemd services for Sidekiq with different arguments.
**Make sure you only have one `scheduler` queue running!!**
## Transaction pooling with pgBouncer {#pgbouncer}
### Why you might need PgBouncer {#pgbouncer-why}

View File

@ -63,6 +63,7 @@ Sidekiq根据任务的重要性使用不同队列这里的重要性是指如
| `push` | 推送消息至其它服务器 |
| `mailers` | 分发电子邮件 |
| `pull` | 从其它服务器拉取信息 |
| `scheduler` | 完成计划任务,例如更新当下流行标签及清理日志 |
默认队列及其优先级存储于`config/sidekiq.yml`但可通过调用Sidekiq命令行覆盖例如
@ -76,6 +77,9 @@ Sidekiq处理队列的方式是它首先检查第一个队列中的任务
作为一种解决方案可以启动为不同队列启动不同的Sidekiq进程以确保真正的并列执行例如使用不同Sidekiq参数创建多个systemd服务。
**请确保仅有一个`scheduler`队列!!**
## 使用pgBouncer事务池 {#pgbouncer}
### 你为什么要用PgBouncer {#pgbouncer-why}