Scaling the Platform Beyond the Federation Layer

Netflix’s Studio Edge GraphQL platform needed more than a distributed schema to succeed. The federation architecture described in the first post solved the split of ownership across the schema, but running it at scale required investing in the surrounding infrastructure, developer workflows, and operational visibility. These are the patterns and lessons from that rollout, from self-service onboarding to schema governance and observability.

The platform’s launch opened in April 2020, and adoption quickly grew beyond the initial teams. Hundreds of engineers now contribute directly to the API on a daily basis. The original Studio API monolith has had its fields migrated to individually owned Domain Graph Services (DGSs) without breaking consumers, with deprecation of the monolith targeted for the same year. Organizational alignment was the hardest part, requiring significant effort to address skepticism and incorporate feedback into the architecture. Prototyping and early partnership with critical voices ultimately helped close gaps and build confidence.

Core Infrastructure Investments

The GraphQL Gateway builds on Apollo’s reference implementation using Kotlin, which retains access to the Java ecosystem at Netflix while adding coroutines for parallel fetching and null-safe type handling. The in-house schema registry also uses Kotlin and stores schema versions via an internal event sourcing library on top of Cassandra. This design enabled features like a Schema History view and integration with CI/CD systems such as Spinnaker for automated cloud networking setup.

Developer Enablement

Every DGS team now needs GraphQL expertise, no longer constrained to just the API team. The Developer Experience group built the “DGS Framework” on GraphQL Java and Spring Boot to handle cross-cutting production concerns, reducing friction for resolver development. Tooling for schema submission and a self-service UI for browsing DGS schemas complement the framework, which is planned for open source in early 2021. Beyond tooling, developer education covered GraphQL concepts like batching, lookahead, and federation entity resolvers. Netflix partnered with its DevEx team for documentation and tutorials, and fosters internal community discussions on pagination, error handling, and naming conventions.

Schema Governance and Design

The richness of studio data drove early recognition that schema management would need active attention. A Studio Data Architect aligned the graph model with domain needs rather than the underlying database. Adopting a collaborative schema design process prevented UI teams from building their own BFF layers; instead, they help shape schemas to fit their use cases. Reviews occur through a working group and a managed technical program for onboarding, with added rigor applied to core federated types. While this adds process overhead, prioritizing graph model quality is expected to reduce future rework.

Schema evolution uses GraphQL’s deprecation feature combined with per-field usage tracking. When statistics show a deprecated field is no longer used, removal as a breaking change is justified. This schema-first discipline comes at the cost of decoupling from existing Protobuf and gRPC models; generic mapping code between GraphQL resolvers and gRPC calls adds boilerplate but provides flexibility for the API to evolve independent of service contracts.

Governance operates on the principle of “context over control” from Netflix’s culture. Product teams receive guidance and context rather than central dictation to apply their domain knowledge, with ongoing monitoring and tooling development to support schema health as the platform matures.

Observability Approach

Manual analysis in the previous API team model didn’t scale. The new infrastructure focuses on three capabilities: alerting for immediate issues, discovery to identify what’s failing, and diagnosis for detailed debugging. Metrics like MTTR and SLO/SLI guide these efforts.

Telemetry team collaboration integrated the Gateway and DGS with Zipkin for tracing, internal tools Edgar and TellTale for observability, and Atlas for metrics. Since GraphQL responses frequently return HTTP 200 with errors in the error block, the platform extracts custom error codes from responses and emits them to Atlas, providing consumption and development insight.

Distributed log correlation surfaces application-level logging across all services involved in a request, helping debug complex server issues by examining the surrounding system activity. Deep links from graph types and fields to owning team support channels provide a routing shortcut, resolving the issue of knowing whom to contact and reducing the gateway team’s involvement in resolving incidents. This observability base has been instrumental in maintaining support for the high frequency of daily contributions.

Security in a Federated Architecture

Across the federated graph, Netflix aims for consistent, robust security practices. To get there, the Studio Edge team worked with Netflix security experts to build security directly into the graph, covering both authentication (AuthN) and authorization (AuthZ).

Every Studio product experience requires an authenticated account, so the GraphQL Gateway only accepts traffic from trusted, authenticated callers. GraphQL introspection is similarly locked down to Netflix internal developers.

Authorization previously varied widely from team to team. Some teams enforced it in their BFFs, some in microservices, and some in both—which meant the same piece of data could have a different authorization story depending on which UI requested it. Frontend teams also found themselves repeatedly re-implementing authorization checks with every new client.

Studio Edge moves that responsibility to the DGS owners. The result is that the same user sees consistent authorization across different applications, while Product Managers, engineers, and the security team can get a clear, high-level view of who can access each data type and how.

Netflix offers several authorization systems internally, ranging from simple identity-based access to more granular role-and-capability-based systems. DGS developers pick the solution that fits and annotate their resolvers with the Spring Security @Secured annotation, configuring it to use the chosen system. When needed, more complex logic can live directly in the resolver or downstream.

Toward GraphQL-Aware Authorization

A GraphQL-aware authorization solution is currently in prototype. When a schema is registered, the Schema Registry automatically generates Access Control Groups (ACGs) for each field and its corresponding type. Product managers and DGS engineers then define membership and rules for those generated ACGs. Because each ACG maps directly to a GraphQL field, the DGS framework can automatically apply the associated rules during execution.

Designing the Gateway for Failure

As the single entry point for all requests, the GraphQL Gateway is a critical piece of infrastructure—a failure there has wide-reaching impact. Following Netflix's general engineering philosophy, the team assumes failures will happen and designs to minimize their impact. Five principles guide gateway resilience:

  1. Single purpose
  2. Stateless service
  3. Demand controlled
  4. Multi-region
  5. Sharded by functionality

The gateway's responsibilities are intentionally narrow: parse client queries, then build and execute query plans. With a smaller scope comes a smaller failure surface; anything resource-intensive beyond logging and metrics is pushed off-box to avoid loading this critical tier with unrelated logic.

The gateway runs as multiple stateless instances. Any instance can generate and execute a query plan for any request, and code changes to the gateway layer undergo rigorous testing before production rollout.

Demand control balances the resources consumed per request. Rate limiting prevents callers from overloading the underlying databases that back most domain elements. A static query cost calculation runs on every incoming query, rejecting expensive ones before they can gridlock gateway or DGS resources. Partner teams work with these constraints, reworking costly queries and reducing high-volume callers.

Gateway deployments span multiple AWS regions, which limits blast radius and enables failover when problems arise. In addition to geographic redundancy, the team runs multiple functional shards of the same gateway code. Requests are routed by category: subscriptions, which hold long-lived connections, run on a separate fleet from queries and mutations so that exhausting connections in one tier doesn't take down the others.

Further resilience work is planned. Canary deployments and automated analysis—already in use at Netflix for other services—are next for gateway deployments and, eventually, schema changes. Today, the gateway polls the schema registry to update its schema dynamically. The team is decoupling these concerns by storing the federation config in a versioned S3 bucket, which will make the gateway resilient to schema registry outages.

Looking Ahead

GraphQL and Federation have been a productivity multiplier for Studio applications, and the team has begun testing the model in the consumer space. A prototype of GraphQL Federation now backs the Netflix consumer app search page on iOS and Android, using three DGSs to serve a minimal slice of the consumer graph. A small subset of users is routed to this alternative stack while the team measures high-level metrics to gauge broader applicability.

Still, Federation is early in its maturity cycle and isn't a universal fit. Learning GraphQL and DGS development, running a federation layer, and migrating existing services demands serious commitment and cross-functional collaboration. For teams weighing this path, Apollo's SaaS federation offering and the broader GraphQL learning ecosystem are good resources. For Netflix—with a large set of microservices needing aggregation—the development velocity and operational improvements have made the transition worthwhile.