Search code examples
web-applicationsarchitecturemicroservicesapi-gateway

How to create an API Gataway switching to a microservice architecture


our team is trying to switch a monolith web application (e-commerce) to a microservice architecture. In order to do that, we identified the first small business functionality that can be isolated into a single microservice. As soon as we started working on it, we faced the need of an API Gateway that isolates our web UI from our internal service structure.

My question at this point is: is there an easy way to implement such API Gateway? What would be the best approach? Building it from scratch or is there any free solution that we can use? (can Traefik solve the problem?) What can be the first step that allows us to easely isolate our client interface from the internal architecture?

In general I'm trying to find out what are the basic steps to create a sort of API Gateway that will then allow us to start isolating our business functionalities in different microservices.

UPDATE: Instead of downvoting the question, please give me a feedback about how I can improve the question if it's not clear or enough specific.


Solution

  • There are lots of options out there, you almost definitely should not build your own unless it is absolutely necessary.

    Some solutions are readily apparent based on your hosting infrastructure. If you are in AWS, use AWS API Gateway, if you are in Azure, use Azure API Gateway, if you hosting your own, there are a plethora of service providers that would love to take your money. They all have different advantages/disadvantages.

    It sounds like you don't really understand what problem you are trying to solve. Are you worried about monetization? Throttling? Authentication? Abstraction? Transformation? Figuring out what problems you are trying to solve is the important part of choosing a provider. If you aren't trying to solve one or more of these problems, you probably don't need an API gateway.