3

I am contemplating the use of the design pattern API Gateway, specifically the Backends for Frontends derivative.

We have a number of 3rd party software packages that expose an API. Over the course of the past few years I have been creating custom APIs as wrappers for the functionality of these 3rd party APIs. These function in ways that make sense to our business processes.

As the number of applications (web and other) grow, it seems more like it would fit the API Gateway pattern so that we can loosely couple the custom APIs to the apps that use them. As well as tailor our API Gateway to function as a Facade for the client applications. We also need to start communications between the 3rd party software applications (integrate them with each other), as they don't currently offer any built in support.

We have mostly web applications, but we have also added a mobile application. The future could bring more mobile apps, but we will certainly be creating more web apps along the way. Some of these will be internal, some may be for clients outside our network, and some may be for external use, hence I got the idea for the API Gateway - Backends for Frontends idea.

Design References:

backends-for-frontends

patterns-apigateway

As I have never designed something like this before, I was wondering the following:

  1. Have you experienced any other negative consequences from using this pattern other than these:

Source: microservices.io - patterns-apigateway

The API gateway pattern has some drawbacks:

Increased complexity - the API gateway is yet another moving part that must be developed, deployed and managed

Increased response time due to the additional network hop through the API gateway - however, for most applications the cost of an extra roundtrip is insignificant.

(削除) 2. As I am using the MVC pattern for the API Gateway, would you use a separate controller for each custom API it represents? Can you provide some guidance on structuring the controller(s) and routing recommendations? (削除ここまで)

  1. The documentation I have read, recommends using a single endpoint, which seems odd, as I wouldn't think you'd want to route everything through the same endpoint (method), ChatGPT told me differently and that using multiple controller(s) with multiple endpoints makes sense, perhaps I am misconstruing what they mean by a single endpoint (do they mean the base url?).

Reference - Microsoft - MSDN

Use the gateway as a reverse proxy to route requests to one or more backend services, using layer 7 routing. The gateway provides a single endpoint for clients, and helps to decouple clients from services.

asked Jun 29, 2023 at 11:52
15
  • 1
    @Community Unhelpful. The question is specific in it's context and question(s) Commented Jun 29, 2023 at 17:47
  • 1
    @RyanWilson to say it a little more clearly, our Q&A format needs questions that have a single objective answer so that the votes mean something. Questions asking for an open ended list of things don’t work well here. We don’t do opinion polls. Commented Jun 29, 2023 at 19:16
  • 1
    We used to send people to Reddit but it’s a dumpster fire right now. Commented Jun 29, 2023 at 20:43
  • 1
    @guillaume31 My bad. I thought I had the link to Microsoft that contained that statement linked as the first link. Added it as a block quote and the reference to the article after #3. Please see edit Commented Jun 30, 2023 at 11:39
  • 1
    I think they mean "endpoint" in a general sense, not "API endpoint". A single server/service if you will, not a single resource/URI. Commented Jun 30, 2023 at 11:46

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.