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

Register API service to multiple different API ML clusters #2425

Closed
plavjanik opened this issue Jun 10, 2022 · 8 comments
Closed

Register API service to multiple different API ML clusters #2425

plavjanik opened this issue Jun 10, 2022 · 8 comments
Labels
enhancement New feature or request extender this issue has been raised by an extender Priority: High size/L v2

Comments

@plavjanik
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Can an API service register to more than one instance of API ML? I have two independent Zowe instances and I would like my API service (the same instance, using the Plain Java Enabler) to be available in both of the Zowe API ML instances.

Describe the solution you'd like
I would like to have a way to specify a list of discovery service URLs (including multiple instances of Discovery Services for one Zowe instance) and have my service to be registered to all of them.

additionalDiscoveryServiceUrls:
- https://ca31:10011/eureka,https://ca32:10011/eureka  # https://ca31:10011 and https://ca32:10011 belong to the same Zowe instance running in HA mode
- http://tso1:20011/eureka   # another Zowe instance

Describe alternatives you've considered
The documentation (https://docs.zowe.org/stable/extend/extend-apiml/onboard-plain-java-enabler#eureka-discovery-service) talks about discoveryServiceUrls. But that seems to work for failover and load balancing between connected Eureka instances. It registers to the first available peer. In my use case, I would like to register into all Discovery services that I will provide.

@plavjanik plavjanik added enhancement New feature or request new New issue that has not been worked on yet labels Jun 10, 2022
@hogstrom
Copy link

I have this requirement as well. I have a service in an environment where there is more than one instance of the API ML running for purposes of isolation. As a consequence, a service can only be associated with one API ML instance which creates operational issues. Rather than spinning up the service more than once a natural extension would be the ability to register with multiple instances simultaneously.

@plavjanik
Copy link
Contributor Author

Such an API that is registered to more than one API ML will have to accept Zowe JWT issued from different gateways. ZAAS client will have to support it and communicate with the correct gateway that sent the JWT and is trusted. Thanks @pj892031 for mentioning this.

@anton-brezina anton-brezina added extender this issue has been raised by an extender Priority: High and removed new New issue that has not been worked on yet labels Jun 15, 2022
@balhar-jakub
Copy link
Member

And as another note, we are talking about the clusters. Registering to multiple different clusters of API ML (the cluster can have one instance.)

@anton-brezina anton-brezina added the clarification Issue is being clarified in the discussion with the creator of the issue label Jul 20, 2022
@balhar-jakub
Copy link
Member

Potential ZAAS Client issue. How do you specify the work?

@hogstrom
Copy link

hogstrom commented Aug 9, 2022

And as another note, we are talking about the clusters. Registering to multiple different clusters of API ML (the cluster can have one instance.)

The use case we have is there are multiple API ML instances that are running on a system and we wanted to provide visibility to the other. I think registering to different clusters would work for our use case.

@achmelo
Copy link
Member

achmelo commented Sep 15, 2022

It is possible to create multiple DiscoveryClient objects within the enabler(java and spring), authentication needs to be done in the application itself as ZaaS client is a separate component. Further tests need to be done to fully understand the impact of such changes. This functionality seems to be in contrast to how Eureka was designed, multiple Eureka servers are meant to serve only as a fallback. https://cloud.spring.io/spring-cloud-netflix/multi/multi__service_discovery_eureka_clients.html#_registering_with_eureka

@anton-brezina anton-brezina removed the clarification Issue is being clarified in the discussion with the creator of the issue label Sep 23, 2022
@balhar-jakub balhar-jakub changed the title Register API service to multiple different API ML instances Register API service to multiple different API ML clusters Sep 26, 2022
@balhar-jakub
Copy link
Member

Some of the information in the issue may be a bit confusing. The actual use case isn't about multiple instances but multiple clusters (a cluster could be represented by one instance). The service should be properly visible in multiple clusters that intentionally don't communicate with each other. E.g., because of different stability requirements.

An example would be multiple API ML clusters. One for development purposes and one for production purposes. The southbound service is considered stable and isn't concerned with development usage. This service wants to be onboarded to multiple API ML clusters. The reason is that they don't want to set up another cluster just for development purposes.

@achmelo
Copy link
Member

achmelo commented Sep 18, 2023

The issue was addressed partially by providing a possibility to register gateway service to multiple discovery services. Support for the rest of the services will be done later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extender this issue has been raised by an extender Priority: High size/L v2
Projects
Development

No branches or pull requests

6 participants