Docs

High Availability

Run more than one Sertone gateway and your services stay online automatically — even if one gateway goes down for maintenance, a power cut, or an unexpected failure. No load balancer required. No configuration beyond the second container.

What You Get

With a single gateway, if the machine goes offline your services are unreachable until it comes back. With two or more gateways:

How to Enable It

Start a second Sertone gateway. That is all. The gateways find each other automatically and begin sharing the load.

Each gateway is an identical Docker container. There is nothing to configure between them — no pairing step, no shared secrets, no configuration file to sync. If both gateways are running and connected to the Sertone network, they work as a cluster.

docker run -d --name sertone-2 \
  -p 80:80 -p 3002:3002 \
  -v sertone-data-2:/app/data \
  --restart unless-stopped \
  sertonenet/gateway:latest
Each gateway needs its own data volume. The -v sertone-data-2:/app/data flag ensures the second gateway has its own identity and storage. Never share a data volume between two running gateways.

Minimum Setup

2 gateways — basic redundancy

Two gateways give you failover: if one goes down, the other takes over. This is sufficient for most use cases. Both gateways should be on different machines — ideally in different data centers or cloud providers.

3 gateways — recommended for production

Three gateways let you take one offline for planned maintenance while the other two continue serving without interruption. This is the recommended setup for any service with uptime requirements.

More than 3

There is no limit. Add as many gateways as you need. More gateways means more capacity and more geographic coverage.

Geographic Distribution

For services with global consumers, placing gateways in different regions reduces latency. Consumers automatically connect to the closest available gateway. You do not need to configure this — it is handled automatically based on network proximity.

Example setup:

Consumers in each region connect to the nearest gateway. If that gateway goes offline, they are automatically rerouted to the next nearest.

Zero-Downtime Updates

Sertone gateways update themselves automatically when a new version is released. In a cluster, updates happen one gateway at a time:

  1. One gateway signals that it is going offline briefly for an update.
  2. Consumers are rerouted to the remaining gateways — no requests are dropped.
  3. The gateway updates (typically under 60 seconds) and comes back online.
  4. The next gateway updates. The process repeats until all are current.

Your consumers see none of this. From their perspective, the service was never interrupted.

Monitoring Your Cluster

Your gateway's dashboard shows how many other gateways are currently active in your cluster. The Cluster section of the dashboard displays:

You can set up email alerts in Settings → Alerts to be notified when a peer gateway becomes unreachable.

Adding and Removing Gateways

To add a gateway: start a new container. It joins the cluster automatically within a minute or two.

To remove a gateway: stop or delete the container. The remaining gateways detect its absence and stop routing to it automatically. No cleanup required on the other gateways.

Frequently Asked Questions

Do my gateways need to be in the same location?

No. They can be anywhere in the world — different cities, different clouds, different providers. The further apart the better for resilience.

Can I add a gateway without taking my service offline?

Yes. Adding a gateway is a live operation. Your existing gateway keeps serving consumers while the new one joins.

What happens to a consumer request if it hits a gateway that is going down?

If a gateway goes down mid-request, that specific request will fail with an error. The consumer SDK retries automatically. If a request fails, the consumer is not charged. Subsequent requests are automatically routed to a healthy gateway.

Do I need a load balancer?

No. Sertone handles routing between gateways automatically. Adding an external load balancer is unnecessary and adds complexity without benefit.

Do all my gateways need to offer the same services?

Each gateway manages its own service catalog independently. You can have all gateways offer the same services, or specialize different gateways for different service types. Consumers are automatically routed to a gateway that offers the service they requested.