View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
The number of running channels is not directly related to the number of users, but rather to the number of simultaneous requests.  Users are not "connected" to the application, but rather exchange information with the server via HTTP requests.  Users send requests on the server whenever they click on a link, or submit button.  Each channel is a separate instance of VFP and can only execute a single request at a time.  Whenever a FoxWeb request is received by the Web server, it is passed on to the FoxWeb Broker, which assigns it to the next available channel.  If all channels are in use, then the request is queued and is served as soon as a channel becomes available.  This is transparent to users, who simply receive the requested data as soon as the request is executed by FoxWeb.
You are right in that FoxWeb can only serve up to the same number of requests as you have open channels at the same time.  However, this does not mean that any additional requests would be discarded.  As the FoxWeb documentation explains, if you run too many simultaneous requests performance can actually suffer.
An additional factor you must consider is that the buffer memory is divided between open FoxWeb channels.  This means that if you are running too many channels you will end up with much less buffer memory available for each request, which can slow down complex queries.
The current version of the documentation recommends 2-3 channels per CPU as a rule of thumb, but we are actually finding that with the latest version of FoxWeb, as well as newer hardware and operating systems, you may get better performance if you run up to 5 channels per CPU.  It really all depends on your specific server and scripts.  FoxWeb 3.0 will remove the 9-channel limit, so you will be able to run more channels on servers that can actually handle it.
For reference I'm including two sections from our documentation:
FoxWeb Channels
A FoxWeb channel is actually another instance of the VFP portion of FoxWeb (fwserver.exe). Every user request starts a new foxweb.exe process (or a new thread if you are using the ISAPI stub), but multiple simultaneous requests can be served by a single channel. Multiple channels allow you to serve requests simultaneously. When the number of requests exceeds the number of channels, then all additional requests are queued and are served by the first available channel.
If you are running too many channels (a rule of thumb is 2-3 channels maximum per processor) then you may be hurting performance. If nine requests hit a single-CPU server at exactly the same instance then the overall time of response will be better if you are running 3 channels than if you are running 9.
The optimum number of channels depends on a lot of factors, including what your programs do, the operating system, the server hardware, the amount of memory, the web server software, etc. Furthermore, as I explain above, requests are not rejected, but are queued for processing. The best way to determine how many channels give you the best performance is to experiment on the actual server environment.
Concurrent Users:
It is a mistake to measure load on the server in terms of concurrent users. Unlike other protocols, HTTP, the protocol that carries Web traffic does not keep a live connection between a web-based application and its users. Users are not "logged in", but rather initiate a connection when they click on a hyper-link. The connection is broken once the request is served. The whole process typically takes a fraction of a second.
A more appropriate measure of a server's load is requests per hour. A well-written FoxWeb application running on a mid-range server should be able to handle at least 10 requests per second. Assuming a constant load, this number translates to almost 40,000 hits per hour. A high-end server can handle much more (FoxWeb has been tested with a sustained load of 180,000 hits per hour).

FoxWeb Support Team email

Sent by Randy Petty on 11/11/2003 12:46:01 PM:
What is the relationship between the number of channels running and the number of users.   I'm assuming with 8 channels, hundreds of web users could be logged in, but how many can actively run database queries at the same time?
We continue to go around and around here with the number of channels to run on two or four cpu servers.   We generally have less than 30 users logged in to any given database/site at a time.
I've mentioned the Foxweb guideline of 2 or 3 channels per cpu, but our systems group believes this would limit the number of active users to one per channel ( active meaning database requests, not just logged on ).
Randy Petty