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]: Multi Tenant Upstream Support #400

Open
sandy-adi opened this issue Jan 19, 2018 · 8 comments
Open

[Question]: Multi Tenant Upstream Support #400

sandy-adi opened this issue Jan 19, 2018 · 8 comments

Comments

@sandy-adi
Copy link

Hi Team,

I’ve the following use case:

I’ve an api let’s say identified by the uri /service/function/operation and there are different upstream tenants that provide the same API. So, lets say

User 1,2,3 are served by tenant A
User 4,5,6 are served by tenant B
User 7,8,9 are served by tenant C

The upstream provider for a specific user will be determined by an authorization engine.

I’ve a few questions in this regard:

How do I go about the adding and configuring the providers for this use case?

On a side note is there a community forum where I can reach out for questions or is github issues the right forum?

@artgon
Copy link
Contributor

artgon commented Jan 28, 2018

Are you using Zuul 1 or Zuul 2? Eureka or no?

@sandy-adi
Copy link
Author

Thanks for your response @artgon
I was using Zuul1, with Consul. It looked like it was not possible with Zuul1. I just started looking at Zuul2.
it is so hard to get a hang of the documentation, it seems to be all over the place. what's a good place where I can get information about zuul2

  • development setup
  • apis
  • etc..

@artgon
Copy link
Contributor

artgon commented Feb 8, 2018

No documentation yet, it'll be coming shortly. Best bet for Z2 right now is the sample app.

Someone else had a similar question earlier, see if helps: #395

@sandy-adi
Copy link
Author

Thanks @artgon I'll check it out

@sandy-adi
Copy link
Author

@artgon what am I doing wrong?
I ran gradle jar within the zuul-sample directory. Then I tried running the sample app as below:

$ java -cp build/libs/zuul-sample-2.2.0-SNAPSHOT.jar com.netflix.zuul.sample.Bootstrap

@artgon
Copy link
Contributor

artgon commented Mar 1, 2018

Added a run task to the sample (1baf63a)

You can run it from the root directly with the command ./gradlew run.

@sandy-adi
Copy link
Author

Perfect! Thanks @artgon

@sandy-adi
Copy link
Author

@artgon I setup a local instance of eureka and modified the configuration on the sample app to point to the local instance of eureka, it appears like zuul is picking up the instances registered on eureka

2018-03-08 02:11:21,952 INFO  com.netflix.discovery.DiscoveryClient [main] Discovery Client initialized at timestamp 1520493081950 with initial instances count: 4
2018-03-08 02:11:22,058 WARN  com.netflix.zuul.netty.server.BaseServerStartup [main] Configured port: 7001

however, I'm not able to figure out how to access the APIs on those instances via zuul.

I tried http://localhost:7001/instanceid/apiuri, but that didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants