wss://relay.austrich.net is an experimental Nostr relay running on 4 virtual servers (VPS) distributed across the world and uses geographical DNS to connect users to the “closest” server. The servers are running the strfry relay software and events are streamed between the servers. HAProxy is configured as the SSL reverse proxy in front of strfry.
The current four servers are located in Australia, the US, the UK and Chile. The following map shows the approximate locations of the servers and the bidirectional streaming that is configured between them.
ClouDNS GeoDNS is used for DNS with four records created for relay.austrich.net supporting different regions.
- Oceania points to the Australian server
- Europe points to the UK server
- South America points to the Chile server
- The rest of the world uses a default entry pointing to the US server
HTTPs health checks are configured for each server with DNS failover rules in place to redirect to a different server in the case of a failure.
- Oceania will failover to US, then the UK
- Europe will failover to the US, then Australia
- South America will fail over to the US server then Europe
- The default will fail over to Europe then Australia
Overall this design appears to work well, users are connected to all relays and events sent to one are seen on the others. Further scalability testing is needed however as there are only a small number of users on each sever at present.