Company
Date Published
Author
Lucas Leadbetter
Word count
1462
Language
English
Hacker News points
None

Summary

The Apollo Router offers three customization options for adjusting behavior: configuration options, Rhai scripting, and external coprocessing. These extensibility options are crucial for performance and serve as the entry point to a supergraph. A study was conducted to understand the performance implications of these options. The results showed that when possible, configuration options perform better than Rhai scripts, which in turn perform better than external coprocessing. External coprocessing adds around 350μs of overhead per stage, regardless of programming language or complexity. However, the choice of programming language and network proximity can significantly impact performance. It is recommended to use SubgraphRequest/Response stages judiciously, as their overhead can add up quickly. The study also highlighted the importance of considering runtime and networking setup when selecting a coprocessor.