I have a bunch of different RESTful
services running, and they designed to be as much separate, as possible (physically or logically). But sometimes they need to communicate with each other (if available). A long as they are web servers, I use http to deliver messages from one to another, and receive response.
The question is, is http
as a protocol is quite efficient at that? As far as every request requires a new connection, I am concerned for another solution, ready for high-load.
Another thing, say I have 10 instances of services A and only 5 instances of B, and there's an internal load balancer, so when A asks B, balancer gives him the most available B. From that point, I have doubts, if keep-alive
might help here.
Is there a production-ready library for this? Something similar to pub/sub
, when service publishes request, and some free service from certain group processes it, and gives the response? Or, say, when service B pulls service A, the B desires to stick around A for a while for few more request, then searching for the free one.
UPD. I am using tornado
framework (python), with nginx
as load balancer (and plan to use Amazon in future).
Sorry if that question is too broad.
Thank you!