Writing a standalone http request handler

R

Ram Prasad

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
 
G

Gene

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.
 
N

Nobody

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top