Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1367

Akka HTTP server timeouts on start

$
0
0

AKKA_VERSION = “2.5.26”
AKKA_HTTP_VERSION = “10.1.10”

Not 100% sure if it is an Akka HTTP issue, but that’s the only think I can think of
Have a high TPS app (2k req/s per server). Request timeout is 150ms
When the app start, the first few requests timeout. Even the status endpoint times out on first request, and it doesn’t really do anything

def rootRoute: Route = statusEndpoint {
    (pathEndOrSingleSlash & get) {
      // For ELB
      complete(StatusCodes.OK)
    }
  }

The akka http binding code is

 Http().bindAndHandle(handler = cors()(routes), interface = Configs.application.httpHostname, port = Configs.application.httpPort) map { binding =>
      logger.info("API is now ready to serve.")
      addGracefulShutdown(binding, repos.validatable)
    }

I don’t see any GC or CPU issues. And my application even preloads all cachese, and starts Database drivers before calling the bind method.
Is it possible that that latency/timeout is introduced by starting Akka Http actors and opening connections?

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1367