Can I use Kafka queue in my Rest WEBSERVICE -


i have rest based application deployed in server(tomcat) , every request comes server takes 1 second of time serve, have issue, server receive more request capable of serving making server non responsive. thinking if can store requests in queue server can pull request , serve request , handle pick time issue.

now thinking can kafka helpful this, if yes pointer can start.

you can use kafka (or other messaging system ex- activemq, rabbitmq etc).

when webservice receives request, add request (with details required process it) in kafka queue (using kafka message producer details)

separate service (having kafka consumer details) read topic(queue) , process it.

in case need send message client when request processed, server can push information client using websocket (or client can poll request status need request status endpoint , cause load on endpoint).


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -