-
Notifications
You must be signed in to change notification settings - Fork 27
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
Communication issue between services with v1.0.2 #70
Comments
I think you are right because by default the distribution key is the app uuid so that if you want your service namespace to be persistent even on app restart you have to assign a specific key to your app like this:
Could you please check if it works better ? Will try to make this more clear in docs anyway. Thanks for feedback. |
Thanks @claustres , I'll was able to reproduce this issue locally very easy by restarting app2. We tried upgrading from v0.7.1 to this version on a staging environment and communication between services failed after every re-deployment. It seems to works well after setting the When checking the logs, it seems that app1 is still ignoring remote services notifications from new instances of app2, but all works. I think that without setting the Can you please explain how this work? Should I set the same static value on the |
I've just set a default key for all apps so that by default this should work fine, although there is no partition. Please reopen if required, otherwise we will publish a patch. |
Thank you! |
@claustres The solution did not work well. we got the following error when trying to call services between apps:
From Cote: As I understand this, service A in this example is a Feathers app, so it needs a different key than the other Feathers app in the Cote discovery environment. I think the issue is that every app needs to have a unique & consistent distribution key. All works well after setting the distribution key to the package.json's name field. for us, the app name is unique & consistent value per app. |
Yes usually you should have a different key per app if you have multiple apps and each app manages different services, that's the reason why we previously used the app uuid as a key but this is not consistent across restart. Not sure what is the best default as it really depends on the use case, eg you can also have multiple but replicated apps owing similar services. |
Why would you have the same service in different type of apps. It's
basically duplicating the service code between 2 different projects (git
repos)?
You can always offload a service functionality to a shared class that is
initiated when needed in multiple different apps and maybe use the shared
instance in a service.
The package.json name field is solid solution, but it has to be very clear
in the docs.
בתאריך יום ב׳, 29 ביוני 2020, 0:03, מאת Luc Claustres <
[email protected]>:
… Yes usually you should have a different key per app if you have multiple
apps and each app manages different services, that's the reason why we
previously used the app uuid as a key but this is not consistent across
restart.
Not sure what is the best default as it really depends on the use case, eg
you can also have multiple but replicated apps owing similar services.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#70 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABB5E3PSMIVZBB2YSFOI64LRY6V25ANCNFSM4OD4FJ6A>
.
|
I was talking about launching the same app with the same set of services multiple times in order to scale and load balance requests between each app not about duplicating the same services across different apps. I agree the package.json name field is a solid solution because duplicated apps will then have the same key while different projects will not, and it will be persistent across restart. However I am somewhat reluctant to hard code this in the library, people may want to use more "domain driven" names to group services. I will try to update the docs in this way unless you want to PR the docs if you already have an idea about how to explain this. |
Thanks! I don't have any suggestion to the docs, besides highlighting the info since it's a critical option and the lib does not work as intended without it. I'm setting the
|
Just enhanced the doc with this https://github.com/kalisio/feathers-distributed/blob/master/README.md#partition-keys. |
We have a communication issue between services in different apps with feathers-distributed v1.0.2
How does it work or supposed to work? what am I missing?
The text was updated successfully, but these errors were encountered: