# How to use user placeholder properly when there are multiple profiles for single user

**URL:** <https://discourse.jupyter.org/t/how-to-use-user-placeholder-properly-when-there-are-multiple-profiles-for-single-user/11817>\
**Category:** JupyterHub\
**Tags:** jupyterhub, how-to, help-wanted\
**Created:** [November 23, 2021, 2:06pm UTC](https://discourse.jupyter.org/t/how-to-use-user-placeholder-properly-when-there-are-multiple-profiles-for-single-user/11817 "2021-11-23T14:06:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![railsonsousa106](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/railsonsousa106/32/5778_2.png) [@railsonsousa106](https://discourse.jupyter.org/u/railsonsousa106)\
**Post date:** [November 23, 2021, 2:06pm UTC](https://discourse.jupyter.org/t/how-to-use-user-placeholder-properly-when-there-are-multiple-profiles-for-single-user/11817/1 "2021-11-23T14:06:15Z")

</div>

I found user placeholder configuration very useful, when I want to guarantee the users don’t have to wait for a new node to be prepared, when they request jupyterhub instance.  
This works like a charm, when I’m using single profile for the user.  
But I can’t figure out how to do the same thing when there are multiple profiles.

I have two different profiles.

- jupyter-medium: which has minimum 4G memory, and 1 CPUs, which is expandable up to 8G memory, and 2 CPUs.
- jupyter-large: which has minimum 8G memory, and 2 CPUs, which is expandable up to 16G memory, and 4 CPUs.

```auto
singleuser:
  profileList:
    - display_name: "IO Lab - Large"
      description: "Standard environment - guaranteed 2 Cores / 8GB RAM, burstable up to 4 Cores / 16GB RAM"
      kubespawner_override:
        node_affinity_required:
        - matchExpressions:
          - key: podaffinity
            operator: In
            values:
            - iolab-large
        cpu_guarantee: 2
        cpu_limit: 4
        mem_guarantee: "8G"
        mem_limit: "16G"
        start_timeout: 1200
    - display_name: "IO Lab - Medium"
      description: "Standard environment - guaranteed 1 Core / 4GB RAM, burstable up to 2 Cores / 8GB RAM"
      default: true
      kubespawner_override:
        node_affinity_required:
        - matchExpressions:
          - key: podaffinity
            operator: In
            values:
            - iolab-medium
        cpu_guarantee: 1
        cpu_limit: 2
        mem_guarantee: "4G"
        mem_limit: "8G"
        start_timeout: 1200

```

I have two different node groups defined on AWS EKS cluster.  
Here is the TF configuration for those node groups.

```auto
node_groups = {
    "iolab_medium" = {
      name = "iolab-medium"
      desired_capacity = 1
      min_capacity = 1
      max_capacity = 64

      instance_types = ["m5.large"]
      k8s_labels = {
        "hub.jupyter.org/node-purpose" = "user"
        "podaffinity" = "iolab-medium"
      }
      taints = [
        {
          key = "hub.jupyter.org/dedicated"
          value = "user"
          effect = "NO_SCHEDULE"
        }
      ]
      tags = {
        "k8s.io/cluster-autoscaler/${local.name}" : "owned"
        "k8s.io/cluster-autoscaler/enabled" : "true"
      }
    }
    "iolab_large" = {
      name = "iolab-large"
      desired_capacity = 1
      min_capacity = 1
      max_capacity = 64

      instance_types = ["m5.xlarge"]
      k8s_labels = {
        "hub.jupyter.org/node-purpose" = "user"
        "podaffinity" = "iolab-large"
      }
      taints = [
        {
          key = "hub.jupyter.org/dedicated"
          value = "user"
          effect = "NO_SCHEDULE"
        }
      ]
      tags = {
        "k8s.io/cluster-autoscaler/${local.name}" : "owned"
        "k8s.io/cluster-autoscaler/enabled" : "true"
      }
    }

```

And I have enabled `userPlaceholder` setting with one placeholder replicas.

```auto
scheduling:
  userScheduler:
    enabled: true
  podPriority:
    enabled: true
  userPlaceholder:
    enabled: true
    replicas: 1
  userPods:
    nodeAffinity:
      matchNodePurpose: require

```

What I want to do is to make this `userPlaceholder` working properly with two different profiles. In other words, when a user requests a `iolab-large` instance, K8S should assign that user pod to a placeholder pod which has `iolab-large` profile, and when a user requests a `iolab-medium` instance, K8S should assign that user pod to a placeholder pod which has `iolab-medium` profile.

Is there a way to configure placeholder pods to be running on both `iolab-large`, `iolab-medium` node groups, so that we can guarantee the users don’t have to wait until a new node has spawn up?

Thanks for your help in advance.
