Gateways
Gateways allow you to expose your Hop deployments to your project or the internet
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
Header | Description |
---|---|
x-forwarded-for | The IP of the client that made the request as it hits our network |
hop-edge-node | The node the gateway that proxied your request lives on |
hop-region | The region the gateway service lives on |
hop-gateway-id | The ID of your deployment’s gateway the request is going through. This will be prefixed with gateway_ |
hop-connecting-country | The country code of the client that made the request |
hop-connecting-ip | The IP of the connecting client |
x-real-ip | The IP of the originating client |
Response Headers
Header | Description |
---|---|
hop-edge-node | The node the gateway that proxied your request lives on |
hop-region | The region the gateway service lives on |
server | Indicating the response is from Hop, the value will be hop |