This is exactly two levels of differentiation.  Why not do prefix matching and support an arbitrary number of levels?  I can imagine situations where we'd want to differentiate on region, AZ, datacenter, rack, chassis (for pandaboards), core, docker instance, etc.  This would be useful in rescheduling after transient failure, too: try to reschedule on a worker with a minimal common prefix to the worker which generated the transient failure.