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?
Hi @egmanoj, there are a few options for migrating an existing service into Nomad with regard to port management / service discovery.
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.)
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.
Wait for an upcoming version of Nomad, which will include improved features in the service discovery area out of the box.