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

Service Discovery: allow configuration to replace URI scheme for HTTP calls #381

Closed
ReubenBond opened this issue Oct 18, 2023 · 18 comments
Closed
Assignees
Labels
area-service-discovery enhancement An enhancement to an existing feature or capability.

Comments

@ReubenBond
Copy link
Member

ReubenBond commented Oct 18, 2023

eg, replace "http://." with "https://."

Latest proposal was to support something like "svc://" that would be replaced with "http://" or "https://" based on service discovery configuration.

@davidfowl
Copy link
Member

Why? What's the scenario?

@DamianEdwards
Copy link
Member

App having code pointing at "http://something" and wanting to have that resolve to "https://something" before the request is actually made, so that e.g. redirect responses don't have to be followed, etc.

@davidfowl
Copy link
Member

But why? When does this happen in practice and why would we do that? What did we run into?

@davidfowl
Copy link
Member

PS: If we do anything like this it needs telemetry. Transformations like this make debugging HARD.

@mitchdenny
Copy link
Member

How would you express this in the app model?

@DamianEdwards
Copy link
Member

What did we run into?

When we hit the issue with the forwarder following redirects I wondered why we couldn't have service discovery just map it on the way out, and we had the questions RE specifying http vs. https in app code. Would definitely be interesting to see if anything like this is done in other stacks.

@davidfowl
Copy link
Member

I'm not a fan of this, it feels like magic that would be hard to explain.

@Tratcher
Copy link
Member

How do you handle custom ports?

@ReubenBond
Copy link
Member Author

ReubenBond commented Oct 19, 2023

How do you handle custom ports?

The ServiceEndPoint includes an EndPoint which can have a port (eg, a DnsEndPoint or an IPEndPoint). If we supported a UriEndPoint, maybe that would be better.

@adityamandaleeka adityamandaleeka modified the milestones: preview/.NET 8 GA, some time after preview Oct 23, 2023
@danmoseley danmoseley removed this from the needs milestone (for GA) milestone Nov 13, 2023
@DamianEdwards
Copy link
Member

DamianEdwards commented Nov 17, 2023

Last discussion on this produced the idea of an explicit scheme that would need to be specified in the address for service discovery to perform this action, e.g. "svc://basketservice". The "svc" would be replaced by "http" or "https" based on service discovery configuration/behavior. The hope would be this feature could help us solve the current usability issues that forced us to use "http" everywhere in our templates, etc.

@mitchdenny mitchdenny added this to the preview 3 (Feb) milestone Jan 10, 2024
@danmoseley
Copy link
Member

We don't see this for P3 cutoff

@davidfowl
Copy link
Member

@ReubenBond we want to get something here for preview4

@ReubenBond
Copy link
Member Author

@davidfowl I thought you were against this idea? Let's discuss it

@davidfowl
Copy link
Member

davidfowl commented Jan 22, 2024

I am against the idea if the scheme was specified. If the scheme is auto:// then its fine.

@DamianEdwards
Copy link
Member

Someone suggested httpx:// to opt-in to scheme resolution today so I'm putting it here 😁

@danmoseley danmoseley added the enhancement An enhancement to an existing feature or capability. label Feb 26, 2024
@danmoseley
Copy link
Member

We have to do in P5

@DamianEdwards
Copy link
Member

This is done now thanks to #2719 yeah @ReubenBond?

@ReubenBond
Copy link
Member Author

Yes, we can close this

@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-service-discovery enhancement An enhancement to an existing feature or capability.
Projects
None yet
Development

No branches or pull requests

7 participants