You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(platform): every REST API request writes its key holder's rate-limit row #4716
Every authenticated REST API request charges its key holder's rest:api budget in the database before it does anything else (services/platform/backend/rest/v1.ts:273-276, checkUserRateLimit(deps.sql, 'rest:api', session.user.id); limits in lib/rate-limit.ts:159). Verified on main at aa53363.
That is one rate-limit row write per request, and all requests of one integration key land on the same row, so a busy integration serializes on it and adds a write to every read it makes. At the 4% API-client share of a million-user run this is thousands of writes per second for reads.
Suggested fix
Count in memory per process (a token bucket per key holder) and reconcile with the shared row in batches, or shard the counter row; keep the database check only where an exact cross-process limit matters.
Landed on the feature line release/0.6 with feature train #5265, merged by rebase at 2026-11-01 17:57:59Z, as 757efb8perf(platform): charge rest:api from leased slices, not per request (task TALE-125). It ships with Tale 0.6.0.
GitHub closes an issue from a Closes #4716 line only for a commit on the default branch main, so the feature-train role closes it here.
Activity
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
tale-code-bot commentedon Nov 1, 2026
Landed on the feature line
release/0.6with feature train #5265, merged by rebase at 2026-11-01 17:57:59Z, as 757efb8perf(platform): charge rest:api from leased slices, not per request(task TALE-125). It ships with Tale 0.6.0.GitHub closes an issue from a
Closes #4716line only for a commit on the default branchmain, so the feature-train role closes it here.perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request
perf(platform): charge rest:api from leased slices, not per request