FerryDocs
ConceptsServices

Web services

A web service is a public HTTP app. The proxy sends its requests to the instances in turn.

Edit on GitHub
BrowserProxyapi.localhostInstance 1Instance 2

The proxy receives each request for the hostname of the service.

1 / 3

A is a public HTTP app. The gives the requests to its in turn. This is .

The proxy sends <name>.<domain> to the service, for each domain of the server. It also sends each custom domain of the service to it.

HTTP/1.1, and pass through the proxy.

Create a web service

Terminal
ferry create api --repo https://github.com/you/api --health /healthz --instances 2

--health sets the path of the health check. --instances sets the number of instances.

What your app must do

Your app must listen on the in the PORT environment variable, on the address 0.0.0.0.

An app that listens on 127.0.0.1 in its container gets no traffic.

On this page