Use the count of healthy dependencies to choose a primary, fallback, or cache route.

Dependency Fallback Remediation Report

DependencyFallbackRemediationReport.java
public class DependencyFallbackRemediationReport {
    public static void main(String[] args) {
        int healthyDeps = ;
        int totalDeps = 3;
        int degraded = totalDeps - healthyDeps;
        String route = "primary";

        if (healthyDeps < totalDeps) {
            route = "fallback";
        }
        if (healthyDeps == 0) {
            route = "cache";
        }

        System.out.println("healthy=" + healthyDeps + " degraded=" + degraded + " route=" + route);
    }
}
public class DependencyFallbackRemediationReport {
    public static void main(String[] args) {
        int healthyDeps = ;
        int totalDeps = 3;
        int degraded = totalDeps - healthyDeps;
        String route = "primary";

        if (healthyDeps < totalDeps) {
            route = "fallback";
        }
        if (healthyDeps == 0) {
            route = "cache";
        }

        System.out.println("healthy=" + healthyDeps + " degraded=" + degraded + " route=" + route);
    }
}
public class DependencyFallbackRemediationReport {
    public static void main(String[] args) {
        int healthyDeps = ;
        int totalDeps = 3;
        int degraded = totalDeps - healthyDeps;
        String route = "primary";

        if (healthyDeps < totalDeps) {
            route = "fallback";
        }
        if (healthyDeps == 0) {
            route = "cache";
        }

        System.out.println("healthy=" + healthyDeps + " degraded=" + degraded + " route=" + route);
    }
}
route fallback The route degrades from primary to fallback to cache as healthy dependencies drop away.