Knotel Experiences Success and Challenges Implementing Microservices using Apollo Federation

During Day 1 of the GraphQL Summit in San Francisco, Victor Quinn, Head of Engineering at Knotel reported in an exclusive interview with ProgrammableWeb that his company has achieved success and also had challenges using Apollo Federation to transform the way company uses GraphQL.

One key success is that Apollo Federation allows Knotel to use the Squad Strategy to organize the way its technical staff works.

According to Quinn, “Apollo Federation, which actually allows us to have a single gateway that's federating multiple microservices underneath it with each exposed as their own part of the graph, which has been really helpful for us in terms of squad ownership. We run with autonomous product squads that each own their own vertical and they can manage both the front end client code and its corresponding back end service.”

Quinn points out that segmenting its development workforce into squads allows Knotel to get achieve faster release cycles. “With Federation, we’re able to push, GraphQL down to all the microservices throughout 10,000 lines of code,” said Quinn.

A single squad that’s focused on a single Microservice is more knowledgable about its domain and thus is able to respond to demands for change faster. Federation technology supports the segmentation required for independent releases.

Knotel didn’t start with Apollo Federation from the start. Rather, the company had to run parallel work streams. One workstream used its legacy technology to manage its multiple microservices. The other workstream was used a single Apollo Federation Gateway API to manage constituent data graphs. Once the new infrastructure using Apollo Federation was ready to release, the transformation process was required nothing more than setting a feature flag in its release process running under LaunchDarkly.

Quinn reports that there have been challenges. As Quinn tells it, "when we were looking at GraphQL Federations, one of the things we found really attractive was the ability to be able to bring all our disparate data sources together. And while we realized great benefit using it for queries, we had some real challenges to address when it came to mutations."

Mutation management required that Knotel Federation support working directly with the constituent microservices to update data which was an added degree of labor and complexity for the development teams.

Quinn made the following comment about the general awareness of Apollo Federation, “I think there's just a lot more focus in terms of the Federation on query and data across microservices. And not so much on doing mutations across microservices.” 

In addition to the challenge that goes with supporting mutation, Quinn said they’ve had difficulty supporting role-based access control (RBAC). According to Quinn, “But one of the other things we've run into with difficulty is specifically role-based access control. So for authorization on a per GraphQL type basis, we've been rolling our own. We've been basically cooking up our own solution for that because there isn't one out of the box with Apollo.”

At the architectural level, Knotel is running its services in a Kubernetes cluster using Amazon Web Services Elastic Kubernetes Service (EKS). Its data storage technology is Postgres.

Be sure to read the next GraphQL article: Apollo GraphQL Co-Founder Geoff Schmidt Discusses Federation of The Graph (video)