I'm looking for some design oriented "I don't want to re-invent the wheel" type advice. I have a situation where multiple 'producers' on my quick and dirty servers (A,B,C,D,E) send asynchronous HTTP requests to a virtual IP address hosted on a load balancer which distributes the requests fairly across some slow and chunky closed VB 'consumers' on servers (X1, X2, X3, Y1, Y2, Y3, Z1, Z2, Z3). This is all fine and dandy and works a treat with LWP::UserAgent requests.
Whilst those requests are roughly the same, some of them are paid for and some are free. Therefore I would like to prioritise the paid for requests over the free requests - especially when the 'producers' get busy. I have considered dedicating some of the 'consumers' for paid for requests but this is less than efficient and doesn't handle peaks in free/paid request categories very well.
In this Internet age if you can think it then someone has done it, so I naturally thought of Perl. So I did some CPAN searching and came across the POE and POE::Queue::Array modules. I read around a bit on the success stories and examples and these modules look like a great starting point.
One solution, as I see it, is a piece of POE enabled perl-middleware sitting between my 'producers' and the 'consumers' sitting behind the load balanced virtual IP (VIP). The middleware would receive the asynchronous requests into a queue and leapfrog any paid-for requests over any free-requests before sending the requests onto the 'consumers' via the VIP.
Am I right to suspect that this is something that could be built using POE? Are there any Monks out there with any advice either way?
Cheers...
In reply to Handling Multi-Priority Requests by Wibble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |