Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a difference between API gateway pattern and BFF?

My understanding is that API gateway pattern is like a proxy to all microservices. So client calls the API gateway which takes care of further routing. BFF is a specific case of API gateway pattern where we have a routing mechanism for each type of client. Am I right?

like image 379
codingsplash Avatar asked Sep 06 '17 08:09

codingsplash


People also ask

Is an API gateway the same as a BFF?

The API Gateway pattern is also sometimes known as the "backend for frontend" (BFF) because you build it while thinking about the needs of the client app. Therefore, the API gateway sits between the client apps and the microservices. It acts as a reverse proxy, routing requests from clients to services.

What is BFF pattern?

The BFF pattern is an architectural paradigm, a variant of the API gateway pattern. The BFF is tightly entangled to a particular user experience and is often maintained by the same team as the user interface.

What is API gateway pattern?

The pattern provides a reverse proxy to redirect or route requests to your internal microservices endpoints. An API gateway provides a single endpoint or URL for the client applications, and it internally maps the requests to internal microservices.


1 Answers

Yes, it is a specific case of API Gateway. For me this comment was helpful for understanding. It says you may think about the following cases when we are talking about API Gateway - Client relationships:

  • A single API gateway providing a single API for all clients.
  • A single API gateway provides an API for each kind of client.
  • A per-client API gateway providing each client with an API. This is the BFF pattern.
like image 185
Set Avatar answered Oct 13 '22 03:10

Set