๐ก๐ฒ๐๐ณ๐น๐ถ๐ ๐ฟ๐ฒ๐ฏ๐๐ถ๐น๐ ๐ถ๐๐ ๐๐ฃ๐ ๐น๐ฎ๐๐ฒ๐ฟ ๐ณ๐ผ๐๐ฟ ๐๐ถ๐บ๐ฒ๐
Netflix's highly scalable and loosely linked microservice architecture is well known. Independent services provide independent scaling and varied rates of evolution. Yet, they increase the complexity of use cases involving several services. Netflix provides a uniform API aggregation layer at the edge rather than making hundreds of microservices available to UI developers.
During that time, Netflix API architecture went through 4 main stages:
๐น ๐ ๐ผ๐ป๐ผ๐น๐ถ๐๐ต: A complete application is packaged as a single deployment unit.
๐น ๐๐ถ๐ฟ๐ฒ๐ฐ๐ ๐๐ฐ๐ฐ๐ฒ๐๐: This architecture enables client apps to hit the microservices, which is not ideal with many clients.
๐น ๐๐ฎ๐๐ฒ๐๐ฎ๐ ๐๐ด๐ด๐ฟ๐ฒ๐ด๐ฎ๐๐ถ๐ผ๐ป ๐๐ฎ๐๐ฒ๐ฟ: as they observed a lot of duplicative data-fetching, here Netflix build graph API to provide unified abstraction on top of data and relationships.
๐น ๐๐ฒ๐ฑ๐ฒ๐ฟ๐ฎ๐๐ฒ๐ฑ ๐๐ฎ๐๐ฒ๐๐ฎ๐: as the number of consumers and amount of data in the graph increased and the API team was disconnected from the domain expertise, they introduced a federated gateway to provide a unified API for consumers while giving backend developers flexibility and service isolation.
Their GraphQL Gateway is based on Apollo's reference implementation and is written in Kotlin.
How many layers sit between your services and your users?