[Company Logo Image]
So you think my site is ugly? Customize it.

Home ] Up ] Feedback ] Contents ] Customize Look ]
Up ] Documentation ] Download ] [ Directives ]

 

 

fcgi_sa.GIF (3579 bytes)

All of the directives are the same as in mod_fastcgi, except with additions to FastCgiServer and FastCgiExternalServer.  For the complete list of directives that are not related to session affinity, see the FastCGI website.

Directives

 

FastCgiServer

Syntax: FastCgiServer filename option option ...
Context: server config

If a FastCgiServer is configured with session affinity, behind the scenes a CGI script is started for each session.  FCGI_SA keeps track of which CGI scripts belong to which clients.

These are the additions and changes to the mod_fastcgi directives for the session affinity patch:

-num_sessions n none
This is the number of sessions that FCGI_SA should start and keep track of for each FastCgiServer.  This takes place of the -processes option, and is critical if exclusive sessions are used. 
-session_timeout n (300 seconds)
This is used in exclusive sessions, to determine how long a client has exclusive rights to a session.  The session is freed after n seconds of inactivity, so other clients can use the session.
-session_style style (shared_sessions)
This determines how the clients are assigned to CGI applications.  If exclusive is specified, then each client has exclusive rights to a CGI application until its session times out.  After timing out, the CGI app is not restarted, so if data must be reset in the app, the app must do so after detecting a new client, either by IP address or cookie.  Be careful with exclusive apps, because they are real resource hogs.  See the docs.  If shared_sessions is specified, then each client is assigned one of the CGI applications by hashing either his IP address or cookie.   The client is always redirected to the same CGI application, but does not have exclusive access.
-session_tracking style (ip_address)
This determines how FCGI_SA keeps track of clients.  If ip_address is specified, then all clients that have the same IP address are treated the same.  If cookies is specified, then a cookie is set on the client, and is used to track the client.   The cookie name is "FCGI_<script name>"
-processes n (1)
This is ignored when using sessions. 
 

FastCgiExternalServer

Syntax: FastCgiExternalServer filename -host hostname:port [-appConnTimeout n]
FastCgiExternalServer filename -socket filename [-appConnTimeout n]
Context: server config

When using external FastCgi servers with session affinity, a little more configuration work must be done.  Given the number of sessions desired (n), and the port desired (p), n external applications must be started, listening to ports p through p + (n - 1).   Sessions are not allowed for external servers that use sockets.

-num_sessions n none
This is the number of sessions that FCGI_SA keeps track of for each FastCgiServer.  This determines which ports to use.  See docs. 
-session_timeout n (300 seconds)
This is used in exclusive sessions, to determine how long a client has exclusive rights to a session.  The session is freed after n seconds of inactivity, so other clients can use the session.
-session_style style (shared_sessions)
This determines how the clients are assigned to CGI applications.  If exclusive is specified, then each client has exclusive rights to a CGI application until its session times out.  After timing out, the CGI app is not restarted, so if data must be reset in the app, the app must do so after detecting a new client, either by IP address or cookie.  Be careful with exclusive apps, because they are real resource hogs.  See the docs.  If shared_sessions is specified, then each client is assigned one of the CGI applications by hashing either his IP address or cookie.   The client is always redirected to the same CGI application, but does not have exclusive access.
-session_tracking style (ip_address)
This determines how FCGI_SA keeps track of clients.  If ip_address is specified, then all clients that have the same IP address are treated the same.  If cookies is specified, then a cookie is set on the client, and is used to track the client.   The cookie name is "FCGI_<script name>"
-host hostname:port none
This is basically the same as the mod_fastcgi directive,except port only determines the first port that the server uses.  See docs.
-socket filename none
Not allowed with sessions.
 

 

Home ] Up ] Documentation ] Download ] [ Directives ]

Send mail to armbrust@tfarmbruster.com with questions or comments about this web site.
Last modified: October 7, 2000