private HttpResponse status(HttpRequest request) {
        String hostHeader = request.getHeader("host");
        String hostname = withoutPort(hostHeader);
        Optional<RoutingTable.Target> target = tableSupplier.get().flatMap(table -> table.targetOf(hostname, RoutingMethod.sharedLayer4));

        if (target.isEmpty())
            return response(404, hostHeader, "", ROTATION_UNKNOWN_MESSAGE);

        if (!target.get().active())
            return response(404, hostHeader, "", ROTATION_INACTIVE_MESSAGE);

        String upstreamName = target.get().id();

        if (!routingStatus.isActive(upstreamName))
            return response(404, hostHeader, upstreamName, ROTATION_UNAVAILABLE_MESSAGE);

        if (!healthStatus.servers().isHealthy(upstreamName))
            return response(502, hostHeader, upstreamName, ROTATION_UNHEALTHY_MESSAGE);

        return response(200, hostHeader, upstreamName, ROTATION_OK_MESSAGE);
    }
This handler implements the /akamai health check.

The global routing service polls /akamai to determine if a deployment should receive requests via its global
endpoint.

@author oyving
@author Martin Polden
@author Torbjorn Smorgrav
@author Wacek Kusnierczyk
routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/restapi/AkamaiHandler.java