[rabbitmq-discuss] Job Server Resource Allocation Help

Alexis Richardson alexis.richardson at gmail.com
Wed Oct 7 22:02:44 BST 2009


Bryan

I assume each job should be completed at most once.

You can achieve something almost like what you want by creating two
queues.  Use one for "paying" and one for "non-paying" jobs by binding
each queue to the (direct) exchange using the keys "paying" and
"nonpaying" respectively.  Assign N servers to the "paying" queue.
Let the remainder consume from both queues using some selection scheme
(eg worker randomly chooses a queue each time a new job is needed).

Many other schemes are possible.  However trying to achieve some total
order (eg 'first come first serve') may be more complex than you
really need.

alexis



On Wed, Oct 7, 2009 at 9:40 PM, Bryan Murphy <bmurphy1976 at gmail.com> wrote:
> We have paying and non-paying customers.  We want to have a pool of servers,
> where a fixed percentage of the servers are dedicated to processing jobs
> from paying customers only.  The remaining servers will process jobs from
> both paying and non-paying customers on a first come first serve basis.
>
> Each job is very CPU sensitive.  We never want more than one job running per
> CPU, and each job should run one time.
>
> Down the road, we'll want to dedicate servers to specific customers, but we
> don't need to solve that now.
>
> Is there a simple way to do this (using the .NET client)?
>
> Thanks,
> Bryan
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>




More information about the rabbitmq-discuss mailing list