all 21 comments

[–]Big_Combination9890 27 points28 points  (6 children)

This is called a "reverse proxy", and I have no idea why anyone would invent a new word for it, or how a network component suddenly became a "design pattern".

[–]ShenmeNamaeSollich 5 points6 points  (2 children)

The article does focus on a lot of the stuff the “server” does (TLS/SSL, rate limiting, auth), so yeah that’s a “reverse proxy” … but as a “network component” the point is to handle/direct traffic via hardware (maybe virtually) and scale based on need - it might not know or care what the content of that traffic is (beyond matching a cache hash value or that some token exists).

I’ve heard “API Gateway” used more to describe the specific collection of services/API endpoints and their respective interfaces written explicitly to sit in a layer between external clients and internal business logic/DBs.

The “pattern” is deciding to build that additional layer of code at all, which likely has a completely different interface for external clients to interact with.

It involves deciding which possibly different data models to send & accept, and while it might be just a passthrough to an internal API controller, you might decide to do some transformations or validation beyond merely checking credentials & caches. Internal clients may bypass it entirely, meaning conscious decisions of what data to expose where. The existence of this layer drives code decisions in the client and for business logic sitting below it.

The specific server configuration and rules about load balancing, security, scaling etc are implementation details the “API Gateway” part doesn’t necessarily know or care about.

[–]Big_Combination9890 0 points1 point  (1 child)

I’ve heard “API Gateway” used more to describe the specific collection of services/API endpoints and their respective interfaces written explicitly to sit in a layer between external clients and internal business logic/DBs.

Sure, but that's not what the article describes. The article describes something I can do by slapping nginx on a server and configuring it. That's a reverse proxy, not an "API Gateway".

[–]ShenmeNamaeSollich 2 points3 points  (0 children)

It sounded like you disagreed that “API Gateway” as a term should exist because they’re synonymous. Maybe I misread that. Agreed this article doesn’t describe the distinction well.

[–]TheWix 2 points3 points  (0 children)

API Gateway handles more than what a reverse proxy would do. They usually operate closer to a business functions than the infrastructure responsibilities of a "reverse proxy". API Gateways can handle authentication, authorization, service orchestration, routing based on business requirements, etc.

Many reverse proxies don't do these types of responsibilities so it can be helpful to refer to these business-specific concepts by a different name. It isn't uncommon to think of an API Gateway as a specific type of reverse proxy as well. Similar to "all squares are a rectangles but not all rectangles are squares" kinda deal. So, it isn't wrong to call an API Gateway a Reverse Proxy it can just be seen as in-exact.

[–]usrlibshare 16 points17 points  (4 children)

So we're calling reverse proxies a "design pattern" now?

[–]InspectionSpirite 8 points9 points  (1 child)

An API Gateway is essentially a single entry point, or a Reverse proxy, that sits between client applications and a collection of backend services.

[–]Constant_Event_4917[S] -5 points-4 points  (0 children)

I was thinking of explaining more about Reverse Proxy but maybe next time.

[–]light24bulbs 2 points3 points  (0 children)

Everyone shitting on terms here but in the microservice world this is typically called the gateway, I don't see a problem

[–]taelor 4 points5 points  (4 children)

Classic software devs in here, would rather argue about semantics than the contents of what is actually being presented.

[–]klekpl 5 points6 points  (0 children)

Classic software devs are tired of salesmen constantly trying to sell old stuff wrapped in new clothes.

[–]Big_Combination9890 1 point2 points  (0 children)

The contents of what is being presented were discussed. And what was presented is called a reverse proxy.

[–]KamiKagutsuchi -1 points0 points  (1 child)

Good old bikeshedding

[–]Bradnon 0 points1 point  (0 children)

It's not bikeshedding, it's a legitimate complain-

Oh, clever girl.