There are 2 types of gateways: Internal or External. External gateways expose your deployment to the internet under a protocol of your choice, e.g. HTTP. Internal gateways expose your deployment to your project by giving you an IP address and customizable internal domain to use.

Currently, both gateway types round-robin requests between containers. In the future, there will be more fine grained controls for load balancing requests.

Creating a Gateway

You can create a gateway using the Hop Console or the Hop CLI.

Adding Custom Domains

By default, every external gateway gets assigned it’s own .hop.sh domain, generated using the deployment name. You have the choice to update this subdomain to something not taken already, or you can add your own custom domains.

Headers

When HTTP requests are sent to your services, they are proxied through our edge network where we append the following headers onto the final request.

Request Headers

HeaderDescription
x-forwarded-for The IP of the client that made the request as it hits our network
hop-edge-nodeThe node the gateway that proxied your request lives on
hop-regionThe region the gateway service lives on
hop-gateway-idThe ID of your deployment’s gateway the request is going through. This will be prefixed with gateway_
hop-connecting-countryThe country code of the client that made the request
hop-connecting-ipThe IP of the connecting client
x-real-ipThe IP of the originating client

Response Headers

HeaderDescription
hop-edge-nodeThe node the gateway that proxied your request lives on
hop-regionThe region the gateway service lives on
serverIndicating the response is from Hop, the value will be hop