Skip to content

Commit c7d177b

Browse files
authored
fix: increase concurrency for deals & retrievals (#236)
1 parent df0fec9 commit c7d177b

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

apps/backend/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ Control when and how often automated jobs run:
113113
| Variable | Description | Recommended |
114114
| -------------------------------- | --------------------------------- | ----------------- |
115115
| `DEAL_INTERVAL_SECONDS` | How often to create new deals | `1800` (30 min) |
116-
| `DEAL_MAX_CONCURRENCY` | Max parallel deal creations | `6` |
116+
| `DEAL_MAX_CONCURRENCY` | Max parallel deal creations | `10` |
117117
| `RETRIEVAL_INTERVAL_SECONDS` | How often to test retrievals | `3600` (60 min) |
118-
| `RETRIEVAL_MAX_CONCURRENCY` | Max parallel retrieval tests | `5` |
118+
| `RETRIEVAL_MAX_CONCURRENCY` | Max parallel retrieval tests | `10` |
119119
| `DEAL_START_OFFSET_SECONDS` | Delay before first deal creation | `0` |
120120
| `RETRIEVAL_START_OFFSET_SECONDS` | Delay before first retrieval test | `300` (5 min) |
121121
| `METRICS_START_OFFSET_SECONDS` | Delay before first metrics job | `600` (10 min) |

apps/backend/src/config/app.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export const configValidationSchema = Joi.object({
3333

3434
// Scheduling
3535
DEAL_INTERVAL_SECONDS: Joi.number().default(30),
36-
DEAL_MAX_CONCURRENCY: Joi.number().integer().min(1).default(6),
37-
RETRIEVAL_MAX_CONCURRENCY: Joi.number().integer().min(1).default(5),
36+
DEAL_MAX_CONCURRENCY: Joi.number().integer().min(1).default(10),
37+
RETRIEVAL_MAX_CONCURRENCY: Joi.number().integer().min(1).default(10),
3838
RETRIEVAL_INTERVAL_SECONDS: Joi.number()
3939
.min(1)
4040
.default(60)
@@ -311,8 +311,8 @@ export function loadConfig(): IConfig {
311311
},
312312
scheduling: {
313313
dealIntervalSeconds: Number.parseInt(process.env.DEAL_INTERVAL_SECONDS || "30", 10),
314-
dealMaxConcurrency: Number.parseInt(process.env.DEAL_MAX_CONCURRENCY || "6", 10),
315-
retrievalMaxConcurrency: Number.parseInt(process.env.RETRIEVAL_MAX_CONCURRENCY || "5", 10),
314+
dealMaxConcurrency: Number.parseInt(process.env.DEAL_MAX_CONCURRENCY || "10", 10),
315+
retrievalMaxConcurrency: Number.parseInt(process.env.RETRIEVAL_MAX_CONCURRENCY || "10", 10),
316316
retrievalIntervalSeconds: Number.parseInt(process.env.RETRIEVAL_INTERVAL_SECONDS || "60", 10),
317317
dealStartOffsetSeconds: Number.parseInt(process.env.DEAL_START_OFFSET_SECONDS || "0", 10),
318318
retrievalStartOffsetSeconds: Number.parseInt(process.env.RETRIEVAL_START_OFFSET_SECONDS || "600", 10),

docs/environment-variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ DEAL_INTERVAL_SECONDS=3600
400400

401401
- **Type**: `number`
402402
- **Required**: No
403-
- **Default**: `6`
403+
- **Default**: `10`
404404
- **Minimum**: `1`
405405

406406
**Role**: Controls deal-job concurrency. When `DEALBOT_JOBS_MODE=cron`, this is the maximum number of providers processed in parallel per batch; batches run sequentially. When `DEALBOT_JOBS_MODE=pgboss`, this sets the pg-boss `teamSize` for `deal.run` workers.
@@ -413,7 +413,7 @@ DEAL_INTERVAL_SECONDS=3600
413413
**Example**:
414414

415415
```bash
416-
DEAL_MAX_CONCURRENCY=4
416+
DEAL_MAX_CONCURRENCY=10
417417
```
418418

419419
**Sizing note**: A rough estimate for required concurrency is
@@ -426,7 +426,7 @@ Use p95 duration for a more conservative default.
426426

427427
- **Type**: `number`
428428
- **Required**: No
429-
- **Default**: `5`
429+
- **Default**: `10`
430430
- **Minimum**: `1`
431431

432432
**Role**: Maximum number of retrieval tests executed in parallel when running pg-boss workers.
@@ -439,7 +439,7 @@ Use p95 duration for a more conservative default.
439439
**Example**:
440440

441441
```bash
442-
RETRIEVAL_MAX_CONCURRENCY=5
442+
RETRIEVAL_MAX_CONCURRENCY=10
443443
```
444444

445445
**Sizing note**: A rough estimate for required concurrency is

0 commit comments

Comments
 (0)