跳转到主要内容
本章内容76
-
01
Installing, running and deploying a NATS Server
The NATS Server is highly optimized and its binary is very compact (less than 20 MB), it can run on any mac...
1 天前
-
02
Installing a NATS Server
NATS philosophy is simplicity. Installation is just decompressing a zip file and copying the binary to an a...
1 天前
-
03
Running and deploying a NATS Server
The nats-server has many command line options. To get started, you don't have to specify anything. In the a...
1 天前
-
04
Windows Service
The NATS server supports running as a Windows service. In fact, this is the recommended way of running NATS...
1 天前
-
05
Flags
The NATS server has many flags to customize its behavior without having to write a configuration file.
The ...
1 天前
-
06
Environmental considerations
Networking
Load balancers
It is possible to deploy a load balancer between the client applications and the ...
1 天前
-
07
NATS and Docker
NATS Server Containerization
The NATS server is provided as a Docker image on Docker Hub that you can run u...
1 天前
-
08
Tutorial
In this tutorial you run the NATS server Docker image. The Docker image provides an instance of the NATS Se...
1 天前
-
09
Docker Swarm
Step 1:
Create an overlay network for the cluster (in this example,
nats-cluster-example), and instantiate...
1 天前
-
10
Python and NGS Running in Docker
Start a lightweight Docker container:
docker run --entrypoint /bin/bash -it python:3.8-slim-buster
Or you c...
1 天前
-
11
JetStream
This mini-tutorial shows how to run a NATS server with JetStream enabled in a local Docker container.
This ...
1 天前
-
12
NGS Leaf Nodes
This mini-tutorial shows how to run 2 NATS server in local Docker containers interconnected via Synadia Clo...
1 天前
-
13
NATS and Kubernetes
The recommended way to deploy NATS on Kubernetes is using Helm with the official NATS Helm Chart.
Helm repo...
1 天前
-
14
NATS Server Clients
A NATS client is an application making a connection to one of the nats servers pointed to by its connection...
1 天前
-
15
Configuring NATS Server
While the NATS server has many flags that allow for simple testing of features from command line. The stand...
1 天前
-
16
Configuring JetStream
Enabling JetStream for a nats-server
To enable JetStream in a server we have to configure it at the top lev...
1 天前
-
17
Configuration Management
In many cases managing the configuration in your application code is the best model, many teams though wish...
1 天前
-
18
NATS Admin CLI
nats Admin CLI
The
nats CLI can be used to manage Streams and Consumers easily using it's
--config flag, ...
1 天前
-
19
Terraform
Terraform is a Cloud configuration tool from Hashicorp. We maintain a Provider for Terraform called terrafo...
1 天前
-
20
GitHub Actions
We have a pack of GitHub Actions that let you manage an already running JetStream Server, useful for managi...
1 天前
-
21
Kubernetes Controller
The JetStream controllers allow you to manage NATS JetStream Streams and Consumers via K8S CRDs. You can fi...
1 天前
-
22
Clustering
NATS Server Clustering
NATS supports running each server in clustered mode. You can cluster servers togethe...
1 天前
-
23
Clustering Configuration
The
cluster configuration map has the following configuration options:
Property
Description
Version
host
I...
1 天前
-
24
v2 Routes
Introduced in NATS v2.10.0
Connection pooling
Before the v2.10.0 release, two servers in a cluster had only...
1 天前
-
25
JetStream Clustering
Clustering in JetStream is required for a highly available and scalable system. Behind clustering is RAFT. ...
1 天前
-
26
Administration
Once a JetStream cluster is operating interactions with the CLI and with
nats CLI is the same as before. F...
1 天前
-
27
Troubleshooting
Diagnosing problems in NATS JetStream clusters requires:
knowledge of JetStream concepts
knowledge of the N...
1 天前
-
28
Super-cluster with Gateways
Gateways
Gateways enable connecting one or more clusters together into a full mesh; they allow the formatio...
1 天前
-
29
Configuration
The
gateway configuration block is similar to a
cluster block:
gateway {
name: "A"
listen: "local...
1 天前
-
30
Leaf Nodes
A Leaf Node extends an existing NATS system of any size, optionally bridging both operator and security dom...
1 天前
-
31
Configuration
leafnodes Configuration Block
The leaf node configuration block is used to configure incoming as well as ou...
1 天前
-
32
JetStream on Leaf Nodes
If you want to see a demonstration of the full range of this functionality, check out our video
One of the ...
1 天前
-
33
Securing NATS
The NATS server provides several forms of security:
Connections can be encrypted with TLS
Client connection...
1 天前
-
34
Enabling TLS
The NATS server uses modern TLS semantics to encrypt client, route, and monitoring connections. Check here ...
1 天前
-
35
Authentication
NATS authentication is multi-level. All of the security modes have an accounts level with users belonging t...
1 天前
-
36
Tokens
Token authentication is a string that if provided by a client, allows it to connect. It is the most straigh...
1 天前
-
37
Username/Password
Plain Text Passwords
You can authenticate one or more clients using username and passwords; this enables yo...
1 天前
-
38
TLS Authentication
The server can require TLS certificates from a client. When needed, you can use the certificates to:
Valida...
1 天前
-
39
TLS Authentication in clusters
When setting up clusters, all servers in the cluster, if using TLS, will both verify the connecting endpoin...
1 天前
-
40
NKeys
NKeys are a new, highly secure public-key signature system based on Ed25519.
With NKeys the server can veri...
1 天前
-
41
Authentication Timeout
You can specify a timeout to limit how long the server will wait for a client to authenticate.
If you don't...
1 天前
-
42
Decentralized JWT Authentication/Authorization
With other authentication mechanisms, configuration for identifying a user and Account, is in the server co...
1 天前
-
43
Account lookup using Resolver
The
resolver configuration option is used in conjunction with NATS JWT Authentication and nsc. The
resolv...
1 天前
-
44
Memory Resolver Tutorial
The
MEMORY resolver is a server built-in resolver for account JWTs. If there are a small number of account...
1 天前
-
45
Mixed Authentication/Authorization Setup
Mixing both nkeys static config and decentralized JWT Authentication/Authorization is possible but needs so...
1 天前
-
46
Authorization
The NATS server supports authorization using subject-level permissions on a per-user basis. Permission-base...
1 天前
-
47
Multi Tenancy using Accounts
In modern microservice architecture it is common to share infrastructure - such as NATS - between services....
1 天前
-
48
OCSP Stapling
Supported since NATS Server version 2.3
OCSP Stapling is honored by default for certificates that have the ...
1 天前
-
49
Auth Callout
As of NATS v2.10.0
Auth Callout is an opt-in extension for delegating client authentication and authorizati...
1 天前
-
50
Logging
Configuring Logging
The NATS server provides various logging options that you can set via the command line ...
1 天前
-
51
Enabling Monitoring
NATS Server Monitoring
To monitor the NATS messaging system,
nats-server provides a lightweight HTTP serve...
1 天前
-
52
MQTT
Supported since NATS Server version 2.2
NATS follows as closely as possible to the MQTT v3.1.1 specificatio...
1 天前
-
53
Configuration
To enable MQTT support in the server, add an
mqtt configuration block in the server's configuration file l...
1 天前
-
54
Configuring Subject Mapping
Supported since NATS Server version 2.2
Subject mapping is a very powerful feature of the NATS server, usef...
1 天前
-
55
System Events
NATS servers leverage Accounts support and generate events such as:
account connect/disconnect
authenticati...
1 天前
-
56
System Events & Decentralized JWT Tutorial
Enabling System Events with Decentralized Authentication/Authorization
To enable and access system events, ...
1 天前
-
57
WebSocket
Supported since NATS Server version 2.2
WebSocket support can be enabled in the server and may be used alon...
1 天前
-
58
Configuration
To enable WebSocket support in the server, add a
websocket configuration block in the server's configurati...
1 天前
-
59
Managing and Monitoring your NATS Server Infrastructure
Managing a NATS Server is simple, typical lifecycle operations include:
Using the
nats CLI tool to check s...
1 天前
-
60
Monitoring
Monitoring NATS
To monitor the NATS messaging system,
nats-server provides a lightweight HTTP server on a ...
1 天前
-
61
Monitoring JetStream
Commercial Options
If you want a "batteries-included" approach to high-cardinality NATS monitoring and obse...
1 天前
-
62
Managing JetStream
Once the server is running it's time to use the management tool.
Please refer to the installation section i...
1 天前
-
63
Account Information
Account Information
JetStream is multi-tenant so you will need to check that your account is enabled for Je...
1 天前
-
64
Naming Streams, Consumers, and Accounts
Stream, Consumer (durable name), and Account names are used in both the subject namespace used by JetStream...
1 天前
-
65
Streams
The first step is to set up storage for our
ORDERS related messages, these arrive on a wildcard of subject...
1 天前
-
66
Consumers
Messages are read or consumed from the Stream by Consumers. We support pull and push-based Consumers and th...
1 天前
-
67
Data Replication
Replication allows you to move data between streams in either a 1:1 mirror style or by multiplexing multipl...
1 天前
-
68
Disaster Recovery
In the event of unrecoverable JetStream message persistence on one (or more) server nodes, there are two re...
1 天前
-
69
Encryption at Rest
Supported since NATS server version 2.3.0
TPM is supported on Windows since NATS Server version 2.11.0
注意
N...
1 天前
-
70
Managing JWT Security
If you are using the JWT model of authentication to secure your NATS infrastructure or implementing an Auth...
1 天前
-
71
In Depth JWT Guide
This document provides a step by step deep dive into JWT usage within NATS. Starting with related concepts,...
1 天前
-
72
Upgrading a Cluster
Repeat this procedure for all nodes of the cluster, one at a time:
Stop the server by putting it into Lame ...
1 天前
-
73
Slow Consumers
To support resiliency and high availability, NATS provides built-in mechanisms to automatically prune the r...
1 天前
-
74
Signals
Command Line
On Unix systems, the NATS server responds to the following signals.
You can send these using t...
1 天前
-
75
Lame Duck Mode
In production we recommend that a server is shut down with lame duck mode as a graceful way to slowly evi...
1 天前
-
76
Profiling
When investigating and debugging a performance issue with the NATS Server (i.e. unexpectedly high CPU or RA...
1 天前