[collectd] collection4 FastCGI vs. HTTP [was: collection4 nitpicking]

Sebastian Harl sh at tokkee.org
Wed Jun 22 09:42:41 CEST 2011


Hi,

On Wed, Jun 22, 2011 at 05:13:13PM +1000, Trent W. Buck wrote:
> Sebastian Harl wrote:
> >> Secondly, why is FastCGI being used?  My life would be easier if
> >> collection4 was an "app server", i.e. it was a permanently-running
> >> daemon that spoke HTTP to the "real" web server, being a reverse
> >> proxy like varnish, nginx or apache mod_proxy.
> >
> > I suppose, FastCGI has been used as that was (or seemed to be ;-))
> > easier than implementing a stand-alone "app server" talking HTTP.
> 
> A slight acquaintance suggested this can be achieved with libevent:
> 
> 17:05 <SpamapS> twb: In that case, libevent FTW
> 17:06 <SpamapS> full http server code built in.. :)
> 17:06 <twb> I've only ever seen libevent used in rxvt
> 17:07 <SpamapS> twb: recent versions of libevent have evhttp.h ...
> 17:07 <SpamapS> http://monkey.org/~provos/libevent/doxygen-1.4.3/
> 17:07 <SpamapS> twb: you just register a callback per URI, and a default callback for dynamic URI's
> 17:09 <SpamapS> I played around with it a few months ago.. VERY easy to write an HTTP server

Sounds interesting … libevent should have a "good enough" userbase to
provide decent stability ;-)

> My C-fu is pretty darn weak, so if someone else wants to take point on
> this, they're more than welcome.  Otherwise I'll try to look into it
> this week, but most likely I will completely forget about it.

It should be fairly easy to implement the FastCGI / standalone app
supports side-by-side. Implementing a replacement for src/main.c might
do the magic. Imho, that approach should be taken, if possible, to allow
users to chose which mode to use.

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110622/d3c65b15/attachment.pgp>


More information about the collectd mailing list