Hi Daniel,
On Mon, Oct 04, 2010 at 11:46:06AM +0200, Daniel Storjordet wrote:
> Hi.
>
> We have the following task:
>
> The webbrowser gets a list of 20 to 100 items to be processed.
> Currently we have 5 processing servers, each with 4 cores. This makes a
> optinal processing capacaty of 4x5=20 at one time.
> Each processing server processes one item at a time.
> The processing of an item can take from 2 seconds to 2 minutes.
> The arcitecture need to be able to scale up to handle many users at once.
>
> My suggestion to solve the task using HAProxy:
>
> * Webrowser open up 10 ajax calls at a time.
> * Each ajax call is processed by haproxy and an available processing
> server is assigned, or put in queue.
> * When a item is processed, the result is displayed on page using
> Javascript, and another ajax call is opened until all items has
> been processed.
> * Keep-alive is enabled to reduce the number of connections to HAProxy.
>
> The developement team however thinks this is the better solution:
>
> * Browser opens a single ajax call to a processing manger server
> with the entire list of items.
> * The Processing manager connects to the processing servers and
> combines the results.
> * Each 20 seconds a new ajax call is opened to the processing
> manager to return any finished items and the result is shown on
> the page.
>
> The development team thinks that creating up to 100 ajax connections per
> user will result in too much overhead. My plan to solve this is by only
> opening 10 ajax calls at one time and use the browsers keep-alive to
> solve the problem.
>
> Would keep-alive work so that only 10 connections will be opened by the
> browser?
Keep-alive on the client side will work, so that's something that can be done. However, even 10 concurrent connections per user can become huge if you have a large number of users.
Regards,
Willy
Received on 2010/10/05 17:04
This archive was generated by hypermail 2.2.0 : 2010/10/05 17:15 CEST