Meta information on Allocations

Hello everyone!

We’d like to use Nomad to schedule FaaS (Function-as-a-Service) like executions. To improve the response time for the user, we want to prewarm environments, i.e. we have a count of let’s say 100 environments that are running idle and waiting to be used. Currently we have one job with one task which represents an environment, e.g. a Python environment. To run, e.g. a Python file supplied by a user, we use the exec functionality of allocations and execute it.

Here comes my question. Is it possible to somehow mark an allocation as in use and retrieve only allocations that are not marked as in use to avoid running two functions in the same container?

One way that comes to my mind is a feature that is known as Labels in Kubernetes. I found that Nomad supports the meta stanza for meta information, but that is not available on the allocation level.