pnxtech / hydra

A light-weight library for building distributed applications such as microservices
https://www.hydramicroservice.com
MIT License
645 stars 54 forks source link

How to add new services with out restarting API gateway /hydra-router? #138

Closed techwizardg closed 7 years ago

techwizardg commented 7 years ago

This is not a bug but not sure where to ask? How do i add new microservices in hydra with out restarting API gateway or hydra-router?

cjus commented 7 years ago

@techwizardg when a hydra-enabled service starts it tries to broadcast a message to listening hydra-routers (if any) and at that point new / changed routes are updated. So if this isn't working for you it's a bug. As a work-around for now - you can send a message to a hydra-router to update its known routes using: http://localhost:5353/v1/router/refresh

BTW, the router API is documented here: https://www.hydramicroservice.com/docs/tools/hydra-router/optional-router-api.html