scala - How protect spray application from overloading? -
scala - How protect spray application from overloading? -
i have next clear algorithm:
client sends request spray application. spray receives request , see spray receiving load multiple requests come in. if loading high, spray returns http 503; otherwise starts processing request.how can manage current spray loading?
also, understand spray uses akka internally can extended adding additional nodes, how can manage load additional nodes?
spray uses reactive i/o , can handle high loads, higher custom code "protecting" handle. don't worry trying protect spray scheme itself. if you've got complex processing logic might take while handle requests, might create sense set protective throttle around processing logic, using http://letitcrash.com/post/28901663062/throttling-messages-in-akka-2 . , in case queue total can complete(statuscodes.serviceunavailable)
.
scala akka load-balancing spray
Comments
Post a Comment