DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Pagination in GraphQL: Efficiently Retrieve and Manipulate Data
  • Building a Unified API Using GraphQL Joins
  • Why and When to Use GraphQL
  • Building Modern 3factor Apps in 2021 With Event-Driven Programming

Trending

  • Kubeflow: Driving Scalable and Intelligent Machine Learning Systems
  • Contextual AI Integration for Agile Product Teams
  • Optimizing Integration Workflows With Spark Structured Streaming and Cloud Services
  • Power BI Embedded Analytics — Part 2: Power BI Embedded Overview
  1. DZone
  2. Data Engineering
  3. Databases
  4. Boosting Self-Hosted GraphQL API Performance With Apollo Router and Federation

Boosting Self-Hosted GraphQL API Performance With Apollo Router and Federation

Apollo Studio and Supergraph provide a streamlined solution for companies to integrate their data, microservices, and business logic into a single connected graph.

By 
Venkata Thota user avatar
Venkata Thota
·
Apr. 14, 23 · Review
Likes (2)
Comment
Save
Tweet
Share
4.6K Views

Join the DZone community and get the full member experience.

Join For Free

The Apollo router is a software component that replaces the GraphQL Gateway and is implemented using the RUST programming language. It offers a highly configurable, loosely coupled, and high-performance routing solution for self-hosted graphs. The Apollo router enables developers to easily manage and route queries between different GraphQL services within an organization. It provides flexibility in configuration and has a low overhead, resulting in faster response times and improved performance.

In addition to the Apollo router, Apollo Federation is an open architecture that combines multiple GraphQL APIs into a single graph. It enables developers to break up a monolithic GraphQL schema into smaller, independently deployable services, which can then be combined into a single, unified graph. With Apollo Federation, developers can build scalable, modular GraphQL APIs that can be easily maintained and extended over time. The result is a more flexible and agile approach to building GraphQL APIs that can adapt to changing business needs and requirements.

The diagram below represents various components integrated with the Apollo router and explains how client and server interactions are routed through the Apollo router.

Apollo Router

Apollo Studio and Supergraph

The enterprise version of Apollo supports schema registry through Apollo Studio, a SaaS application that combines all the subgraphs into a Supergraph using Rover CLI.

Apollo GraphQL enables companies to build their "supergraph," a new layer in the tech stack that integrates a company's data, microservices, and business logic into a single connected graph. Unlike REST APIs, which require developers to create a new connection between data and client every time they need to build a new feature or product, GraphQL, and the supergraph allow developers to request the data they need from a specific business object in a declarative way. This enables them to build better apps faster, as the data is delivered to them in a more efficient and streamlined manner.

Three core principles underlie the Supergraph concept:

  • A new unified composition layer: The Supergraph connects the company's data, microservices, and digital capabilities into a new unified composition layer.
  • A modular approach: Supergraph's modular and declarative architecture allows teams to quickly integrate modular data, services, and business logic.
  • Agile approach: Bottom-up development is faster and more involved than top-down development. Each developer and team are encouraged to publish changes into the schema, and the actual use of the schema pushes development forward by keeping everyone focused on decisions and improvement.

Supergraph

Apollo Federation

Apollo Federation is responsible for composing multiple subgraphs (GraphQL services) into a supergraph. Each subgraph is a self-contained component with its own schema, which can be developed and deployed independently using the modular principle. The approach is bottom-up and flexible, as subgraphs can be written in 20 different programming languages, allowing for greater versatility and adaptability.

Apollo Router

The Apollo Router is responsible for running the Supergraph, providing a high-performance runtime solution. As a successor to Apollo Gateway, it offers significantly improved performance, with 10 times lower latency, 10 times higher throughput, and 12 times lower variance than JavaScript.

The Supergraph is produced by Apollo Studio, which enables developers to make changes quickly and safely through validation, automation, and observability. This is particularly important in the rapidly evolving Supergraph environment, where developers and teams collaborate and contribute to each other's work. By using Schema Checks and Launches, the schema can be automatically validated in development, preventing breaking changes and making past and ongoing changes more apparent.

In conclusion, Apollo Studio and Supergraph provide an efficient and streamlined solution for companies to integrate their data, microservices, and business logic into a single connected graph. The enterprise version of Apollo supports schema registry through Apollo Studio, and each subgraph can be developed and deployed independently using the modular principle. Apollo Federation is responsible for composing multiple subgraphs into a supergraph, while the Apollo Router provides a high-performance runtime solution for running the Supergraph. By using Schema Checks and Launches, developers can make changes quickly and safely, with validation, automation, and observability ensuring a smooth and collaborative environment.

API GraphQL Schema application

Opinions expressed by DZone contributors are their own.

Related

  • Pagination in GraphQL: Efficiently Retrieve and Manipulate Data
  • Building a Unified API Using GraphQL Joins
  • Why and When to Use GraphQL
  • Building Modern 3factor Apps in 2021 With Event-Driven Programming

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!