Writing a standalone http request handler

Discussion in 'C Programming' started by Ram Prasad, Nov 24, 2010.

  1. Ram  Prasad

    Ram Prasad Guest

    This is slightly OT
    I have a requirement to handle a huge number of http connections and
    syslog the input after text parsing. I get around 20 Million requests
    within 8 hours. Currently I have a C program in Apache-CGI, But I need
    to optimize because apache takes up most of the resources available.

    Would it be better If I write the program as a server instead running
    a stripped down http request handler, because I wont have any
    overheads of apache. This is a controlled environment so I really dont
    need all features of apache.

    Or should I use a bare-bones alternative http server

    If I were to write my own server , Is there a direct http server
    Library I can use.


    Thanks
    Ram
     
    Ram Prasad, Nov 24, 2010
    #1
    1. Advertising

  2. Ram  Prasad

    Gene Guest

    On Nov 24, 10:54 am, Ram Prasad <> wrote:
    > This is slightly OT
    > I have a requirement to handle a huge number of http connections and
    > syslog the input after text parsing. I get  around 20 Million requests
    > within 8 hours. Currently I have a C program in Apache-CGI, But I need
    > to optimize because apache takes up most of the resources available.
    >
    > Would it be better If I write the program as a server instead running
    > a stripped down http request handler, because I wont have any
    > overheads of apache. This is a controlled environment so I really dont
    > need all features of apache.
    >
    > Or should I use a bare-bones alternative http server
    >
    > If I were to write my own server , Is there a direct http server
    > Library I can use.


    Coding your own server is almost never a good idea. So this isn't a C
    question. Write an a Apache group. They'll probably tell you to stop
    using CGI and switch to one of the modxxx modules. CGI is terribly
    inefficient because it spawns one process per hit.
     
    Gene, Nov 24, 2010
    #2
    1. Advertising

  3. Ram  Prasad

    Nobody Guest

    On Wed, 24 Nov 2010 07:54:01 -0800, Ram Prasad wrote:

    > I have a requirement to handle a huge number of http connections and
    > syslog the input after text parsing. I get around 20 Million requests
    > within 8 hours. Currently I have a C program in Apache-CGI, But I need to
    > optimize because apache takes up most of the resources available.


    CGI or FastCGI? CGI is going to have very high overhead at 700
    requests/second.
     
    Nobody, Nov 25, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,103
    John Saunders
    Oct 16, 2003
  2. mike
    Replies:
    5
    Views:
    982
    Keith M. Corbett
    Sep 21, 2004
  3. Replies:
    0
    Views:
    365
  4. Christopher Stawarz

    Standalone HTTP parser?

    Christopher Stawarz, May 31, 2007, in forum: Python
    Replies:
    0
    Views:
    320
    Christopher Stawarz
    May 31, 2007
  5. =?Utf-8?B?SmVycnkgSg==?=

    No http handler was found for request type 'GET'

    =?Utf-8?B?SmVycnkgSg==?=, Sep 13, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    796
    =?Utf-8?B?SmVycnkgSg==?=
    Sep 13, 2007
Loading...

Share This Page