------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ aolserver-talk mailing list aolserv...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/aolserver-talk
Hi, Sep.
If you don’t need to run any tcl code when serving these requests and you still want to serve them using AOLserver (as opposed to some other web server or a CDN), you can take advantage of pools to segregate threads for serving these static resources into their own pool. If those threads never allocate a tcl interpreter, they will be an order of magnitude smaller in footprint than your normal threads and so you can just have a lot of them.
We have a module that you might find useful that helps with this:
http://aolserver.am.net/code/modules/ampools.adpx
-Alex Hisen
Hi Gustaf! Thank you for the informative response!
I've been thinking of moving to NaviServer but I don't know enough about the transition to make that call yet. Right now, we're on aolserver and so, I'm trying to see what I can do on this platform. I do not understand why the delivery doesn't work on https out of the box and requires a reverse proxy.
I suspect the varied client connection is part of the problem and them sitting on the connection threads is hurting us.
However, we do not serve big files on our server so this has me wondering about the benefits of this change.
I'm not certain if aolserver has any facilities for asynchronous file writing and spooling.
It seems that I will have to build everything by hand. I had hoped that simply transferring the thread and having it ns_returnfile would be enough to get a simple form of background delivery going but it doesn't look like that's the case.
Am 20.03.15 um 05:47 schrieb Sep Ng:
bgdelivery takes the socket (file descriptor) of the current connection, but it has no knowledge about SSL. When it hands the file descriptor to the background delivery thread, this can write back to the client just using plain tcl i/o. So, background delivery can certainly write to the file-descriptor, but that won't be accepted by the client trying to decrypt the channel.Hi Gustaf! Thank you for the informative response!
I've been thinking of moving to NaviServer but I don't know enough about the transition to make that call yet. Right now, we're on aolserver and so, I'm trying to see what I can do on this platform. I do not understand why the delivery doesn't work on https out of the box and requires a reverse proxy.
what is hurting you?
I suspect the varied client connection is part of the problem and them sitting on the connection threads is hurting us.
whatever big means. connections can "hang" also when writing a few KBs.However, we do not serve big files on our server so this has me wondering about the benefits of this change.
the writer threads are an extension of naviserver over aolserver
I'm not certain if aolserver has any facilities for asynchronous file writing and spooling.
if your site requires https, one cant use bgdelivery without a reverse proxy.It seems that I will have to build everything by hand. I had hoped that simply transferring the thread and having it ns_returnfile would be enough to get a simple form of background delivery going but it doesn't look like that's the case.
otherwise, everything is pre-packaged.
what is hurting you?
> Am 20.03.15 um 07:48 schrieb Sep Ng:
what is hurting you?
> We have instances where we'd get a high number of concurrent users that the requests are getting queued, but when I look at the logs, there's a > lot of static files being served for each login page, let alone other pages being served in aolserver. So, I'm theorizing that being able to get those > static file requests pushed into a single thread and free up the connection threads would help in scalability.
yes, there is a certain hope, that removing this burden from the
connection threads will improve the situation. Another option to reduce
queuing time is to increase the number of connection threads.
If the bottleneck are slow sql-queries then this pooling stuff will not help.
Often the first task to determine, what the bottleneck is, can be already be difficult.
NaviServer has several introspection means for monitoring. The following
graph shows queuing times, filter and run times (you won't get
these numbers from aolserver). The graph (from OpenACS.org) shows
that queuing time is on that site typically around 0.1 ms, with peaks in
the range of 16 ms. This is for example quite useful for determining the
right number of running connection threads. naviserver allows to
change this number dynamically without restart....
> By the way, I've seen in previous posts of yours that the you did switch from aolserver to naviserver. How big was the change? What things did > you have to re-write/port to get them running in naviserver?
We did the move of our main site 4 years ago (now we have around 50 naviserver sites),
but i do not have a detailed writeup of the changes. Most of our changes
went into OpenACS (download OpenACS 5.8.1, search for NaviServer).
what comes to my mind is:
- NaviServer dropped the useless "$conn" argument from several commands
(like old: "ns_return $conn 200 text/plain ..." -> "ns_return 200 text/plain ..."
- different modules (e.g. for ssl), different config file
- more functionality built-in which was as a module under aolserver
crypo functions (sha, md5), cache, base-64 encoding, gzip delivery
(actually, the "ns_cache" function in naviserver usues a single
command style (ns_cache_eval) and in aolserver subcommand style,
but we added already a compatibility layer to the naviserver source tree
which is sufficient for OpenACS
- no ns_share (use nsv instead)
- no "ns_set -persistent"
We did not use the latter two, but this comes sometimes up in the mailing lists.
The move was quite easy for us, but ymmv.
-g