I am making a high-load web statistics system through embedding <img>
tag to site. The thing I want to do is:
- nginx gets request for an image from some host
- it gives as answer to host little 1px static image from filesystem
- at this time it somehow transfers request's headers to application and closes connection to host
I am working with Ruby and I'm going to make a pure-Rack app to get the headers and put them into a queue for further calculations.
The problem I can't solve is, how can I configure sphinx to give headers to the Rack app, and return a static image as the reply without waiting a for response from the Rack application?
Also, Rack is not required if there is more common Ruby-solution.