1

I am looking for UDP service discovery functionality in ASP.NET Core. This functionality is available in .NET Framework WCF via System.ServiceModel.Discovery (e.g., UdpDiscoveryEndpoint that uses WS-Discovery).

The intended result is to allow clients on a LAN to discover an ASP.NET Core WebAPI without needing to know the server's name/IP and port.

I see some service discovery frameworks available like Consul, but they don't seem to support UDP broadcasts.

I could write my own using code similar to the solution in How to do Network discovery using UDP broadcast, but I have to question whether something better is available already.

  • You are aware udp without realys only works in VERY Limited scenarios. LAN is not even one - a LAN can do routing (and does in any sane larger company). This is one reason they fell out of use. – TomTom Jul 06 '18 at 14:15
  • It's potentially coming in v3 https://github.com/dotnet/wcf/issues/211 – ta.speot.is Aug 18 '18 at 01:36

1 Answers1

0

Could be using Ocelot, http://ocelot.readthedocs.io/en/latest/features/servicediscovery.html

An example of how this could potentially be implemented can be found here: https://www.c-sharpcorner.com/article/building-api-gateway-using-ocelot-in-asp-net-core-service-discoveryeureka/

lex87
  • 1,276
  • 1
  • 15
  • 33
  • 1
    It looks like Ocelot leverages Consul or Eureka. Both of these solutions still require you to know the host name of the discovery registry server. I was looking for a way to discover services without this piece of info. – David Buterbaugh Jul 09 '18 at 11:14