1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

proof reading commits

This commit is contained in:
ainsley
2019-05-30 12:38:58 -05:00
parent d35e3cb277
commit 602700010d
35 changed files with 100 additions and 99 deletions

View File

@@ -43,7 +43,7 @@ accounts: {
> While the name _account_ implies one or more users, it is much simpler and enlightening to think of one account as a messaging container for one application. Users in the account are simply the minimum number of services that must work together to provide some functionality.
> In simpler terms, more accounts with few (even one) clients is a better design topology than a large account with many users with complex authorization configuration.
## Exporting and Importing
### Exporting and Importing
Messaging exchange between different accounts is enabled by _exporting_ streams and services from one account and _importing_ them into another. Each account controls what is exported and imported.
@@ -59,7 +59,7 @@ Services are messages your application can consume and act on, enabling other ac
## Export Configuration Map
### Export Configuration Map
The export configuration map binds a subject for use as a `service` or `stream` and optionally defines specific accounts that can import the stream or service. Here are the supported configuration properties:
@@ -105,7 +105,7 @@ The _source configuration map_ describes an export from a remote account by spec
| `subject` | The subject under which the stream or service is made accessible to the importing account |
## Import Configuration Map
### Import Configuration Map
An import enables an account to consume streams published by another account or make requests to services implemented by another account. All imports require a corresponding export on the exporting account. Accounts cannot do self-imports.

View File

@@ -21,13 +21,13 @@ The `authorization` block provides _authentication_ configuration as well as _au
| [`token`](tokens.md) | Specifies a global token that can be used to authenticate to the server (exclusive of user and password) |
| [`user`](username_password.md) | Specifies a single _global_ user name for clients to the server (exclusive of token) |
| [`password`](username_password.md) | Specifies a single _global_ password for clients to the server (exclusive of `token`) |
| `users` | A list of `user` configuration maps |
| `users` | A list of user configuration maps |
| `timeout` | Maximum number of seconds to wait for client authentication |
For multiple username and password credentials, specify a `users` list.
### User Configuration Map
## User Configuration Map
A `user` configuration map specifies credentials and permissions options for a single user:

View File

@@ -1,4 +1,4 @@
## NATS Clients
# NATS Clients
The nats-server doesn't come bundled with any clients. But most client libraries come with tools that allow you to publish, subscribe, send requests and reply messages.

View File

@@ -1,4 +1,4 @@
## Configuration File Format
# Configuration File Format
While the NATS server has many flags that allow for simple testing of features, the NATS server products provide a flexible configuration format that combines the best of traditional formats and newer styles such as JSON and YAML.

View File

@@ -1,4 +1,4 @@
## Flags
# Flags
The NATS server has many flags to customize its behavior without having to write a configuration file.

View File

@@ -1,4 +1,4 @@
## NATS Server Installation
# NATS Server Installation
NATS philosophy is simplicity. Installation is just decompressing a zip file and copying the binary to an appropriate directory; you can also use your favorite package manager. Here's a list of different ways you can install or run NATS:
@@ -11,7 +11,7 @@ NATS philosophy is simplicity. Installation is just decompressing a zip file and
### Installing via Docker
With docker you can install the server easily without scattering binaries and other artifacts on your system. The only pre-requisite is to [install docker](https://docs.docker.com/install).
With Docker you can install the server easily without scattering binaries and other artifacts on your system. The only pre-requisite is to [install docker](https://docs.docker.com/install).
```
> docker pull nats:latest
@@ -65,7 +65,7 @@ To test your installation (provided the executable is visible to your shell):
[41634] 2019/05/13 09:42:11.746252 [INF] Server is ready
```
### Downloading A Release Build
### Downloading a Release Build
You can find the latest release of nats-server [here](https://github.com/nats-io/nats-server/releases/latest).
@@ -85,7 +85,7 @@ Archive: nats-server.zip
```
### Installing from the source
### Installing From the Source
If you have Go installed, installing the binary is easy:

View File

@@ -64,7 +64,7 @@ logtime: false
log_file: "/tmp/nats-server.log"
```
## Log Rotation with logrotate
### Log Rotation with logrotate
NATS server does not provide tools to manage log files, but it does include mechanisms that make log rotation simple. We can use this mechanism with [logrotate](https://github.com/logrotate/logrotate); a simple standard Linux utility to rotate logs available on most distributions like Debian, Ubuntu, RedHat (CentOS), etc.
@@ -93,4 +93,4 @@ The `/var/run/nats-server.pid` file is where NATS server stores the master proce
## Some Logging Notes
- The NATS Server, in verbose mode, will log the receipt of `UNSUB` messages, but this does not indicate the subscription is gone, only that the message was received. The `DELSUB` message in the log can be used to determine when the actual subscription removal has taken place.
- The NATS server, in verbose mode, will log the receipt of `UNSUB` messages, but this does not indicate the subscription is gone, only that the message was received. The `DELSUB` message in the log can be used to determine when the actual subscription removal has taken place.

View File

@@ -1,6 +1,6 @@
## Monitoring
To monitor the NATS messaging system, `gnatsd` provides a lightweight HTTP server on a dedicated monitoring port. The monitoring server provides several endpoints, including [varz](#/varz), [connz](#/connz), [routez](#/routez), and [subsz](#/subz). All endpoints return a JSON object.
To monitor the NATS messaging system, `nats-server` provides a lightweight HTTP server on a dedicated monitoring port. The monitoring server provides several endpoints, including [varz](#/varz), [connz](#/connz), [routez](#/routez), and [subsz](#/subz). All endpoints return a JSON object.
The NATS monitoring endpoints support JSONP and CORS, making it easy to create single page monitoring web applications.
@@ -14,14 +14,14 @@ To enable the monitoring server, start the NATS server with the monitoring flag
Example:
```sh
$ gnatsd -m 8222
$ nats-server -m 8222
[4528] 2015/08/19 20:09:58.572939 [INF] Starting gnatsd version 0.8.0
[4528] 2015/08/19 20:09:58.573007 [INF] Starting http monitor on port 8222
[4528] 2015/08/19 20:09:58.573071 [INF] Listening for client connections on 0.0.0.0:4222
[4528] 2015/08/19 20:09:58.573090 [INF] gnatsd is ready</td>
```
To test, run `gnatsd -m 8222`, then go to <a href="http://localhost:8222/" target="_blank">http://localhost:8222/</a>
To test, run `nats-server -m 8222`, then go to <a href="http://localhost:8222/" target="_blank">http://localhost:8222/</a>
## Monitoring endpoints
@@ -182,4 +182,4 @@ $.getJSON('http://localhost:8222/connz?callback=?', function(data) {
## Monitoring Tools
In addition to writing custom monitoring tools, you can nats-server into Prometheus. The [Prometheus NATS Exporter](https://github.com/nats-io/prometheus-nats-exporter) allows you to configure the metrics you want to observe and store in Prometheous. There's a sample [Graphana](https://graphana.com) dashboard that you can use to visualize the server metrics.
In addition to writing custom monitoring tools, you can nats-server into Prometheus. The [Prometheus NATS Exporter](https://github.com/nats-io/prometheus-nats-exporter) allows you to configure the metrics you want to observe and store in Prometheous. There's a sample [Grafana](https://grafana.com) dashboard that you can use to visualize the server metrics.

View File

@@ -67,6 +67,4 @@ Other NATS tooling such as `nats-pub` and `nats-sub` can directly use nkeys:
nats-sub -nkey /path/to/file/storing/seed ">"
```
For examples using other supported clients, please visit
our [documentation portal](https://nats.io/documentation/writing_applications/secure_connection)

View File

@@ -1,4 +1,4 @@
## Running
# Running
The nats-server has many command line options. To get started, you don't have to specify anything.
In the absence of any flags, the NATS server will start listening for NATS client connections on port 4222.

View File

@@ -1,6 +1,6 @@
# Securing NATS
## Securing NATS
The nats-server provides several forms of security:
The NATS server provides several forms of security:
- Connections can be [_encrypted_ with TLS](tls.md)
- Client connections can require [_authentication_](auth_intro.md)

View File

@@ -26,7 +26,7 @@ Or via the command line:
This option verifies the client's certificate is signed by the CA specified in the `ca_file` option.
## Mapping Client Certificates To A User
### Mapping Client Certificates To A User
In addition to verifying that a specified CA issued a client certificate, you can use information encoded in the certificate to authenticate a client. The client wouldn't have to provide or track usernames or passwords.
@@ -91,6 +91,6 @@ authorization {
}
```
## TLS Timeout
### TLS Timeout
[TLS timeout](/nats_server/tls.md#tls-timeout) is described here.

View File

@@ -1,4 +1,4 @@
# Token Authentication
## Token Authentication
Token authentication is a string that if provided by a client, allows it to connect. It is the most straightforward authentication provided by the NATS server.
@@ -22,7 +22,7 @@ A client can easily connect by specifying the server URL:
Listening on [>]
```
## Bcrypted Tokens
### Bcrypted Tokens
Tokens can be bcrypted enabling an additional layer of security, as the clear-text version of the token would not be persisted on the server configuration file.

View File

@@ -1,6 +1,6 @@
# Username and Password
## Username and Password
You can authenticate one or more clients using username and passwords; this enables you to have greater control over the management and issuing of credential secrets.
You can authenticate one or more clients using username and passwords; this enables you to have greater control over the management and issuance of credential secrets.
For a single user:
```
@@ -26,7 +26,7 @@ authorization: {
}
```
## Bcrypted Passwords
### Bcrypted Passwords
Username/password also supports bcrypted passwords using the [`mkpasswd`](/nats_tools/mkpasswd.md) tool. Simply replace the clear text password with the bcrypted entries:
@@ -46,7 +46,7 @@ authorization: {
}
```
## Reloading a Configuration
### Reloading a Configuration
As you add/remove passwords from the server configuration file, you'll want your changes to take effect. To reload without restarting the server and disconnecting clients, do:

View File

@@ -1,4 +1,4 @@
### Windows Service
## Windows Service
The NATS server supports running as a Windows service. In fact, this is the recommended way of running NATS on Windows. There is currently no installer; users should use `sc.exe` to install the service: