users@glassfish.java.net

Re: simple servlet throttling

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 15 Jul 2008 11:55:28 -0400

Salut,

glassfish_at_javadesktop.org wrote:
> Salut Jeanfrancois;
>
> with [1], I understand if you have 3 servlet answering to 3 different type of requests, you can share resources amongsts them. like 50% goes to servlet a, and servlet b and c can get 25% each. is this correct?

Indeed.

>
> what i need is : each session owner (client) can make maximum of 4 request per second. or some rule like that.

OK you can probably extends Grizzly and plug your own Grizzly's Rule
(the blog use the ContextPathRulefor doing that. But your application
will only works with GlassFish, which is not the perfect solution.
Instead, you should write a Filter so your application will not loose
its backward compatibility.

Still, I can help you writing your own rule if you are interested. Let's
just move that discussion at users_at_dev.grizzly.dev.net so other
grizzlies can also help :-)

Thanks!

-- Jeanfrancois




>
> Best.
> -C.B.
> [Message sent by forum member 'segfault2007' (segfault2007)]
>
> http://forums.java.net/jive/thread.jspa?messageID=286763
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>