SuspensionLimit getConcurrentSuspensionLimit(ClusterApi clusterApi) {
        // Possible service clusters on a node as of 2024-06-09:
        //
        //       CLUSTER ID           SERVICE TYPE                  HEALTH       ASSOCIATION
        //    1  CCN-controllers      container-clustercontrollers  Slobrok      1, 3, or 6 in content cluster
        //    2  CCN                  distributor                   Slobrok      content cluster
        //    3  CCN                  storagenode                   Slobrok      content cluster
        //    4  CCN                  searchnode                    Slobrok      content cluster
        //    5  JCCN                 container                     Slobrok      jdisc container cluster
        //    6  admin                slobrok                       not checked  1-3 in jdisc container cluster
        //    7  metrics              metricsproxy-container        Slobrok      application
        //    8  admin                logd                          not checked  application
        //    9  admin                config-sentinel               not checked  application
        //   10  admin                configproxy                   not checked  application
        //   11  admin                logforwarder                  not checked  application
        //   12  controller           controller                    state/v1     controllers
        //   13  zone-config-servers  configserver                  state/v1     config servers
        //   14  controller-host      hostadmin                     state/v1     controller hosts
        //   15  configserver-host    hostadmin                     state/v1     config server hosts
        //   16  tenant-host          hostadmin                     state/v1     tenant hosts
        //   17  proxy-host           hostadmin                     state/v1     proxy hosts
        //
        // CCN refers to the content cluster's name, as specified in services.xml.
        // JCCN refers to the jdisc container cluster's name, as specified in services.xml.
        //
        // For instance a content node will have 2-4 and 7-11 and possibly 1, while a combined
        // cluster node may have all 1-11.
        //
        // The services on a node can be categorized into these main types, ref association column above:
        //   A  content
        //   B  container
        //   C  tenant host
        //   D  config server
        //   E  config server host
        //   F  controller
        //   G  controller host
        //   H  proxy (same as B)
        //   I  proxy host

        Optional<SuspensionLimit> override = clusterApi.clusterPolicyOverride().getSuspensionLimit();
        if (override.isPresent()) {
            return override.get();
        }

        if (clusterApi.serviceType().equals(ServiceType.CLUSTER_CONTROLLER)) {
            return SuspensionLimit.fromAllowedDown(1);
        }

        if (Set.of(ServiceType.STORAGE, ServiceType.SEARCH, ServiceType.DISTRIBUTOR)
                .contains(clusterApi.serviceType())) {
            // Delegate to the cluster controller
            return SuspensionLimit.fromAllowedDownRatio(1);
        }

        if (clusterApi.serviceType().equals(ServiceType.CONTAINER)) {
            return SuspensionLimit.fromAllowedDownRatio(0.1);
        }

        if (VespaModelUtil.ADMIN_CLUSTER_ID.equals(clusterApi.clusterId())) {
            if (ServiceType.SLOBROK.equals(clusterApi.serviceType())) {
                return SuspensionLimit.fromAllowedDown(1);
            }

            return SuspensionLimit.fromAllowedDownRatio(1);
        } else if (ServiceType.METRICS_PROXY.equals(clusterApi.serviceType())) {
            return SuspensionLimit.fromAllowedDownRatio(1);
        }

        if (Set.of(ServiceType.CONFIG_SERVER, ServiceType.CONTROLLER).contains(clusterApi.serviceType())) {
            return SuspensionLimit.fromAllowedDown(1);
        }

        if (clusterApi.serviceType().equals(ServiceType.HOST_ADMIN)) {
            if (Set.of(ClusterId.CONFIG_SERVER_HOST, ClusterId.CONTROLLER_HOST).contains(clusterApi.clusterId())) {
                return SuspensionLimit.fromAllowedDown(1);
            }

            return zone.system().isCd()
                    ? SuspensionLimit.fromAllowedDownRatio(0.5)
                    : SuspensionLimit.fromAllowedDownRatio(0.2);
        }

        // The above should cover all cases, but if not we'll return a reasonable default:
        return SuspensionLimit.fromAllowedDownRatio(0.1);
    }
@Test
    public void testDefaultSuspensionLimit() {
        when(applicationApi.applicationId()).thenReturn(ApplicationId.fromSerializedForm("a:b:c"));
        when(clusterApi.clusterId()).thenReturn(new ClusterId("some-cluster-id"));
        when(clusterApi.serviceType()).thenReturn(new ServiceType("some-service-type"));
        assertEquals(SuspensionLimit.fromAllowedDownRatio(0.1),
                     policy.getConcurrentSuspensionLimit(clusterApi));
    }