Can I run both nomad client and server on the same machine?

I have three physical machines and I am trying to run one of the machine in both client and server mode. I know this is weird but the load is not critical so wanted to have same machine to run in both server and client role. The machines are powerful enough to do that.

Thanks!

It is strongly recommended not to operate a node as both client and server, although this is supported to simplify development and testing.

3 Likes

Thanks for your response. I figured that out and implemented, it’s running fine.

@dExecutioner

Pro Tip Idea: be sure to specify a different node_class to the client on the nomad server.

Also, do check up on reserving CPU, memory, etc (in the nomad agent config) on the server node so the actual server process does not get squeezed!!! :slight_smile:

2 Likes

Hi,

Could you please elaborate why the strong recommendation against?
There might be cases where running both client and server is reasonable.

Without the why, people can’t decide for themselves.

Thanks,
Eugen

2 Likes

Can you explain how you managed that?

EDIT: Turns out you just run the nomad executable twice, once as a server and once against as a client.

Errr … no, the same binary can run as server and client you need to enable the client stanza, in addition to the server stanza.

how do yo run client and server with same agent if documentation recommends running client as root and server as nomad user?

Does it mean that minimum nomad cluster requires minimum of 5 instances? 3 server + 2 clients? This gets quite pricey for just to start with. I probably didn’t include additional consul cluster. What are the risks of running just 2 servers?

For servers 4-8+ cores, 16-32 GB+ of memory, 40-80 GB+ of fast disk and significant network bandwidth. So far we are also struggling to find easy & manageable container orchestration just to start with.

i assume it’s also possible to run 3 machines, with nomad in both client+server mode on each to provide resiliency against downed machines on day 1, before scaling warrants a real cluster?