Zaroz
Units

Public ports and HTTPS endpoints

An endpoint is how the outside world reaches your Workload. There are three kinds, and you pick by what you run and by whether clients may land on any unit.

httpsportunit
Fora website or an API (WebSockets included)anything else: a game server, a database, a custom protocolclients that must reach one specific unit
Addressa free platform host, plus your own domainsone public IP address and port Zaroz assigns, for the whole Workloadone public IP address and port for each unit
Reachesall ready unitsall ready unitsthat one unit only
ProtocolTCP carrying HTTP; TLS is handled for youtcp, udp, or tcp_udp on one numbertcp, udp, or tcp_udp on one number
Costfreebilled by the hour it is held (see Billing)billed like a port, once per unit

With one unit, port and unit reach the same place. The difference only matters once you run several.

HTTPS endpoints

An HTTPS endpoint publishes one container port. Your app serves plain HTTP on that port, and Zaroz terminates TLS with an automatic certificate.

  • The free host looks like <label>.zone.<zone>.zaroz.cloud. You may choose the label.
  • You can attach your own domains. Each must be a domain your organization has verified, or a subdomain of one. A domain that later loses verification stops being served.
  • The request is spread across all of your ready units.
  • It is all or nothing: if one domain is refused, nothing opens.

Public ports

A public port maps one port inside your container (internal_port) to a public address and port that Zaroz assigns. The assigned address and number come back in the response.

  • tcp_udp is one endpoint and one price, carrying both protocols over one public number.
  • Closing a port stops its billing from that moment. Nothing was prepaid, so there is nothing to refund.
  • A closed port stays in the list, with its last address, so a month's invoice can be read against it.

One port for all units (port)

A port is one public address for the whole Workload. When the Workload runs several units, new connections to that address are spread across every ready unit, whichever server it runs on. You keep handing out one address while you scale.

  • Which unit a client reaches. Each new connection goes to one unit, chosen from the last byte of the client's IPv4 address. So one client's connections, TCP and UDP alike, keep reaching the same unit while the set of units stays the same. Clients are divided between units, not single connections, so a few busy clients can load one unit more than another.
  • A connection stays where it started. When units are added or removed, only new connections are sent differently. A connection that is already open stays on its unit until it ends, and that holds for UDP flows too.
  • Ready means accepting. A unit receives connections once it is ready. When the Workload has a TCP endpoint, a unit is ready once its first TCP endpoint's container port accepts connections; a Workload whose ports are all UDP has no such check, so a unit counts as ready once it is running.
  • Joining and leaving. A unit that becomes ready starts receiving new connections within about a minute. A unit that stops being ready stops receiving them within about a minute.
  • Scaling down and stopping. Before a unit is stopped or scaled away, it is taken off the port first, so new connections go to the other units. Connections already open on it last until the unit exits.
  • No ready unit, no connection. While no unit is ready, new connections to the port are not delivered anywhere.
  • At most 64 units receive connections from one port.

Your program does not have to do anything for this. It listens on internal_port exactly as it would with one unit. Because two clients can land on two different units, keep anything clients share in a database or another shared store (see Units).

One port per unit (unit)

A unit endpoint gives every unit its own public address and port for that container port, and each one reaches that unit alone. Use it when a client must reach a specific unit, for example players joining one particular game server.

  • Adding it opens the port on every unit that exists. A unit added later gets its own port when it is added.
  • A unit's address stays the same across its restarts, and is released when the unit is scaled away.
  • Each unit's address is in its public_endpoints (GET .../units), and the endpoint list shows each one with the unit_ordinal it belongs to.
  • Each is billed like a port, so four units are four ports. Removing one removes that container port from every unit.
  • It is added to a running Workload, not asked for at purchase: its units do not exist yet when you buy.
  • Asking for a per-unit port on a container port and protocol that already has one is refused with port_in_use.

Free ports and extra ports

A plan can include some free port slots. A Workload's plan includes none, so every raw port, shared or per unit, is billed. HTTPS endpoints are always free.

Pending ports

A port you ask for when buying is pending until the service is running. Nothing is billed while it is pending, and pending_reason says why it has not opened. You can withdraw a pending request the same way you close an open port.

Refusals

When a request is refused, the details field starts with a reason code before the colon:

codemeaning
not-readythe service is not running yet
port-limitall the plan's ports are in use
port_in_usethat container port is already open with that protocol, or already has an HTTPS endpoint or a per-unit port
no_address_available, no_port_availablenothing free right now; try again later
internal_port_out_of_rangethe port is not between 1 and 65535
protocol_required, unknown_protocola port or unit needs tcp, udp or tcp_udp
invalid_endpointthe request does not fit the kind, for example a label or domains on a raw port, or a unit endpoint asked for at purchase
invalid_host_label, host_taken, https_limitthe HTTPS label or count is not allowed
invalid_domain, platform_domain, domain_taken, domain_not_verified, domain_limita custom domain was not accepted

The step-by-step is in Add a public port.

API status

The endpoint routes are used by the console and are tagged console-only in the API reference. They accept your session token or an API token, and refuse application tokens.

Last modified on