0

So am in the process of developing a new application and am welling to adopt a micro-services based architecture (am new to that).

The problem is that the application will be exposed to the final end-users via a web based GUI (web app) that consumes those micro-services (REST APIs) , so am wondering 'is it worth it to implement a an API gateway -such as Kong- in front of those micro APIs or it will be better to consume those APIs directly by the web app" ?

The second question is, “if i decided to go with the first approach (API gateway) would it be possible to implement a session like authentication with the available plugins (for kong gateway)?” or maybe there is another better approach?, because obviously a users will just login once and start using the app ... thank you all.

  • what features of an api gateway would you use rather than implementing them on your apis? – Ewan Jul 16 '18 at 14:32
  • Rather than all of the complexity of an API gateway connecting your frontend to a fleet of micro services, have you considered starting with a monolith and waiting to see if that ever becomes necessary? – jonrsharpe Jul 16 '18 at 15:18
  • @Ewan we considered using the gateway for managing the authentication and authorization along with load balancing... so we could concentrate on on the functional part when developing the individual micro-APIs – ismail belghit Jul 16 '18 at 16:22
  • do you have any existing authentication and load balancing that it would replace? – Ewan Jul 16 '18 at 16:23
  • @jonrsharpe yes, we considered the monolith approach, but the problem here that the system we are trying to develop here is rather complex with so many different parts (IoT, application logic,...) that it would better and more flexible for us to go with the micro-services approach – ismail belghit Jul 16 '18 at 16:28
1

As with any 'Is it worth it' style question it really depends on where you are coming from.

With a blank network infrastructure you are faced with a whole bunch of basic stuff you may need to setup. Auth, Load Balancing, Zero Downtime Deployment, firewalls, routing, servers, database failover etc etc

If an off the shelf product can do a bunch of these for you then it seems like a good deal.

The only questions are really:

  • Do you really need feature X? Is it on your critical path, or is it a nice to have

  • Does the off the shelf solution do feature x as well as 'real' solutions? ie. will the authentication meet the needs of your app, or will you have to customise it?

  • Is the feature already provided by other components of your infrastructure? eg. If you are hosting in the cloud; your provider probably has load balancing products, why not use those?

  • What's the long term cost? Will you be locked into a propriety product for the next decade

Most programming work even if its green field tends to be done within an existing infrastructure. Auth, Networking, Server provision etc are solved problems even if the solution is a bit creaky.

But with a completely new infrastructure, the time saving in using an off the shelf solution to any given problem is probably worth it. Just check it really does solve a problem and your not just buying into the hype.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.