The api frontend should handle many concurrent requests that access the api from HTTP. The complete request (body and HTTP headers) are forwarded to AMQP, using the url/path address a a routing key. The HTTP headers can be used as AMQP message properties.
The processing chain of HTTP/AMQP should be non-blocking on both the api frontend and services. The incoming HTTP requests, relayed AMQP requests, and the AMQP / HTTP responses must be correlated using an identifier. The frontend can keep a queue of HTTP request using the correlation_id to match AMQP responses.
Using two different events to retrieve data provides an easy way to track the response time of a particular service, allowing us to specify auto-scaling criteria on a per-service basis
From #27: