Efficient Data Fetching Strategies Using Federated GraphQL in Distributed Frontend Systems.

Authors

  • Ashok Kumar Author

Keywords:

federated GraphQL, distributed frontend systems, micro-frontends, data fetching, microservices architecture

Abstract

Federated GraphQL is now a promising data orchestration model in distributed frontend systems, especially when micro-frontends are data consumers of multiple, independently deployed backend services. This paper will look at the performance of data-fetching when a distributed frontend is using federated GraphQL, as opposed to endpoint-based aggregation. A managed benchmark setup was adopted in the area of three exemplary user journeys: dashboard composition, product-detail rendering and cart-summary retrieval. Three strategies were considered, which included a REST baseline, simple federated GraphQL, and federated GraphQL with request batching and entity-level caching. The end-to-end latency, p95 latency, and data transferred by responses as well as the service-call volume and hits in the cache were measured on 2,700 traced requests. The results indicate that basic federation effectively minimizes the size of the payload but is not associated with decrease in latency of shallow workflows. Adding batching and caching causes federated GraphQL to achieve the best overall result, weighted mean latency of -9.96, p95 latency of -7.88, transferred data of -63.60 and service calls of -62.64 compared to the REST baseline. The data shows federated GraphQL works best in distributed frontends with field-level selectivity and strategies to restrict resolver fan-out between services.

Downloads

Published

10-03-2024

How to Cite

Efficient Data Fetching Strategies Using Federated GraphQL in Distributed Frontend Systems . (2024). AI Tech International Journal, ISSN: 3079-4749, 2(1), 52-58. https://techaijournal.com/index.php/AIjournal/article/view/38

Similar Articles

11-20 of 22

You may also start an advanced similarity search for this article.