Skip to content

issavejdani/api-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

API gateway

The Story

Most successful software businesses are born as startups, with a few people working on a small product. In the beginning, everything is clear, simple, and easy to maintain and develop; they may not even have a physical office. However, the lucky ones can grow after a while by raising funds from VCs or angel investors. They get bigger and bigger. The product grows and turns into multiple products. They hire more and more people.

A company with a few people and a single product can grow into a multi-department giant working on several projects simultaneously. Now they have a complex product that is both hard to maintain and develop. Adding a new feature would be a pain in the neck. The customers are not satisfied, the people in tech support are overloaded with support tickets, and the stakeholders are angry.

What happens next?

They are lucky to hire a new experienced CTO with a growth mindset. He/she starts having meetings with engineering managers in each team to discuss their processes and to hear their voices. After a while, an improvement report is ready, based on all those compact sessions with SMEs. He/she creates a proposal based on that report, including several solutions for saving the company and making the customers and stakeholders happy. The most agreed-upon solution with the highest priority is setting up an API gateway.

What is an API gateway?

One of the key requirements of the teams inside the company is to consume internal and external services. A product needs data from another product inside the company or requires a governmental service to do the KYC, for example.

They are lucky to have all these services in the form of APIs and web services, but the integration process can be a real challenge and takes a great deal of time and energy. Here is where an API gateway steps in to save the day. It acts as a hub or an interface among internal and external services. The following diagram shows a general overview of the role of an API gateway inside a banking software company.

API gateway

As you can see, each product or team can be either a service provider or a service consumer. The API gateway sits in between to help them efficiently and painlessly integrate with APIs and services in other products. In other words, a product can be a consumer of a service on another product and, at the same time producer of another service for other teams or products.

Benefits of using an API gateway

Using an API gateway has its pros and cons. Here in this document, we mention a few of the benefits of using an API gateway:

Write once, use many times

You can write one utility class, method, or library to integrate into the API gateway, so you do not need to implement code every time you integrate into each provider's API.

Unique standard

When it comes to exposing services using APIs or web services, each service provider can expose its services using various technologies and standards, so every time we need to consume a new service, we should develop a new time-consuming project. By implementing an API gateway, you can expose all services or APIs using a unique standard like RESTFUL. It acts as a converter among several APIs and web services.

Single authentication method

You do not need to implement authentication methods per provider. You must implement the authentication method used in the API gateway once and for all.

Caching

To prevent extra bandwidth or speed up your services, you can implement caching inside an API gateway. There is no need to reach out to the API provider each time you have a request.

As mentioned earlier, there are so many other benefits of using this approach, and it has its weak points. These are some of the most important reasons to implement services in a software company using an API gateway.

Conclusion

Running an API gateway is recommended depending on your company's size. It helps you develop new features with more agility. It facilitates API integration and accelerates their scalability. Although it might not seem practical for small startups, if they have a vision for growth in the future, they can invest time and energy to implement one at the beginning.

About

A brief introduction to API gateway

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published