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

update getting started

Signed-off-by: Colin Sullivan <colin@synadia.com>
This commit is contained in:
Colin Sullivan 2021-02-04 17:48:57 -07:00
parent f1a92bdcd6
commit d422ccb394
3 changed files with 27 additions and 4 deletions

View File

@ -1,3 +1,26 @@
## Getting Started # Getting Started
This tech preview is limited to a single server and defaults to the global account. JetStream is NATS 2.0 aware and is scoped to accounts from a resource limit perspective. This is not the same as an individual server's resources, but may feel that way starting out. Don't worry, clustering is coming next but we wanted to get input early from the community. Getting started with Jetstream is straightforward. While we speak of Jetstream as if it is a seperate component, it's actually a subsystem built into the NATS server that needs to be enabled.
## Command line
Enable Jetstream by specifying the `-js` flag when starting the NATS server.
`$ nats-server -js`
## Configuration File
Enable Jetstream through a configuration file. By default, the Jetstream subsytem will store data in the /tmp directory. Here's a minimal file that will store data in a local "nats" directory, suitable for development and local testing.
`$ nats-server -c js.conf`
```text
# js.conf
jetstream {
store_dir=nats
}
```
Normally Jetstream will be run in clustered mode and will replicate data, so the best place to store Jetstream data would be locally on a fast SSD. One should specifically avoid NAS or NFS storage for Jetstream.
See [Using Docker](./using_docker.md) and [Using Source](./using_source.md) for more information.

View File

@ -1,4 +1,4 @@
### Using Docker # Using Docker
The `synadia/jsm:latest` docker image contains both the JetStream enabled NATS Server and the `nats` utility this guide covers. The `synadia/jsm:latest` docker image contains both the JetStream enabled NATS Server and the `nats` utility this guide covers.

View File

@ -1,4 +1,4 @@
### Using Source # Using Source or a Binary
You will also want to have installed from the nats.go repo the examples/tools such as nats-pub, nats-sub, nats-req and possibly nats-bench. One of the design goals of JetStream was to be native to core NATS, so even though we will most certainly add in syntactic sugar to clients to make them more appealing, for this tech preview we will be using plain old NATS. You will also want to have installed from the nats.go repo the examples/tools such as nats-pub, nats-sub, nats-req and possibly nats-bench. One of the design goals of JetStream was to be native to core NATS, so even though we will most certainly add in syntactic sugar to clients to make them more appealing, for this tech preview we will be using plain old NATS.