-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routing job load across some agents [ req/rep - pull/push] #189
Comments
The best way to achieve what you want is to use separate service addresses (URLs) for production, development, etc. Basically use a completely disjoint topology, I think. The sockets otherwise have no idea how to route your traffic, and really there is nothing currently in the protocol that would allow them to do that. |
Hello @gdamore , Separate URL's implies restart the "master" and reconfigure "agents" on each new "route" I think is not a good solution for me. The real use case is a web site performance measuring system , right now agents only over AWS "eu-west-1" , but perhaps tomorrow I will add a new agent on AWS "ca-central-1", I would like control measuring jobs from each AWS zone. the job will have a location parameter, and each agent will be started with location label. The master should be transparent to the number of different locations, this is, jobs should be routed thought the same "socket". There is much work to add this feature? perhaps we can help to add if somebody can help us. |
Hello @gdamore I'm still interested in this feature, and we would like to help implement it if not very difficult and you could assist us. |
Its not trivial to do this -- because as I said it, there is nothing in the protocol itself to guide routing decisions. You could probably build a router, starting from the code implementing nng_device(), but you'd need to have it make informed routing decisions (presumably by looking at your application specific payload.) There might be another way if you're willing to have a separate service address locally, where you use different local routers, which could be uninformed leaving the decision about where to send the message to client. |
Hello! everybody working in this great library.
I'm evaluating mangos as base library to spread load from "master" (who sends jobs ) to a lot of "agents".
Agents right now are all in the same category and any of the agents, will run any of the messages in the master queue.
master && agents Execution
without routing
I would like to add labels to agents in any way to route messages by example by environment=production, testing and master will send messages only to the agents with its proper label. ( agents will only dequeue messages routed with its own label )
This new feature will apply on req/rep and pull/push protocols
Execution examples...
with routing
PoC Code
Without Routing ( as currently is working)
I did the PoC with this code.
With Routing in Agent (pseudocode)
With Routing in Master(pseudocode)
The text was updated successfully, but these errors were encountered: