[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: scalability
- From: Tobias Kieslich <tobias@...>
- Date: Mon, 27 Apr 2009 08:27:13 -0700
On Sun, 26 Apr 2009, Louis Mamakos wrote:
>
> There are other protocols and applications other than HTTP to web
> servers. I don't
> understand, for instance, how I'd use lighttpd to build an XMPP server
> that needs
> to manage a large number of TCP connections. Likewise, "business logic"
> need not
> be a heavyweight operation that hits a database, or even a disk arm. An
> XMPP
> server might have lightweight per-connection state in memory for a few
> thousand
> sessions.
>
> Using an alternative to select(), like kqueue() is a huge win because
> you don't
> have to continually pass an indication of interest back and forth across
> the
> kernel system call interface for each invocation. A small change like
> this can
> avoid a lot of complexity in your system in managing multiple instances
> of
> an application.
Fair enough, my example was web specific. The idea of using load
balancers to scale vertically is still valid for a lot of scenarios,
especially when business logic outweighs the processiong time for
connection handling by a long shot. My reply was mainly related to the
original post which I think addressed web application development.
After all, for many of these scenarios select does a better job than
threading or forking (even though that always depends on the particular
task) but if select would have been good enough for everything,
/dev/poll, epoll, kqueue etc. would never have been developed.
-T