Writer Example

Writer threads can be used to spool potentially huge files
to the client using asynchronous I/O. One writer thread can serve
many clients concurrently with little resource consumptions.
By using writer threads, connections thread are used for only short
time periods. Furthermore, this helps against slow read attacks.

The current server (named naviserver) is configured with writer thread(s).
You can change the number of writer threads in the used configuration file
/usr/local/ns/conf/config.tcl.

The configuration file contains entries like the following:

   ns_section ns/server/naviserver/module/nssock
   ns_param writerthreads 
No test files exist in the configured TMP folder /tmp/examples/.

Do you want to create them? YesWhen downloading huge files via writer threads, the size of the NaviServer thread
will stay small.

Back to example page.