Skip to content

Conversation

@ingenthr
Copy link
Contributor

@ingenthr ingenthr commented Aug 5, 2025

Added some basics on the rate limiting tuneable, will crossref the runbook as well.

@ingenthr ingenthr requested review from Westwooo and brett19 August 5, 2025 17:57
@@ -0,0 +1,74 @@
# Documentation

Documentation here is a developer level view of concepts and how the system is implemented.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence starts a bit strange, missing a "The" perhaps?


## Concepts

**Stellar Gateway** is a Couchbase Protostellar implementation that provides both a gRPC "protostellar" and a RESTful interface to Couchbase. It is deployed 1:1 with a cluster, but may be deployed different ways.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stellar Gateway is a service that provides both a gRPC "protostellar" implementation and a RESTful interface to Couchbase.


### Architecture Overview

The system uses a modular architecture where each service (data, service discovery, Data API) can be independently configured and scaled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a slightly confusing statement, it seems to be mixing the concept of scalability of the cluster with the scalability of CNG itself.

The system uses a modular architecture where each service (data, service discovery, Data API) can be independently configured and scaled.

### Main Entry Points
- **`cmd/gateway/main.go`** - Main gateway service entry point with CLI interface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be limited to just cmd/gateway/main.go, the other 2 are likely to be eventually removed (they are not maintained anymore).

#### **Gateway Core (`gateway/`)**
- **`gateway.go`** - Main Gateway struct and orchestration logic
- **`system/`** - System-level server management (gRPC, HTTP, Data API servers)
- **`clustering/`** - Cluster membership and service discovery
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While "cluster membership and service discovery" is what this folder does, this statement is a bit confusing without mentioning the distinction between CNG service discovery and cluster service discovery. This particular folder may also be deprecated in the future, since we don't currently have a fully implemented implementation of CNG service discovery.

#### **Infrastructure Modules**
- **`auth/`** - Authentication (cbauth integration)
- **`ratelimiting/`** - Request rate limiting
- **`hooks/`** - Lifecycle hooks and barriers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hooks library enables hooking the GRPC implementation in various ways for testing. It's "testing hooks" rather than "lifecycle hooks".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants