movio / bramble

A federated GraphQL API gateway
https://movio.github.io/bramble/
MIT License
497 stars 55 forks source link

Fetch schema updates in parallel #235

Closed Quantumplation closed 7 months ago

Quantumplation commented 7 months ago

When running bramble in a Lambda, the startup time is critical. This fetches the schema updates in parallel, which dramatically reduces the startup time.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (08b0247) 72.20% compared to head (ca2f6e8) 72.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #235 +/- ## ========================================== + Coverage 72.20% 72.30% +0.09% ========================================== Files 27 27 Lines 2781 2791 +10 ========================================== + Hits 2008 2018 +10 Misses 632 632 Partials 141 141 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pkqk commented 7 months ago

@Quantumplation one other point, depending on the number of services being federated a loop like that might have other adverse performance implications. Perhaps a limit on the number of parallel requests at a time is a good idea.

Quantumplation commented 7 months ago

Usually I rate limit at 64, and I had a hard time imagining having 64 services but I can add that no problem