language agnostic - How to automatically detect a server? -
we have developed client app , server app. client communicates server using http protocol , sends data processed server.
our structure allow have server installed anywhere. can on same client network or on cloud.
when server hosted on cloud, makes sense asking user server address (since can change if user wishes to) not make sense when server on same network client. besides that, asking users configure server ip/name in order connect server.
to avoid (asking users address) have developed discovery service based on udp. client broadcasts message server answer address. work on cases, not when user has kind of firewall, proxy or anti virus.
i have read lot discovery services, , 1 bonjour.
so, question is: best way of discovering server's ip when server on same network client without being blocked firewalls, proxies, etc?
you can keep service purely local (in intranet) , build on top of using implementing hole punching. can past firewalls, im not sure av software policies.
or can establish well-known http-based discovery service in internet.
- a server comes alive, sends (local) ip address discovery service (keeps sending keep-alives)
- on startup, client queries discovery service, identifies local subnet in, , gets local ip address of server.
that of course creates single point of failure in system in if discovery service kicks bucket, clients cannot find servers. can remedy replicating service and/or introducing fallback mechanisms (like purely local discovery have), want anyway. problem might have subnet identification, if computers in local subnets dont share external ip addresses (then depends on local subnet you).
Comments
Post a Comment