private void updateRTCache() throws Exception {
        Map<String, RTSGroupInfo> groupInfoMap = new HashMap<>();
        List<String> hostWithRTS = new ArrayList<>();

        Map<String, HostSegmentInfo> hostRTSInfos = rtsRefresher.refresh();

        for (Map.Entry<String, HostSegmentInfo> e : hostRTSInfos.entrySet()) {
            String host = e.getKey();
            HostSegmentInfo hostInfo = e.getValue();
            boolean isLocalHost = Strings.equals(host, this.hostName);
            for (RTSGroupInfo info : hostInfo.rtsGroupInfos) {
                if (isLocalHost) {
                    RTSGroup rtsg = localRealtimeTable.rtsGroups().get(info.name());
                    if (rtsg == null) {
                        logger.warn("rtsg not found in localhost. [host: {}, rtsg: {}]", host, info.name());
                        continue;
                    }
                    info.setRTSGroup(rtsg);
                }
                groupInfoMap.put(info.name(), info);
            }
            if (hostInfo.rtsGroupInfos.size() > 0) {
                hostWithRTS.add(host);
            }
        }

        this.rtsGroupInfoMap = groupInfoMap;
        this.rttNodes = hostWithRTS;
    }
This segment pool cache all realtime segment fds.
indexr-server/src/main/java/io/indexr/server/rt/RealtimeSegmentPool.java