3.6. Microservice API

  • Wersjonowane

  • Stabilne

  • Deprecation policy


  • BFF, API Gateway

  • GraphQL

3.6.1. Direct


Figure 3.25. Source: [1]

3.6.2. API gateway

  • Implement an API gateway that is the single entry point for all clients. The API gateway handles requests in one of two ways. Some requests are simply proxied/routed to the appropriate service. It handles other requests by fanning out to multiple services.

  • Rather than provide a one-size-fits-all style API, the API gateway can expose a different API for each client. For example, the Netflix API gateway runs client-specific adapter code that provides each client with an API that's best suited to it's requirements.

  • The API gateway might also implement security, e.g. verify that the client is authorized to perform the request

  • Netflix API gateway, Zuur


Figure 3.26. Source: [1]

3.6.3. BFF Model


Figure 3.27. Source: [1]

3.6.4. GraphQL

3.6.5. Historie

  • przykład stabilności webapi i mobilnych stron

  • wersjonowanie w nagłówkach HTTP i q=...


3.6.6. Further Reading

3.6.7. References