Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Anycast network and How it works.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Anycast network and How it works.

arunarun Member

I believe a small anycast network is possible to be setup by anyone who own a /24 IP and possibility to announce (BGP) it from multiple location.

I am trying to grasp the below scenarios:

  1. Anycast addresses allow you to send a packet to a set of receivers but only one of them will receive it. How it is routed and managed? In other words how it is ensured packet is always sent to the nearest receiver.

  2. If at any location, server is down at application level. Is there a chance to stop sending packets to this location.

  3. With a simple setup like above can we add failover or HA features.

Please excuse me if i am wrong not clear. Can someone please help me to understand this.

Thanked by 1elgs

Comments

  • randvegetarandvegeta Member, Host Rep

    arun said: Anycast addresses allow you to send a packet to a set of receivers but only one of them will receive it. How it is routed and managed? In other words how it is ensured packet is always sent to the nearest receiver.

    You cannot control which server/location will receive the packet, but BGP tends to favour lowest number of hops. Generally speaking this tends to result in the nearest server receiving the packets. i.e if you have a server in the US and UK (on the same IP) and your client is in Germany, then it is most likley, but not guaranteed, that the UK server would receive the packet.

    arun said: If at any location, server is down at application level. Is there a chance to stop sending packets to this location.

    If it's just the server that's down, no. If the network/router is down, then yes. As soon as the router/network goes down, the IPs stop getting advertised at that location and so all will route to the other location. But if it's just the server that's down then the router advertising the /24 will still receive the packets, but it just wont go anywhere.

    arun said: With a simple setup like above can we add failover or HA features.

    Depends on what you want to do. Serving static content or DNS, sure! But if you want the same content/services to be accessible from multiple locations through anycasting, there needs to be replication between your 2 sites, or at least some sort of synchronization. For serving static files, it's fairly simple, but if you want to allow your clients to say.. upload content via FTP, then it would only upload to 1, and then you would need to sync the 2 servers. Likewise if you want to serve mail, you need to sync the 2 servers WITHOUT creating conflicts, which may be possible. For example, 2 people upload a 2 different files with the same file name to the same directory but 1 on each server. Then what happens when it comes to syncing? Very simple example I know. So what do you want to do?

    Thanked by 1arun
  • blackblack Member

    I always believe that HA should be achieved on the application level. If you go to the server or network level then it's not very good. For example, if your server has HA / failover and all that good stuff, what happens when your database crashes? Your server is still up but it's not useful.

    It's better to just write monitoring script that sees if your website is running normally and if it doesn't, switch the A record to a backup server and have it in read only mode.

    Thanked by 2arun MikeA
  • arunarun Member

    Thank you very much for your detailed explanation. I got it, mostly anycast rely on shortest-path calculations to funnel clients to multiple locations. Are there some pre-build sync mechanism which are commonly used?

  • randvegetarandvegeta Member, Host Rep

    @arun said:

    Thank you very much for your detailed explanation. I got it, mostly anycast rely on shortest-path calculations to funnel clients to multiple locations. Are there some pre-build sync mechanism which are commonly used?

    It really depends on your application. Serving static content is easy. You could simply rsync the 2 servers assuming you have a 2nd IP uniquie to each server. You can setup a cron every X mins to sync the data. But then you should probably work on a master/slave basis.

    But dont expect to be able to run like a cpanel server in 2 places on the same IP with the same content. Thats probably not going to happen :)

Sign In or Register to comment.