### 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
if (event.state().nodes().getMasterNodeId() == null) {
                    oldMasterNodeSteppedDown.countDown();
                }
            });
            internalCluster().clearDisruptionScheme();
            internalCluster().setDisruptionScheme(masterNodeDisruption);
            logger.info("--> freezing node [{}]", oldMasterNode);
            masterNodeDisruption.startDisrupting();
            
            assertBusy(() -> {
                for (final Map.Entry<String, List<Tuple<String, String>>> entry : masters.entrySet()) {
                    final List<Tuple<String, String>> transitions = entry.getValue();
                    assertTrue(entry.getKey() + ": " + transitions, transitions.stream().anyMatch(transition -> transition.v2() != null));
                }
            });
            
            final String newMasterNode = internalCluster().getMasterName(majoritySide.get(0));
            logger.info("--> new detected master node [{}]", newMasterNode);
            
            logger.info("--> unfreezing node [{}]", oldMasterNode);
            masterNodeDisruption.stopDisrupting();
            oldMasterNodeSteppedDown.await(30, TimeUnit.SECONDS);
            logger.info("--> [{}] stepped down as master", oldMasterNode);
            ensureStableCluster(3);
            assertThat(masters.size(), equalTo(2));
        }
        List<String> nodeNamesExceptFirstMaster = Arrays.stream(internalCluster().getNodeNames())
            .filter(name -> name.equals(firstMaster) == false)
            .toList();
        /*