[Xitami] Quick CGI question

Thomas J. Hruska xitami@lists.xitami.org
Fri, 02 Aug 2002 16:19:26 -0400


At 10:23 AM 8/2/2002 -0700, Jeff Hamblin writeth:
>I'm using Win32 executables as CGI apps. So far
>all of the routines execute in a few milliseconds, but
>I have some routines to develop that will take longer.
>
>Does Xitami serialize CGI requests, or does it load
>a separate instance of the CGI exe? And can the
>server continue to process other web requests
>while a CGI is executing?

Xitami does not serialize CGI requests.  This is partially why there is a
DoS/DDoS issue with it.  However, Xitami will continue to process
additional requests while a CGI is executing.  Basically, Xitami will start
a CGI request if it receives one without considering the consequences of
starting another CGI.  Many people on this list have solved this problem by
moving CGIs to a separate machine in production environments (2 PCs running
Xitami...one with CGI capabilities, the other with CGIs disabled).  So, if
one machine gets DoS'ed, the other can continue handling normal requests.

>For example: say I have a complex CGI routine that
>takes 5 to 10 seconds to complete. 1 second after
>a 1st user launches such a routine, a 2nd user does
>the same. Does Xitami respond to the 2nd user
>immediately and launch another of instance of the
>CGI exe?

Well, immediately is somewhat relative.  CGIs on any web server take a very
long time to start up in relation to just dumping a file onto a socket
connection.  Each CGI operates in separate instances of the application
being run.  This means that the process list in, say, Task Manager will
have a 'mycgi.exe' (or whatever it is called) for each instance of the CGI
that is running.

Hope this helps!


          Thomas J. Hruska -- shinelight@shininglightpro.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
                  http://www.shininglightpro.com/