Skip to content

Commit 140eea6

Browse files
authored
chore(guides): update 2 guides (#328)
1 parent 55414d7 commit 140eea6

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

β€Žapps/docs/content/guides/choose-queue.mdxβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ description: "**Use NATS** for most cases (simple, fast, JetStream persistence).
1818

1919
- Ports: 4222 (client), 8222 (HTTP monitoring)
2020
- Auth: user `zerops` + auto-generated password
21-
- Connection: `nats://${user}:${password}@${hostname}:4222`
21+
- **Connection** β€” two supported patterns, pick ONE:
22+
- **Separate env vars** (recommended, works with every NATS client library): pass `servers: ${hostname}:${port}` plus `user: ${user}, pass: ${password}` as client-side connect options. The servers list stays credential-free.
23+
- **Opaque connection string**: pass `${connectionString}` directly as the servers option β€” the platform builds a correctly-formatted URL with embedded auth that the NATS server expects.
2224
- JetStream: Enabled by default (`JET_STREAM_ENABLED=1`)
2325
- Storage: Up to 40GB memory + 250GB file store
2426
- Max message: 8MB default, 64MB max (`MAX_PAYLOAD`)
@@ -40,3 +42,4 @@ description: "**Use NATS** for most cases (simple, fast, JetStream persistence).
4042
2. **Kafka single-node has no replication**: 1 broker = 3 partitions but zero redundancy
4143
3. **NATS JetStream HA sync interval**: 1-minute sync across nodes β€” brief data lag possible
4244
4. **Kafka SASL only**: No anonymous connections β€” always use the generated credentials
45+
5. **NATS authorization violation from a hand-composed URL**: do not build a `nats://user:pass@host:4222` URL from the separate env vars. Most NATS client libraries will parse the embedded credentials AND separately attempt SASL with the same values, producing a double-auth that the server rejects with `Authorization Violation` on the first CONNECT frame (symptom: startup crash, no successful subscription). Use either the separate env vars passed as connect options (credential-free servers list) or the opaque `${connectionString}` the platform builds for you β€” both patterns in the Connection section above avoid the double-auth path.

β€Žapps/docs/content/guides/object-storage-integration.mdxβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ When you create an Object Storage service, Zerops auto-generates these env vars
1111

1212
| Variable | Description |
1313
|----------|-------------|
14-
| `apiUrl` | S3 endpoint URL (accessible from Zerops and remotely) |
14+
| `apiUrl` | S3 endpoint URL β€” full `https://...` URL ready for any S3 SDK's `endpoint` option |
15+
| `apiHost` | S3 endpoint host only (no scheme); use only if the client library needs host separately |
1516
| `accessKeyId` | S3 access key |
1617
| `secretAccessKey` | S3 secret key |
1718
| `bucketName` | Auto-generated bucket name (hostname + random prefix, immutable) |
@@ -20,6 +21,8 @@ When you create an Object Storage service, Zerops auto-generates these env vars
2021
| `serviceId` | Service ID (Zerops-generated) |
2122
| `hostname` | Service hostname |
2223

24+
**Use `${storage_apiUrl}` as the S3 endpoint** β€” it carries the complete `https://` scheme and is what every S3 SDK's `endpoint` option expects. The `apiHost` variant is host-only; if a client library requires host separately, combine `https://${storage_apiHost}` manually β€” **never `http://`**. The object-storage gateway rejects plaintext HTTP with a 301 redirect to the HTTPS equivalent, and most S3 SDKs don't follow the redirect automatically. The symptom of a misconfigured endpoint is `UnknownError` or connection-refused on the first bucket call.
25+
2326
Reference them in zerops.yml `run.envVariables`:
2427
```yaml
2528
S3_ENDPOINT: ${storage_apiUrl}

0 commit comments

Comments
Β (0)