Skip to content

Commit

Permalink
docs: rename downstream client to proxy client
Browse files Browse the repository at this point in the history
  • Loading branch information
andydunstall committed May 6, 2024
1 parent 005cda6 commit e9088a6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Unlike many open-source tunnelling solutions, Pico is designed to serve
production traffic. Such as you may use Pico to expose services in a customer
network, a bring your own cloud (BYOC) service or to connect to IoT devices.

Upstream endpoints register with Pico via an outbound-only connection. Clients
then send HTTP(S) requests to Pico which will proxy the requests to a
Upstream endpoints register with Pico via an outbound-only connection. Proxy
clients then send HTTP(S) requests to Pico which will proxy the requests to a
registered endpoint.

Requests identify the target endpoint ID using either the `Host` header or an
Expand Down Expand Up @@ -60,7 +60,7 @@ ID, Pico load balances requests among those endpoints.
## Components

### Server
The Pico server is responsible for proxying requests from downstream clients to
The Pico server is responsible for proxying requests from proxy clients to
registered upstream endpoints.

Upstream endpoints register with Pico via an outbound-only connection. Clients
Expand All @@ -74,11 +74,11 @@ level domain is used as the endpoint ID. Such as if you send a request to
takes precedence over the `Host`.

Pico supports running as a cluster of server nodes. Upstream listeners and
downstream clients may connect to any node in the cluster and Pico manages
proxy clients may connect to any node in the cluster and Pico manages
routing requests to the correct listener.

The server exposes 4 ports:
* Proxy port: Listens for HTTP(S) requests from downstream clients and forwards
* Proxy port: Listens for HTTP(S) requests from proxy clients and forwards
the requests to upstream listeners (defaults to `8000`)
* Upstream port: Listens for connections from upstream listeners (defaults to
`8001`)
Expand All @@ -88,7 +88,7 @@ the requests to upstream listeners (defaults to `8000`)
(defaults to `8003`)

The server has separate proxy and upstream ports as upstream listeners and
downstream clients will be in separate networks (otherwise there isn’t any need
proxy clients will be in separate networks (otherwise there isn’t any need
for Pico). Such as you may expose the upstream port to the Internet for
external networks to register endpoints, though only allow requests to the
proxy port from nodes in the same network.
Expand Down
Binary file modified assets/images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/routing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion cli/server/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewCommand() *cobra.Command {
Short: "start a server node",
Long: `Start a server node.
The Pico server is responsible for proxying requests from downstream clients to
The Pico server is responsible for proxying requests from proxy clients to
registered upstream listeners.
Pico may run as a cluster of nodes for fault tolerance and scalability. Use
Expand Down
11 changes: 8 additions & 3 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ support for SDKs that register endpoints directly in the future.

## Server

The Pico server is responsible for accepting incoming proxy requests, then routing the requests to an appropriate endpoint connection.
The Pico server is responsible for accepting incoming proxy requests, then
routing the requests to an appropriate endpoint connection.

Incoming requests identify the target endpoint ID using either the ‘Host’ header or ‘x-pico-endpoint’ header.
Incoming requests identify the target endpoint ID using either the ‘Host’
header or ‘x-pico-endpoint’ header.

Pico is designed to be deployed as a cluster of server nodes, where both upstream endpoint connections and downstream client requests may be routed to a random node in the cluster via a load balancer. Therefore Pico must manage forwarding a request to node A to an endpoint connected to node B.
Pico is designed to be deployed as a cluster of server nodes, where both
upstream endpoint connections and proxy client requests may be routed to a
random node in the cluster via a load balancer. Therefore Pico must manage
forwarding a request to node A to an endpoint connected to node B.

<p align="center">
<img src="../assets/images/routing.png" alt="routing" width="40%"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/manage/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ join any existing nodes.

## Ports

The proxy port accepts connections from downstream clients. It only
The proxy port accepts connections from proxy clients. It only
supports HTTP and defaults to port `8000`.

The upstream port accepts connections from upstream listeners via
Expand Down
2 changes: 1 addition & 1 deletion server/server/proxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (s *Server) registerRoutes() {
s.router.NoRoute(s.notFoundRoute)
}

// proxyRoute handles proxied requests from downstream clients.
// proxyRoute handles proxied requests from proxy clients.
func (s *Server) proxyRoute(c *gin.Context) {
ctx, cancel := context.WithTimeout(
context.Background(),
Expand Down

0 comments on commit e9088a6

Please sign in to comment.