← Back to context

Comment by csdvrx

7 days ago

Get 2 VPS, put your DNS on both (ns1, ns2), use low TTL values, use geolocalization or a rough rule of thumb to have each redirect traffic to the VPS the closest to your client or with the least load

Finally, make each VPS check on the health of the other to stop its DNS pointing to the other VPS: you will already have to have them check on eachother for the load checks.

It's a fun and practical exercise (you may have to write your own DNS servers), after which you can then think on how to do that for more than 2 VPS and the algorithms it entails

Route53 handles this already, health checks, geo routing for pennies. If pointing to AWS services can use alias records.

  • > Route53 handles this already, health checks, geo routing for pennies. If pointing to AWS services can use alias records.

    That would use AWS and insulate you from the details.

    The fun part is learning how to do that, which gives you a better idea of how it works and full control of the solution.

    You can then think about anycast or getting your own IP blocks

    • I hear you, but I also could write my application in assembly and take 10x as long. If your doing this as a hobby and for fun, sure... But if your trying to launch/scale a company, decisions like this are engineering mode not founder mode.

      1 reply →