[REBOL] Re: about the benchmarks
From: m:koopmans2:chello:nl at: 10-Oct-2001 21:30
First of all, you can have any number of Rugby servers running.
In your fastcgi script, you simply do a wait on tge fastcgi port. Upon
receiving a request you pass the data to a Rugby server (the actual
application). You use /deferred in Rugby to achive this.
Now you return listening on the fastcgi port and periodically check if the
result has already arrived.
Two things can happen:
- You get a new fastcgi request. You do the same, but now on the next Rugby
server. Very simple load balancing but most of the time sufficient.
- You get the result. You write it out on the corresponding fastcgi accepted
port (that you saved in a block or so), close the port, and start listening
again.
So basically you use the fastcgi thing as a load balancer to the rugby
servers. As you use non-blocking deferred Rugby calls you have very fast
setup times (both on fastcgi and Rugby).
This is the picture:
------------
webserver
------------
fastcgi
--------------
Rugby Rugby Rugby
HTH,
Maarten