Skip to content

Commit

Permalink
deliverJobConcurrency: 16, deliverJobPerSec: 1024, inboxJobConcurrenc…
Browse files Browse the repository at this point in the history
…y: 4
  • Loading branch information
tamaina committed Jul 17, 2024
1 parent a0c93bb commit ffd12d0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .config/docker_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ id: 'aidx'
#clusterLimit: 1

# Job concurrency per worker
# deliverJobConcurrency: 128
# inboxJobConcurrency: 16
# deliverJobConcurrency: 16
# inboxJobConcurrency: 4

# Job rate limiter
# deliverJobPerSec: 128
Expand Down
6 changes: 3 additions & 3 deletions .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ id: 'aidx'
#clusterLimit: 1

# Job concurrency per worker
#deliverJobConcurrency: 128
#inboxJobConcurrency: 16
#deliverJobConcurrency: 16
#inboxJobConcurrency: 4
#relationshipJobConcurrency: 16
# What's relationshipJob?:
# Follow, unfollow, block and unblock(ings) while following-imports, etc. or account migrations.

# Job rate limiter
#deliverJobPerSec: 128
#deliverJobPerSec: 1024
#inboxJobPerSec: 32
#relationshipJobPerSec: 64

Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ id: 'aidx'
#clusterLimit: 1

# Job concurrency per worker
# deliverJobConcurrency: 128
# inboxJobConcurrency: 16
# deliverJobConcurrency: 16
# inboxJobConcurrency: 4

# Job rate limiter
# deliverJobPerSec: 128
# deliverJobPerSec: 1024
# inboxJobPerSec: 32

# Job attempts
Expand Down
6 changes: 3 additions & 3 deletions chart/files/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ id: "aidx"
#clusterLimit: 1

# Job concurrency per worker
# deliverJobConcurrency: 128
# inboxJobConcurrency: 16
# deliverJobConcurrency: 16
# inboxJobConcurrency: 4

# Job rate limiter
# deliverJobPerSec: 128
# deliverJobPerSec: 1024
# inboxJobPerSec: 32

# Job attempts
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/HttpRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class HttpRequestService {
localAddress: config.outgoingAddress,
});

const maxSockets = Math.max(256, config.deliverJobConcurrency ?? 128);
const maxSockets = Math.max(256, config.deliverJobConcurrency ?? 16);

this.httpAgent = config.proxy
? new HttpProxyAgent({
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/src/queue/QueueProcessorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ export class QueueProcessorService implements OnApplicationShutdown {
}, {
...baseQueueOptions(this.config, QUEUE.DELIVER),
autorun: false,
concurrency: this.config.deliverJobConcurrency ?? 128,
concurrency: this.config.deliverJobConcurrency ?? 16,
limiter: {
max: this.config.deliverJobPerSec ?? 128,
max: this.config.deliverJobPerSec ?? 1024,
duration: 1000,
},
settings: {
Expand Down Expand Up @@ -290,7 +290,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
}, {
...baseQueueOptions(this.config, QUEUE.INBOX),
autorun: false,
concurrency: this.config.inboxJobConcurrency ?? 16,
concurrency: this.config.inboxJobConcurrency ?? 4,
limiter: {
max: this.config.inboxJobPerSec ?? 32,
duration: 1000,
Expand Down

0 comments on commit ffd12d0

Please sign in to comment.