4

I am trying to better understand Kong API Gateway - Routes

Let's say I add a service to my Kong Admin API. This service only allows GET requests and when you do a GET request to the service, all it does is generate a random number.

I've already POSTed a new service to the admin API. Why do I need routes? I've looked at the documentation but I'm still not understanding the purpose of it.

asked Jun 5, 2019 at 16:01

1 Answer 1

7

In Kong, there are two things service and routes. Take eg. you have created two microservices - A and B which you want to secure behind an API gateway (kong).

So as a step one, you need to register both of them as a service in Kong.

Now in Kong you need to create routes. One or multiple routes can point to a single service. The route is basically a path (or you can say a door).

Say, you created 3 routes L, M, N, such that L points to A, M -> B and N -> A. Now, whenever you hit route (open door) L or N you will be calling service A. When calling M you will be calling service B.

answered Jun 6, 2019 at 9:07
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.