Skip to content
Andy Dunstall edited this page Jul 17, 2024 · 1 revision

The Piko server is responsible for routing traffic from downstream clients to upstream listeners. See How Piko Works for details.

Start a server node with piko server (see piko server -h for available options).

Ports

Each server node has 4 ports:

Proxy Port

The proxy port receives traffic from downstream proxy clients which it routes to upstream listeners.

Depending on your deployment, the proxy port may be exposed to the Internet or only accessible from clients in the same network as the Piko server.

Such as when building a bring your own cloud (BYOC) service, the client may be a control plane sending requests to external networks, in which case the client can be deployed in the same network as the Piko server to avoid having to expose the proxy port. Whereas if you need access to the proxy port from your local machine or an external network, it will need to be exposed.

When the proxy port is exposed to the Internet you should enable TLS and authentication.

Upstream Port

The upstream port accepts connections from upstream listeners.

The upstream port will usually be exposed to the Internet so upstream listeners can connect from external networks, therefore you should enable TLS and authentication.

Admin Port

The admin port exposes a health/ready status, metrics, and a status API to inspect the server.

The metrics can be scraped using the Prometheus endpoint exposed at /metrics.

The status API is used by the piko server status command to inspect the server, such as to understand what nodes are in the cluster or which upstream listeners are connected.

The admin port should not be exposed to the Internet. If you must expose it, you should enable TLS and authentication.

Gossip Port

The gossip port is used for gossip traffic between server nodes.

Hosting

Cluster

The Piko server is designed to be hosted as a cluster of nodes for fault tolerance and scalability (see How Piko Works).

Nodes communicate using a gossip protocol, which is used for service discovery and propagating routing information.

The cluster should be deployed in a single region, distributing nodes across availability zones.

Load Balancing

The Piko cluster should typically be hosted behind a HTTP(S) load balancer.

The load balancer must support WebSockets which are used by upstream listeners to connect to Piko.

Configuration

See Configuration.