r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Dockimbel
6-Dec-2010
[9340]
Btw, worker processes are not equal wrt the load. The first in the 
list gets the more jobs to do, especially if requests can be processed 
fast (which should be the case in most of well-coded scripts). So, 
you get a natural "affinity" to the first worker (having the most 
code and data cached there) for all new incoming requests. 

So, in the long run, you can look at workers memory usage to see 
how the workload is spread, the first one having the biggest memory 
usage, the last one having the lowest. Looking at the last one is 
a good indicator if the number of workers needs to be raised or not, 
if his memory footprint hasn't changed since the last restart, your 
server is doing fine with the load. I should expose some workers 
and job queue usage stats to help fine tune workers numbers.
Kaj
6-Dec-2010
[9341x2]
Thanks, good to know
I do see the asymmetry on our server. I have also had cases, though, 
where the number of workers went above eight or to zero. I'm not 
sure if that is still happening with the recent version
Dockimbel
6-Dec-2010
[9343]
The worker number doesn't decrease unless you're using the -w command 
line option (or unless your code or a native bug crash some of them 
badly). Having more than 8 workers is possible if some of them are 
blocked (in a endless loop or waiting something forever). If you 
quit Cheyenne in that case, they'll remain there and will need manual 
killing. Cheyenne could do a better job at handling those non-responding 
workers in future versions.
Steeve
6-Dec-2010
[9344]
R3 is more suited for such.
secure [memory integer!] and secure [eval integer!]
Allow to quit from forever loops.
(Not from a forever loop, which does nothing, though)
Gregg
6-Dec-2010
[9345]
And perhaps
  secure [time time!]
Steeve
6-Dec-2010
[9346x2]
yeah perhaps... is there a ticket for that request ?
I I guess, Carl didn't want offer this by default, because the slow 
down may  be drastic.
Gregg
8-Dec-2010
[9348]
I don't know if there's a ticket. I could live with relatively coarse 
granularity, which would be much better than nothing, if that at 
least made it possible.
Pekr
8-Dec-2010
[9349]
At least a memory constraint is a good one. That should prevent memory 
leakage. I personally don't like eval at all, as my brain is not 
mature enough to be able to guess, how many cycles will my script 
ideally need. I would welcome time constraint as well, and it was 
proposed, but not accepted.

Here's what does not work yet:


# If the program quits, the exit code is set to 101, the same as 
any security termination; however, we may want to use special codes 
to indicate the reason for the quit.

# Some types of loops are not yet checked, but we will add them. 
For example, PARSE cycles are not yet counted.

# Time limits are not yet supported, but may be added in the future. 
However, the cycle limit is better for most cases, because it is 
CPU speed independent.
Steeve
8-Dec-2010
[9350]
You can quit/return any exit code
Kaj
8-Dec-2010
[9351]
It's about automatic quits by the SECURE functionality
Steeve
9-Dec-2010
[9352]
yeah, and you can catch it as an error. It stay relevant.
Kaj
9-Dec-2010
[9353]
Yeah, but you can't analyse the error, because you always get 101
Steeve
9-Dec-2010
[9354x2]
Are you sure ? accordingly the doc, we got :

>> secure [eval [throw 50000]]
>> loop 100000 [next "test"]
** Access error: security violation: eval
** Where: loop
** Near: loop 100000 [next "test"]


So, you can decipher the error message and send back the appropriate 
quit/return code
security violation: eval
BrianH
9-Dec-2010
[9356]
You can also do it in a try statement and check the error codes.
Kaj
9-Dec-2010
[9357]
Ah, seems this limitation only applies then if you let R3 quit without 
further processing
AdrianS
10-Dec-2010
[9358]
Bad news - looks like WebSockets will be disabled in Firefox 4 due 
to security concerns.


http://feedproxy.google.com/~r/Bludice/~3/S6Lw15UdA2I/websocket-security
Andreas
10-Dec-2010
[9359]
Same in Chrome: http://codereview.chromium.org/5643005/
Kaj
10-Dec-2010
[9360]
Aargh
Dockimbel
10-Dec-2010
[9361]
I saw the news yesterday for FF4. The badly written RFC for ws was 
alarming since the beginning, this kind of design defect doesn't 
surprise me much, but it's such a waste...I hope the new CONNECT-based 
workaround will be adopted rapidly.
Kaj
10-Dec-2010
[9362]
Google can't hire designers as good as work for REBOL for free ;-)
nve
18-Dec-2010
[9363]
When can we exepect Cheyenne like NGINX ? What is missing ? Cheyenne 
is the best product to promote REBOL !?
Oldes
18-Dec-2010
[9364]
Why? I'm using Cheyenne with Nginx... Nginx for serving static content, 
dynamic by Cheyenne. I use slogan:  "when east meets west".
nve
18-Dec-2010
[9365]
Ok,  they claimed that "Nginx now hosts nearly 6.55% (13.5M) of all 
domains worldwide."
When for Cheyenne ?
GrahamC
18-Dec-2010
[9366]
There's a possibility that users might require certificates to access 
my app ... can that be done with Cheyenne and something else?
Andreas
18-Dec-2010
[9367]
Client certificates?
GrahamC
18-Dec-2010
[9368]
So, what would you have to use server side to manage and authenticate 
the certificates?
Andreas
18-Dec-2010
[9369]
Sorry, that was a question, not a suggestion. Do you actually want 
to authenticate based on client certificates?
GrahamC
18-Dec-2010
[9370]
Yes
Dockimbel
18-Dec-2010
[9371]
Use SSL: http://it.toolbox.com/blogs/securitymonkey/howto-securing-a-website-with-client-ssl-certificates-11500
Oldes
18-Dec-2010
[9372]
Or use Nginx as a reverse proxy to Cheyenne.
GrahamC
18-Dec-2010
[9373x5]
So, I don't need Apache then?
I'm currently using Cheyenne ... and stunnel to provide SSL
Looks like I could still use stunnel .. and put all the certificates 
in a directory and disconnect users who don't present a certificate
I might have a few hundred users ... so hopefully this can cope.
So, I guess I'm asking if anyone has experience with this and was 
it straight forward?
Kaj
18-Dec-2010
[9378]
Hundred users total, or concurrently?
GrahamC
18-Dec-2010
[9379x2]
total
I'm looking to implement a nationwide registry for patients taking 
biologics
Kaj
18-Dec-2010
[9381]
Shouldn't be much of a problem performance wise
GrahamC
18-Dec-2010
[9382]
worst case scenario - 60 concurrent users
Kaj
18-Dec-2010
[9383]
How many requests would they make within a minute?
GrahamC
18-Dec-2010
[9384]
I wouldn't have thought that many ... of course I'm just guessing!
Kaj
18-Dec-2010
[9385x2]
Well, that determines your scalability concerns
60 Concurrent users is a lot - except if they're idling for five 
minutes between every request
GrahamC
18-Dec-2010
[9387x3]
I guess I can just get a bigger VM if it comes down to it ... :) 
 Yes, I expect they'll be idling most of the time
So, I guess the next question is .. how does one determine if the 
server is overloaded?
read the logs and ??