JSPM

  • Created
  • Published
  • Downloads 83
  • Score
    100M100P100Q69626F
  • License MIT

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 socketnaut Proxy and Service constructors consume native Node net.Server and http.Server instances; you can configure them however you choose.
  • The http.IncomingMessage and http.ServerResponse objects passed to request 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

  1. Installation
  2. Concepts
  3. API
  4. Usage
  5. Examples
  6. Tuning Strategies
  7. Logging
  8. Extending Socketnaut
  9. FAQ

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.

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.