ns_writer - Manage files with writer thread
This command allows to submit data or file to be returned to the client connection using writer thread instead of current connection thread. Writer thread processes multiple sockets using async socket operations which consumes less resources than returning multiple files to the slow clients in separate thread.
Returns list of all currently submitted files
Submit arbitrary data to be returned via writer, data can be binary
Submits file to be returned, optionally the following arguments can be used:
-headers Tells the writer to provide required HTTP headers, like content size, type and status.
-offset If specified, file will be returned starting with this offset
-size If not specified, the whole file will be retuned, otherwise only given part. Can be combined with -offset to return chunks of file
Basic configuration options:
writerthreads parameter specified how many writer threads will be used, multiple threads will be rotated to spread the load across all threads
writersize specifies minimal size of the file to be considered for writer thread, this parameter is used by connection thread when returning file and if size exceeds configured value, file will be returned via writer thread and connection thread will be released to handle other requests.
ns_writer submitfile /tmp/biglist.txt