Understand what an API proxy is and the benefits of using it.
By Mario Kandut
Europe’s developer-focused job platform
Let companies apply to you
Developer-focused, salary and tech stack upfront.
Just one profile, no job applications!
This article explains a fundamental principle and is up-to-date.
In general, a proxy is something that acts as an agent or intermediary for something else. An API proxy provides an interface to developers for accessing backend services and sits between the application and the backend.
💰 The Pragmatic Programmer: journey to mastery. 💰 One of the best books in software development, sold over 200,000 times.
An API proxy acts as a handler between a consumer and backend services. It is a shim (layer of code, which provides compatibility between different interfaces), which handles data transformations, security, routing, and more. It exposes an interface customized for the consumer (web, mobile,...), makes the API calls to the different backend services on behalf of the consumer.
Let's look at some examples:
An API proxy is an intermediary and helps a consumer get the data from backend services, without having to talk to all the services directly. It is a layer of abstraction between the consumer and the backend.
The API proxy pattern allows to expose a stable interface to the consumers. If a backend service changes, the adaptions can be made in the API proxy layer without having to change how the frontend consumes data. An API proxy also allows an easy implementation of caching of expensive calls to backend services and can improve performance. The downside is that latency between backend and frontend will be increased minimal.
Structure of an API Proxy
Thanks for reading and if you have any questions, use the comment function or send me a message @mariokandut.
Never miss an article.