### 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/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java
for (Map.Entry<String, List<Tuple<String, String>>> entry : masters.entrySet()) {
            String nodeName = entry.getKey();
            List<Tuple<String, String>> transitions = entry.getValue();
            assertTrue(
                "[" + nodeName + "] should not apply state from old master [" + oldMasterNode + "] but it did: " + transitions,
                transitions.stream().noneMatch(t -> oldMasterNode.equals(t.v2()))
            );
        }
        assertGreenMasterStability(internalCluster().client());
    }
    /**
     * This helper method creates a 3-node cluster where all nodes are master-eligible, and then simulates a long GC on the master node 5
     * times (forcing another node to be elected master 5 times). It then asserts that the master stability health indicator status is
     * YELLOW, and that expectedMasterStabilitySymptomSubstring is contained in the symptom.
     * @param expectedMasterStabilitySymptomSubstring A string to expect in the master stability health indicator symptom
     * @throws Exception
     */
    public void testRepeatedMasterChanges(String expectedMasterStabilitySymptomSubstring) throws Exception {
        final List<String> nodes = internalCluster().startNodes(
            3,
            Settings.builder()
                .put(LeaderChecker.LEADER_CHECK_TIMEOUT_SETTING.getKey(), "1s")
                .put(Coordinator.PUBLISH_TIMEOUT_SETTING.getKey(), "1s")
                .put(CoordinationDiagnosticsService.IDENTITY_CHANGES_THRESHOLD_SETTING.getKey(), 1)
                .put(CoordinationDiagnosticsService.NO_MASTER_TRANSITIONS_THRESHOLD_SETTING.getKey(), 100)
                .build()
        );
        ensureStableCluster(3);
        String firstMaster = internalCluster().getMasterName();