TightStack is a tightly-integrated hosting stack for simple web services.
With minimal configuration and efficient performance, TightStack is ideal for running HTTP, HTTPS, and WebSocket services on small .NET-enabled VMs or low-power hardware like Raspberry Pi.
Easy to use.
Running TightStack is extremely easy. For a static site, simply specify the certificate to use for HTTPS, and a path to serve for each set of domains.
Paths to directories are served using the built-in static content service. Paths to managed assemblies are served by calling into the assembly. Adding your process to the system's startup manager is all that's required to have a persistent service.
Easy to extend.
The built-in static content service is adequate for simple, unchanging sites. For dynamic HTTP or WebSocket support, simply implement the basic interface and generate any output you like.
public interface IWebService
void HandleHttpRequest( HttpRequest request, HttpResponse response);
void HandleWebsocketConnection( Websocket websocket);
Easy on resources.
Static content is served from the built-in static content service, and dynamic content is served from assemblies loaded into the process; calls aren't delegated to other processes, so requests are never blocked on process launches or IPC. Operations within the process are kept fast as well:
- By default, the static content service keeps the entire site in memory; unchanged content is never re-read from disk.
- TCP and SSL connections operate out of fixed buffers; transfers never trigger any extra garbage generation or collection.
- TCP, SSL, HTTP, and WebSocket transports are entirely lock-free; services stay responsive, and easily scale across cores.
- Sustained 1M/rps on commodity server hardware, for both static and dynamic sites.
Easy to deploy.
At just 25KB, the single TightStack executable can be quickly copied to any system with a Common Language Runtime (.NET, Mono, etc.). Because TightStack includes its own implementation of HTTP, SSL, and WebSockets, no additional dependencies are required.
TightStack is no longer being maintained. Version 1.07 is tested up to .NET 4.0, Mono 4.0, and .NET Core 1.0. Subsequent versions have not been tested and are used at your own risk.