Skip to content
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

[question] Notify service of instance number #2660

Closed
rogeralsing opened this issue May 20, 2017 · 2 comments
Closed

[question] Notify service of instance number #2660

rogeralsing opened this issue May 20, 2017 · 2 comments

Comments

@rogeralsing
Copy link

Let's say I configure a service to have 10 instances.
Is it then possible to make each instance know about it's own index in this pool of services?
What I'm trying to say is, can I make the services get an id like 1, 2, 3, 4 .. 10 ?

This would be pretty nice if you are doing consistent hash based consumers of e.g. Rabbit queues.
one instance that consumes partition #1, another for #2 and so on.

@rogeralsing
Copy link
Author

I found this environment variable: NOMAD_ALLOC_INDEX which gives me what I want here.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant