[PATCH 0/2] Re: Priority based queuing

2018-05-11 Thread Patrick Hemmer
Ok, so here is the full submission for priority based queuing. Notes since previous update: Wasn't really able to optimize the tree search any. Tried a few things, but nothing made a measurable performance difference. I added a warning message and documentation making clear the issues with

[PATCH 0/2] Re: Priority based queuing

2018-05-09 Thread Patrick Hemmer
On 2018/5/5 13:55, Willy Tarreau wrote: > On Sat, May 05, 2018 at 01:33:51PM -0400, Patrick Hemmer wrote: >>> Also I'm thinking that we can even use 32-bit by putting the frontier >>> between the date and the fixed priority (let's call it class) somewhere >>> else : >>> - 8 bit class + 24 bit

Re: Priority based queuing

2018-05-05 Thread Willy Tarreau
On Sat, May 05, 2018 at 01:33:51PM -0400, Patrick Hemmer wrote: > > Also I'm thinking that we can even use 32-bit by putting the frontier > > between the date and the fixed priority (let's call it class) somewhere > > else : > > - 8 bit class + 24 bit offset => 256 classes and +/- 2.3 hours

Re: Priority based queuing

2018-05-05 Thread Patrick Hemmer
On 2018/5/5 01:29, Willy Tarreau wrote: > On Fri, May 04, 2018 at 06:49:00PM -0400, Patrick Hemmer wrote: >> I'm not quite following the need for multiple queues. Why wouldn't you >> just have one sorted queue, where if multiple pending requests have the >> same priority, then they're FIFO. >

Re: Priority based queuing

2018-05-04 Thread Willy Tarreau
On Fri, May 04, 2018 at 06:49:00PM -0400, Patrick Hemmer wrote: > I'm not quite following the need for multiple queues. Why wouldn't you > just have one sorted queue, where if multiple pending requests have the > same priority, then they're FIFO. That's what the time-ordered queue does. I

Re: Priority based queuing

2018-05-04 Thread Patrick Hemmer
On 2018/5/2 22:56, Willy Tarreau wrote: > On Wed, May 02, 2018 at 04:29:33PM -0400, Patrick Hemmer wrote: >> I think you're misunderstanding my design, as scoring wouldn't work like >> this at all. If you give the gold class a score of 1000 (where higher >> number means higher priority), then

Re: Priority based queuing

2018-05-02 Thread Patrick Hemmer
On 2018/5/2 16:29, Patrick Hemmer wrote: > > > On 2018/5/2 13:22, Willy Tarreau wrote: >> On Wed, May 02, 2018 at 12:44:06PM -0400, Patrick Hemmer wrote: >>> Can you elaborate on what you're thinking of for a time-based queue? >>> >>> What I'm imagining you mean is that you would write a rule to

Re: Priority based queuing

2018-05-02 Thread Willy Tarreau
On Wed, May 02, 2018 at 04:29:33PM -0400, Patrick Hemmer wrote: > I think you're misunderstanding my design, as scoring wouldn't work like > this at all. If you give the gold class a score of 1000 (where higher > number means higher priority), then the only thing that would get > processed before

Re: Priority based queuing

2018-05-02 Thread Patrick Hemmer
On 2018/5/2 13:22, Willy Tarreau wrote: > On Wed, May 02, 2018 at 12:44:06PM -0400, Patrick Hemmer wrote: >> Can you elaborate on what you're thinking of for a time-based queue? >> >> What I'm imagining you mean is that you would write a rule to set the >> max queue time, and haproxy would

Re: Priority based queuing

2018-05-02 Thread Willy Tarreau
On Wed, May 02, 2018 at 12:44:06PM -0400, Patrick Hemmer wrote: > Can you elaborate on what you're thinking of for a time-based queue? > > What I'm imagining you mean is that you would write a rule to set the > max queue time, and haproxy would insert it into the queue sorting on > TIME_NOW() +

Re: Priority based queuing

2018-05-02 Thread Patrick Hemmer
On 2018/5/2 11:04, Willy Tarreau wrote: > On Tue, May 01, 2018 at 09:34:14PM -0400, Patrick Hemmer wrote: >> Would it be possible to add priority based queuing to haproxy? By this I >> mean that when a server/backend is full (maxconn), that incoming >> requests would be added to the queue in a

Re: Priority based queuing

2018-05-02 Thread Willy Tarreau
On Tue, May 01, 2018 at 09:34:14PM -0400, Patrick Hemmer wrote: > Would it be possible to add priority based queuing to haproxy? By this I > mean that when a server/backend is full (maxconn), that incoming > requests would be added to the queue in a custom order. The idea here is > that when the