Package Exports
- socketnaut
- socketnaut/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (socketnaut) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Socketnaut
Scalable multithreaded Node.js servers made easy.
Socketnaut makes scaling native Node.js servers (e.g., TCP, HTTP, HTTPS) easy. Each socketnaut app consists of a TCP Proxy and a pool of HTTP Services. When the Service pool is exhausted, socketnaut will uniformly distribute incoming TCP sockets across the pool of allocated Services. This strategy allows for both distribution and parallel processing of incoming requests. Socketnaut exposes the same API for HTTP requests provided by Node's http.Server
and https.Server
; hence, if you know the Node API, you already know how to build applications on socketnaut!
Features
- Socketnaut requires 0 out-of-org dependencies. Socketnaut's dependencies are published and maintained by the FAR Analytics and Research org.
Dependencies:- The
farar/memoir
logger. - The
farar/port_agent
RPC facility.
- The
- The socketnaut
Proxy
andService
constructors consume native Nodenet.Server
andhttp.Server
instances; you can configure them however you choose. - The
http.IncomingMessage
andhttp.ServerResponse
objects passed torequest
listeners are unadulterated native Node objects - nothing added - nothing removed. - Import socketnaut as a Node.js module (see the Hello World! example) or take advantage of the packaged type definitions and import it into your TypeScript project.
Table of Contents
Installation
npm install socketnaut
Concepts
The socketnaut framework consists of the following 2 concepts.
Proxy
Service
API
The Proxy Class
The Service Class
Usage
Examples
An instance of Hello World!. (example)
Tuning Strategies
Logging
Extending Socketnaut
FAQ
What kind of scaling implementation is this?
Socketnaut is a multithreaded vertical scaling implementation. However, socketnaut could be containerized and scaled horizontally.
How is Socketnaut related to eptanaut?
Socketnaut is an offshoot from the eptanaut project. Socketnaut provides functionality similar to eptanaut; however, it implements a clear separation between the Proxy and Service concepts.