How does nomad handle burstable instances?

How does nomad handle burstable instances in AWS?

Will it let the containers burst above the expected CPU resource limit?

CPU bursting on these sort of instances is opaque to the kernel, so the instance will be fingerprinted as though it has the full CPU available to it (and not the 20% cap or whatever that particular instance type has). Once the allocation is placed the exact behavior of CPU isolation depends on the task driver but typically the task will be given cpu shares controlled by cgroups. This means that the task will take up whatever CPU is made available to it – if the host is super lightly loaded the task will get most of the CPU.

However, I would strongly recommend against running Nomad clients on burstable instances outside of development or testing. If the instance is throttled, it’s possible for the Nomad client to lose out on enough CPU cycles that it misses its heartbeat. At that point, the server will consider the client lost and reschedule all its work elsewhere. (And running a Nomad server on burstable instances is even worse, as you’ll end up with leadership flapping.)