Skip to content

feat(github-app): allow several github apps to be used#5038

Open
thomasnemer wants to merge 1 commit intogithub-aws-runners:mainfrom
doctolib-lab:use-multiple-gh-apps
Open

feat(github-app): allow several github apps to be used#5038
thomasnemer wants to merge 1 commit intogithub-aws-runners:mainfrom
doctolib-lab:use-multiple-gh-apps

Conversation

@thomasnemer
Copy link

Summary

  • Add support for configuring additional GitHub Apps to distribute API calls across multiple rate limit buckets, making the module scalable for large enterprise deployments
  • New additional_github_apps variable (optional, no breaking changes) accepts a list of extra apps with id, key_base64, and optionally installation_id (all support direct values or SSM references)
  • Lambda functions randomly select an app per authentication flow and thread the selection through the entire JWT → installation token → API call chain for consistency
  • Installation ID resolution is optimized: primary app reuses the webhook payload, additional apps use a pre-configured installation_id when provided, falling back to an API lookup only when needed

Context

At enterprise scale with many runner configurations, all Lambda functions (scale-up, scale-down, pool, job-retry) share a single GitHub App's rate limit bucket (15,000 req/hour on GitHub Enterprise Cloud). This ceiling cannot be raised per-app — the only way to scale is to spread load across multiple apps. This change makes the effective limit N × 15,000 req/hour, without introducing breaking changes.

Closes #5037

@thomasnemer thomasnemer marked this pull request as ready for review February 18, 2026 15:46
@thomasnemer thomasnemer requested review from a team as code owners February 18, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for multiple GitHub Apps to overcome API rate limits at scale

1 participant