fix(indexer): rate-limit cg/cmc orderbook routes via lcd_heavy_router (#278) #739

Merged
Brouie merged 1 commit from qa/278-cgcmc-orderbook-lcd-heavy into main 2026-06-04 08:02:09 +00:00
Brouie commented 2026-06-04 03:10:05 +00:00 (Migrated from gitlab.com)

/cg/orderbook and /cmc/orderbook/{market_pair} run the same LCD fanout (orderbook_sim::simulate_orderbook_cached → resolve_fee_bps + build_orderbook_data) as the native limit-book endpoints, but were registered on api_router under only the general per-IP governor. This moves both into lcd_heavy_router so they inherit the stricter rate_limit_lcd_heavy_rps throttle.

Scoped to the orderbook routes per the issue triage ("Move both routes to the lcd_heavy_router"). The cg/cmc tickers/summary N+1 fanout is tracked separately in #288.

cargo check clean.

GitLab #278

`/cg/orderbook` and `/cmc/orderbook/{market_pair}` run the same LCD fanout (`orderbook_sim::simulate_orderbook_cached` → `resolve_fee_bps` + `build_orderbook_data`) as the native limit-book endpoints, but were registered on `api_router` under only the general per-IP governor. This moves both into `lcd_heavy_router` so they inherit the stricter `rate_limit_lcd_heavy_rps` throttle. Scoped to the orderbook routes per the issue triage ("Move both routes to the lcd_heavy_router"). The cg/cmc tickers/summary N+1 fanout is tracked separately in #288. cargo check clean. GitLab #278
PlasticDigits commented 2026-06-04 08:02:09 +00:00 (Migrated from gitlab.com)

mentioned in commit 03e6d7c88e

mentioned in commit 03e6d7c88e163dc79f1b29d39c84b898767eb409
PlasticDigits (Migrated from gitlab.com) merged commit 03e6d7c88e into main 2026-06-04 08:02:09 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!739
No description provided.