Search This Blog

Showing posts with label routing. Show all posts
Showing posts with label routing. Show all posts

Sunday, December 9, 2012

High availability pattern using anycast IP addresses for cloud and applications

Anycast architecture that helps to create and achieve HA

To run efficiently applications demands more and more resources. Even with the right amount of computational resources like servers, CPU, RAM, storage for them to be considered efficient and successfully on the market they have to meet many more requirements. It is impossible to list here all of them as they can depend on internal factors (for example driven by the application architecture itself ) or relay on external factors that may be specific and unique to a customer and an environment.

Although in this short blog post, I would like to discuss the importance of scalability factor and show one patters that can be used to build a highly available and efficient infrastructure systems.

There are two concept how we can try to implement a scalability: scale up vs scale out. For more information about scale up (or vertical scaling) these links provide further information [1]. We will concentrate here only on the scale out option. All the pictures below are base on this presentation that slides can be found here: OpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer.
  1. To fully benefit from the HA pattern your application architecture should relay use share nothing paradigm

  2. That way if failure occurs only an isolated, small part of the computational resources will be impacted.


  3. Next we have to configure our routers and implementing necessary changes for a routing protocol.
  4. OSPF routing protocols is an examples and others can be used in similar way as well. For more info can be found here [4].


    The slides show only a fraction of the configuration. Another good example with con figs can be found here:  Anycast DNS - Part 4, Using OSPF

  5. As last you have to configure you servers to listen and accept traffic for our anycast IP.
A best practice is to configure the external IP on the loopback interface, disable ARP protocols for it and bind our application specifically to this IP.

References
  1. http://en.wikipedia.org/wiki/Scalability
  2. https://devcentral.f5.com/blogs/us/lots-of-little-virtual-web-applications-scale-out-better-than-scaling-up
  3. Seattle Conference on Scalability: Lessons In Building Scalable Systems
  4. What is “anycast” and how is it helpful?

Wednesday, November 7, 2012

What IP addresses are initialy assigned on a new cloud server

I have spun up a standard tiny/small cloud server using the Amazon Cloud Console, Rackspace Cloud Control Panel and the HP Management Console [1]. We can see that for every vendors the provisioned cloud servers have different network settings.

Problem

What is a standard IP and routing configuration on a freshly built cloud server.

Solution
  1. Rackspace

    Example network config for Rackspace NextGen cloud server

    root@manage2:~# ip a
    1: lo: LOOPBACK,UP,LOWER_UP mtu 16436 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether bc:76:4e:08:07:f4 brd ff:ff:ff:ff:ff:ff
        inet 5.79.xx.yy/24 brd 5.79.xx.yy scope global eth0
        inet6 2a00:1a48:7805:111:8cfc:xxx:yyy:zzz/64 scope global
           valid_lft forever preferred_lft forever
        inet6 fe80::be76:aaa:bbb:ccc/64 scope link
           valid_lft forever preferred_lft forever
    3: eth1:  BROADCAST,MULTICAST,UP,LOWER_UP  mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether bc:76:4e:08:04:39 brd ff:ff:ff:ff:ff:ff
        inet 10.178.195.rrr/18 brd 10.178.255.255 scope global eth1
        inet6 fe80::be76:4eff:rrrr:sss/64 scope link
           valid_lft forever preferred_lft forever
    
    root@manage2:~# ip route
    default via 5.79.21.1 dev eth0  metric 100
    5.79.21.0/24 dev eth0  proto kernel  scope link  src 5.79.aa.bbb
    10.176.0.0/12 via 10.178.192.1 dev eth1
    10.178.192.0/18 dev eth1  proto kernel  scope link  src 10.178.195.191
    


  2. Amazon

  3. Example network config for Amazon EC2 cloud server

    ubuntu@ip-10-203-43-168:~$ ip a
    1: lo:  LOOPBACK,UP,LOWER_UP  mtu 16436 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: eth0:  BROADCAST,MULTICAST,UP,LOWER_UP  mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether 12:31:3b:09:28:5a brd ff:ff:ff:ff:ff:ff
        inet 10.203.43.168/23 brd 10.203.43.255 scope global eth0
        inet6 fe80::1031:3bff:fe09:285a/64 scope link
           valid_lft forever preferred_lft forever
    
    ubuntu@ip-10-203-43-168:~$ ip route
    default via 10.203.42.1 dev eth0  metric 100
    10.203.42.0/23 dev eth0  proto kernel  scope link  src 10.203.43.168
    


  4. HP Cloud
Example network config for HP Openstack cloud server

[root@server-1352331143-az-3-region-a-geo-1 ~]# ip a
1: lo:  LOOPBACK,UP,LOWER_UP  mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0:  BROADCAST,MULTICAST,UP,LOWER_UP  mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 02:16:3e:70:b7:9e brd ff:ff:ff:ff:ff:ff
    inet 10.2.0.219/15 brd 10.3.255.255 scope global eth0
    inet6 fe80::16:3eff:aaaa:bbbb/64 scope link
       valid_lft forever preferred_lft forever
3: sit0:  NOARP  mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0

[root@server-1352331143-az-3-region-a-geo-1 ~]# ip route
169.254.0.0/16 dev eth0  scope link
10.2.0.0/15 dev eth0  proto kernel  scope link  src 10.2.0.219
default via 10.2.0.1 dev eth0



References
    http://rtomaszewski.blogspot.co.uk/2012/08/links-to-cloud-provider-web-management.html http://aws.amazon.com/free/