Inter-Service Communication Idioms

Context: I’m trying to scale a legacy application using Nomad. This requires Apache web server to communicate with Tomcat, using AJP. Today this uses static ports, configured in a file.

How will this work in the Nomad world with dynamic ports and so on? Are there any common idioms? Is a sidecar necessary/recommended for such communication? Are there any resources/tutorials on the topic?

Thanks in advance.

Hi @egmanoj, there are a few options for migrating an existing service into Nomad with regard to port management / service discovery.

  1. Keep everything static, making use of static ports in Nomad. Doing this has the obvious downside that only one instance of the application will be able to run per node (unless you manually assign different ports for each one, etc.)

  2. Make use of Nomad’s bridge networking and dynamic port mapping, along with the template stanza for managing configuration of services that wish to connect.

  3. Use Consul Connect to create a service mesh through which your services communicate securely. This option may be different from anything you have done before, but IMHO is by far the best choice in terms of security, features, and consistent with the best of industry standards.

  4. Wait for an upcoming version of Nomad, which will include improved features in the service discovery area out of the box.

Hope that helps ~


Thanks a lot for the pointers. Going to explore this in detail. Will keep this forum posted.