The Application Program Interface (API) is a set of predefined functions, programs, and protocols. The API Interface is used to realize the communication between computer software. One of the main functions of an API is to provide a common set of functionality. By using API functions to develop applications, programmers can avoid writing useless programs and reduce programming tasks. The API is also middleware, providing data sharing for a variety of platforms. Based on data sharing performance between different software applications on a single or distributed platform.

In microservices architecture, large services are broken down into independent microservices, each of which is usually provided externally in the form of RESTFUL apis. On the UI side, however, we might need to display data from different microservices on a single page, which would require a unified entry point for API calls. As we can see in the figure above, THE API Gateway acts as a Gateway for multiple services in this scenario, a unified entrance to the system. From the perspective of object-oriented design, it is similar to the appearance pattern. The API Gateway encapsulates the internal complex structure of the system, and it may also have other common functions of API management/invocation, such as authentication. Current limiting, flow control and other functions.

In the face of the increasingly expanding and fragmented needs of users, enterprises need to constantly explore new business models to solve a series of scenarios for customers. By providing standard API services through API gateway, other developers can integrate different API service combinations into their applications, derive new services, and promote enterprises to establish business ecology and cross-border innovation

click.aliyun.com/m/49221/