15 Texis Web Server - vhttpd

The Texis Web Server - vhttpd - is a standalone web server packaged with Texis. It has the ability to execute Vortex scripts directly in the server, without needing a separate CGI layer.

Performance

By tightly integrating the Web server and Vortex, and stripping the server of performance-robbing features, vhttpd can outperform an Apache server/CGI Vortex setup by 20%. In a high-hit environment this can be a significant performance gain.

Complex servers such as Apache are feature-rich, but those same features can degrade performance:

  • Looking for .htaccess files in every directory on every fetch
  • Passing the URL among many modules for modification
  • Server-side includes

Script source security

By default, the Texis Web Server will not allow files with no extension to be retrieved, without a config command to allow them. This keeps Vortex script source code secure automatically, regardless of what directory it's in.

Entry/Exit scripts

Additionally, because it is integrated with Vortex, vhttpd has the ability to run Vortex scripts for any URL, not just explicitly-Vortex URLs. The server can be configured to run an EntryScript and ExitScript before and after every URL fetched on the server, including vanilla file fetches. This provides the powerful ability to monitor and configure the web server's content.

For example, an entry script could be defined to check permissions before a fetch, and redirect the user elsewhere on error. Or it could print standard look-and-feel HTML for the entire site, easily changeable since it's in one script. Load balancing could be done by checking the server load, or the remote user's host, and denying users when load doesn't permit.

The exit script could also print HTML, or directly log the transfer to a SQL table instead of just a transfer.log file.

Config

The Texis Web Server supports a subset of the same config file format that Apache does, making migration easy. The primary difference is the addition of the VortexPath config command to specify what URL directly-executed Vortex scripts are to be under. This would replace an Apache server's ScriptAlias command (though ScriptAlias is supported).
Back: FTPing Large Files Next: Profiling
Copyright © 2024 Thunderstone Software LLC. All rights reserved.