Comments (8)
@jkyberneees on startup, your hapi-service-test should have sent a message to hydra-router with its updated routes.
from hydra-router.
Hi @cjus, it does it. However the issue appears when multiple services have registered the same route.
IMO the router should decide for the service that match the route but also is online.
from hydra-router.
@jkyberneees I looked into this. I don't see a way to address it. I think it's up to the service builder to ensure that routes are not reused by other services. Meaning two different services should not both register v1/{serviceName}/endpoint
. I also think that service registries have to expire at some point. Perhaps a router that ends up with a 503 might flush the service registry or perhaps a Lua script in Redis.
from hydra-router.
Hi @cjus, I can suggest you to check for service presence before accept the route match.
You can see an example here: https://github.com/jkyberneees/hydra-plugin-http/blob/master/libs/proxy.js#L35
I agree on the flush of the routes if 503 is detected, that would keep the router more performant and consistent.
Regards.
from hydra-router.
Hello
This discussion is old, but I have the same issue with hydra-router.
I used the different command for clean and refresh:
hydra-cli refresh
hydra-cli refresh node list
but hydra-cli routes show me the old dead services and then hydra-router cannot work correctly.
Is it something I am missing for cleaning/refresh ?
from hydra-router.
@arn-the-long-beard which version of hydra-cli are you using? How comfortable are you with Redis? Is this happening locally or on a production server?
from hydra-router.
Hello @cjus :)
I am using [email protected]
For now this is happening locally. I am a very newbie to Hydra and Redis also. I am building micro services for a distributed system for the startup I am working.
from hydra-router.
Same problem here. I'm using [email protected]
hydra-cli refresh
and hydra-cli refresh node list
keeps old routes, is not cleaning properly
from hydra-router.
Related Issues (20)
- Support for private routes HOT 7
- Get currently connected clients HOT 5
- hydra-router not processing application/x-www-form-urlencoded request HOT 2
- Creating an API Gateway HOT 6
- Docker cannot connect to Redis HOT 12
- "Overlapping" routes HOT 3
- Hydra-router / Docker Swarm / AWS: Getting SIGTERM HOT 8
- hydra-router not routing request to worker service in docker swarm cluster HOT 4
- Time drift issue when running hydra-router in a docker swarm on a Mac. HOT 3
- A service aware router for Hydra Services HOT 10
- Routing not working HOT 2
- Hydra-router request timeout is not passed to Hydra Core HOT 4
- Document each entry in the routers config
- Improve config field/param loading
- cant proxy/process file uploads/downloads via hydra-router
- Use module logger utility HOT 2
- Missing of headers support on UMF messages affecting hydra-router response on legacy environments HOT 5
- queuer redis db shouldn't be hardcoded HOT 2
- Router doesn't correctly report service unavailable? HOT 3
- _handleRouterRequest allows access when no token is set HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydra-router.