1

Suppose one's got more than two (ideally, lots of) servers. Some of them provide, for example, http or ftp service. Only some of them. There is one 'client' computer which needs to gather information from every http server but it doesn't 'know' which servers are http ones. The client program is written in C using ZeroMQ. How does it find out which servers are the needed ones?

I would appreciate it if you provide me with some code examples. Thank you!

2
  • @dmg, http server is just example. Only the client's written using ZeroMQ
    – ForceBru
    Jan 26, 2015 at 15:19
  • Unless I am missing something, ZeroMQ and discovery are orthogonal. For discovery, you need something like Bonjour (avahi, zeroconf, whatever). As a last resort you me port scan your servers, but I wouldn't recommend it.
    – user58697
    Jan 27, 2015 at 1:32

1 Answer 1

2

if it's all inside a local network you can use czmq zbeacon.

If it is in the cloud you can use czmq zgossip.

If it cross LAN application I suggest doing centralized configuration, have zeromq application that is well known to all http servers. Each http server need to register with the centralized server.

1
  • Anyone got any links to a sample project doing discovery with CZMQ zbeacon, preferably in C or Rust? Jul 23, 2021 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.