Closed parthibd closed 5 years ago
Hi @parthibd, thanks for your motivation! Could you also attach a proper example to your proposal for a better understanding?
Say I have two services
{
"service1":{
"endpoint":"xyz.com",
"maxRetries":"3",
.....
},
"service2":{
"endpoint":"abc.com",
"maxRetries":"5",
.....
}
}
Now when I am defining routes I can do something like this
"routes:{
"route1":{
"localEndpoint":"/user"
"service":"service1",
"serviceEndpoint":"/userdetails"
},
....
}
I get your idea and I like it! It will make life more easy for situations where you need to do a lot of endpoint level proxy. However, I would propose you to implement such configuration strategies as a separate module. It should not land into this core.
I would be happy to support you on that development as well.
I want to go ahead and try out implementing it . How do you suggest I should proceed ?
Create a new module, add k-fastify-gateway
as a reference.
Then create an interface where a more abstracted configuration like you propose can be translated into the low level interface...
Hi @parthibd any update here?
I think it will be better from an architectural standpoint to give services endpoints with each service having its own configuration . Then instead of assigning endpoints in each route we can assign service name as key . Also it'd be great if we can have the provision for flexible service endpoints which will get rid of the 1:1 mapping and make the gateway more robust . Any thoughts ? :)