Skip to content

Support proxy-less endpoints #1637

@davidfowl

Description

@davidfowl

This issue outlines how networking works in aspire dotnet/docs-aspire#232. Today we spin up a proxy for each endpoint which means the application being proxied needs to be amenable to accepting a port to listen on. The proxy is important for 2 reasons:

  1. We can avoid forwarding the connection until the underling endpoint is ready
  2. We can route to multiple replicas of the underlying service

The scenario that does not work is the one described here dotnet/docs-aspire#232 (comment)

We have also a legacy java http service running on specific port on Windows.
We add the service as a console project managing its execution.
How can I specify its port in WithServiceBinding if it is not running in a container?
If i set the hostPort to the service port, the proxy blocks the port and the service cannot be started.

In this scenario, there can be no proxy because the underlying process can't listen to anything but the port it already has. The only work around for this today is to avoid using WithEndpoint (formerly WithServiceBinding) but that breaks the ability to add references to other resources (WithReference) and it also means the dashboard doesn't show the url for the service.

Open questions:

  • What happens when a resource has endpoints that are proxy-less and proxied? This probably shouldn't be allowed.

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions