-
Notifications
You must be signed in to change notification settings - Fork 53
Server
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).
Each server node has 4 ports:
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.
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.
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.
The gossip port is used for gossip traffic between server nodes.
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.
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.
See Configuration.