### Description

The health API response can become a few MBs (2-3MB if 50K indices are affected).

In less extreme situations the response can be in the 10s/100s of KB. 

It might be worthwhile looking into chunking its response (this might provide clients with a better experience too)
server/src/main/java/org/elasticsearch/health/Diagnosis.java
}
    }
    /**
     * Details a diagnosis - cause and a potential action that a user could take to clear an issue identified by a {@link HealthService}.
     *
     * @param indicatorName The name of the health indicator service that will generate this diagnosis
     * @param id An identifier unique to this diagnosis across the health indicator that generates it
     * @param cause A description of the cause of the problem
     * @param action A description of the action to be taken to remedy the problem
     * @param helpURL Optional evergreen url to a help document
     */
    public record Definition(String indicatorName, String id, String cause, String action, String helpURL) {}
    @Override
    public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject();
        builder.field("id", HEALTH_API_ID_PREFIX + definition.indicatorName + ":diagnosis:" + definition.id);
        builder.field("cause", definition.cause);
        builder.field("action", definition.action);
        if (affectedResources != null && affectedResources.size() > 0) {
            builder.startObject("affected_resources");
            for (Resource affectedResource : affectedResources) {
                affectedResource.toXContent(builder, params);
            }
            builder.endObject();
        }
        builder.field("help_url", definition.helpURL);
        return builder.endObject();
    }
}