Virtual Web Cluster

Embed Size (px)

Citation preview

  • 7/27/2019 Virtual Web Cluster

    1/10

    Virtual web clusterIn the virtual web cluster there is no switch

    that is the (first) target for all requests.

    Since there is no one that can distribute the

    traffic we need to make all servers to

    receive all traffic and then the servers

    should investigate the packet and exactly

    one should say yes I do it! All the othersshould skip the packet.

    Two ways to get all messages toall servers

    1. Unicast MAC address

    2. Multicast MAC address

  • 7/27/2019 Virtual Web Cluster

    2/10

    Unicast MAC address

    R

    SVIP MAC

    SVIP MAC

    SVIP MAC All servers have the

    same VIP address

    and the same MAC

    address!

    Unicast MAC address (2)

    Note:

    It must be possible to change the MACaddress in the adapter card

    It must be possible to install the MACaddress in the ARP cache of the router (it

    may not ARP!) The servers must be on the same network

    The servers cannot talk to each other!!!!!

  • 7/27/2019 Virtual Web Cluster

    3/10

    Add a new network for internal

    communication

    R

    SVIP MAC

    SVIP MAC

    SVIP MAC

    IP1

    IP2

    IPn

    MAC1

    MAC2

    MACn

    Multicast MAC address

    R

    SVIP MMAC

    SVIP MMAC

    SVIP MMAC

    IP1

    IP2

    IPn

    MAC1

    MAC2

    MACn

  • 7/27/2019 Virtual Web Cluster

    4/10

    Multicast MAC address (2) Keep private IP address and private MAC address

    Set all server adapters to listen to a specifiedMulticast MAC address (MMAC)

    Set the router ARP to send all VIP packets toMMAC (No ARP allowed!) This is not possiblefor all routers.

    The ordinary IP addresses and MAC addresses are

    there. Therefore the servers can talk to each otherand you can talk to an individual server fromoutside if needed.

    Selection mechanisms in allservers

    In both cases all servers are getting all

    requests. Therefore we need a selection

    mechanism in them which assures that

    exactly one server is taking the request and

    all follow on packets!

  • 7/27/2019 Virtual Web Cluster

    5/10

    Distributed web systemsIn distributed web systems the clients can see

    the different IP-addresses that the servers

    have.

    The selection of which server to use is done

    either on the DNS level or on the server

    level.

    Distributed web systems, DNSrouting

    (p273)

    If we can control the authoritative DNS server

    we translate the first DNS request to server-

    1, the next one to server-2 etc.

    This will make the clients to ask different

    servers but

  • 7/27/2019 Virtual Web Cluster

    6/10

    Distributed web systems, DNS

    (2) DNS caching makes the method less

    efficient.

    Small TTLs are needed, which howeverincreases the load on the network.

    The clients cache translations anyhow,independent of TTL.

    We dont need to have the servers at onephysical location.

    Distributed web systems, serverrouting

    We can allow the original request to arrive toany server and then this server will, ifneeded, try to get the communication to betransferred to the correct server:

    Methods

    1. Triangulation using tunneling2. HTTP redirection

    3. URL rewriting

  • 7/27/2019 Virtual Web Cluster

    7/10

    1. Triangulation using tunnelingThe first server gets the request and tunnels it

    to the correct server.

    The correct server creates an answer and

    sends it directly to the client. We have got a

    triangle.

    The next interaction will continue with the

    first server again etc.

    2. HTTP redirection

    The first web server responds with a status

    code 301 or 302 to instruct the client to

    resubmit the request to another server.(p 284)

    + the rerouting can be done on a medium

    granularity level and can be content aware.- We will get extra long distance traffic.

  • 7/27/2019 Virtual Web Cluster

    8/10

    3. URL rewritingThe server which responds to the first file request

    dynamically changes all URL to point to the

    server which should do the work in the future.

    - May cause extra DNS traffic and cause extra work

    on the redirecting web server for interpretation of

    links.

    + This may be implemented totally on user level.(p 286)

    Dispatching

    Up to now we have mostly been concerned with the

    technology to get the request to be served by a

    certain server.

    Now we will discuss the decision issue: Which

    server should do the job and when decided it will

    be implemented by the methods described earlier.

    This is calledDispatchingof the request.(p 288, 289)

  • 7/27/2019 Virtual Web Cluster

    9/10

    Content blind

    Static dispatchingStatic dispatching is one of the alternatives for

    switches working on level 4:

    Random assignment

    Round robin assignment

    Both methods can easily be adapted to the

    situation when servers have different

    capacities.

    Server state aware dispatching

    The idea is to gather information from the

    servers about the current load situation and

    dispatch new request to the least loaded

    server.

    If no of request being processed is the

    measure we need to adjust according to thepower of the server.

  • 7/27/2019 Virtual Web Cluster

    10/10

    Content aware dispatchingContent aware dispatching can be used for

    different purposes:

    Improve reference locality to make servercaches more efficient (cache affinity)

    Allow specialized servers (for streamingmedia for example)

    Better load sharing between the servers(p 291)