Dynamic Real Server Creation Using DNS

You can use DNS to simplify real server creation, by specifying a DNS hostname instead of an IP address. In this case, the ACOS device periodically sends a DNS query for the hostname’s IP address, and dynamically creates a real server with the IP address returned by DNS. ACOS also creates a service-group member for the server, in each service group that contains the server.

To create and maintain dynamic real servers, the ACOS device sends a DNS query for each hostname real server, at a configu­rable interval.

     If the DNS server replies with an Address (A) record for a hostname real server, the ACOS device creates the server or, if the server is already created, the ACOS device refreshes its TTL. ACOS also creates service-group members for the server and its ports.

     If the DNS server replies with a CNAME record, the ACOS device also sends a DNS query for the CNAME.

ACOS supports multiple servers with the same hostname. For example, if the DNS server replies with a different IP address for a hostname real server that has already been created, the ACOS device creates a second real server with the same hostname and the new IP address.

If the IP address returned by the DNS server matches the IP address of a statically configured real server, the server is not cre­ated.

Service groups can contain both static and hostname servers.

Dynamic Server Aging

Dynamically created real servers do not persist indefinitely. Instead, they age out based on the TTL values returned by the DNS server.

ACOS sets a server’s initial TTL when the server is created. The initial TTL value is the greater of the following:

     TTL value in the DNS reply

     DNS query interval multiplied by the min-ttl-ratio (described in Template Options for Dynamically Created Real Servers)

The server’s TTL is decremented by 60 every minute. The TTL is refreshed each time the DNS server replies with the address.

If the TTL reaches 0, the dynamically created server is removed. If the DNS server replies with the IP address after this, the server is dynamically created again.

Notes

     Dynamically created real servers have higher priority than statically created real servers, by default. If your configura­tion uses a combination of dynamically created real servers and statically created real servers, the dynamically created real servers are used more. This is true even if you leave the default load-balancing method, round robin, enabled. (To use round robin, see CLI Example – Using Round Robin with a Mix of Dynamic and Static Real Servers)

     When a dynamically created real server ages out, only that instance of the server (its port and service group member) is removed. Other instances (other IP addresses) for the same server (hostname) are not removed, unless they also age out. The real server configuration that you entered, used by the ACOS device to dynamically create servers, is not removed.

Template Options for Dynamically Created Real Servers

The options that can be configured for static servers and ports also apply to dynamic servers and ports.

In addition, server and server port templates have some new options, specifically for dynamic real servers.

NOTE:                               These template options take effect when you apply a template to a dynamic server con­figuration. After this, any dynamic real servers that are created using the dynamic server configuration use the template values that were set when the template was applied to the dynamic server configuration, even if the values are later changed in the template.

Server Template Options for Hostname Real Servers

     dynamic-server-prefix – Specifies a short string to add to the front of the name for each dynamically created real server. Dynamically created servers are named using the following format:

prefix-ipaddr-hostname

     The prefix is the string added by the ACOS device. You can specify a string of 1-3 characters. The default is “DRS”, for Dynamic Real Servers.

     The ipaddr is the IP address returned in the DNS reply.

     The hostname is the hostname you specify when you create the server configuration.

The maximum total length of a dynamic server name is 63 bytes. If the name becomes longer than 63 characters, the ACOS device truncates the name to 63 bytes.

     dns-query-interval – Specifies the interval at which the ACOS device sends DNS queries for the IP addresses of the dynamic real servers. You can specify 1-1440 minutes (one day). The default is 10 minutes.

     max-dynamic-server – Specifies the maximum number of real servers that can be dynamically created for a given hostname. You can specify 1-1023. The default is 255. After the maximum number of servers is created, the ACOS device deletes the oldest servers, as determined by the time it was created, to make room for new ones.

     min-ttl-ratio – Specifies the minimum initial value for the TTL of dynamic real servers. This option prevents dynamic real servers from aging out too quickly due to a small TTL value from the DNS server.

To calculate the minimum TTL value for a dynamic real server, the ACOS device multiplies the dns-query-interval by the min-ttl-ratio. For example, if the min-ttl-ratio is 2 and the dns-query-interval is 10 minutes (600 seconds), then the mini­mum TTL for dynamic real servers is 1200. The min-ttl-ratio can be 1-15. The default is 2.

Server Port Template Options for Dynamic Service-Group Members

     dynamic-member-priority and decrement-delta – Sets the initial priority of dynamic service-group members, and specifies how much to decrement from the priority after each DNS query.

Within a service group, the priorities of the members determine which of those members can be used to service client requests. Normally, only the highest priority members can be used. Decrementing the priorities of dynamic members provides a way to ensure that the service group uses newer dynamically created members instead of older ones.

The initial priority can be 1-16, and the default is 16. The delta can be 0-8, and the default is 0.

The priority value decrements only when the IP address is not refreshed after a DNS query. For example, assume a DNS query returns IP address 1.1.1.1, and the ACOS device creates a dynamic server with priority 16. However, the latest DNS query returns IP address 2.2.2.2 only. In this case, the priority of 1.1.1.1 is decremented by the delta value. If a later DNS query returns 1.1.1.1 again, the priority of server 1.1.1.1 is reset to 16.

If you leave the delta set to its default (0), service-group member priorities are not decremented.

NOTE:                               Settings that also apply to static servers and ports, such as connection and rate limits, apply individually to each dynamically created server or port. For example, the connec­tion-rate limit configured in a server template applies individually to each dynamically created server for a given hostname. The limit is not applied collectively to all dynami­cally created servers for the hostname.

Configuring Dynamic Real Server Creation

You can configure dynamic real servers using the GUI or CLI.

Using the GUI

1.     Configure the server template:

a.     Hover over ADC in the navigation bar, and select Templates from the drop-down menu.

b.     Select ADC on the menu bar.

c.     Click the green New Template button. A drop-down menu appears.

d.     Select Server. The Create Server Template dialog appears.

e.     Enter a name for the template.

f.       Configure the following options. (See Template Options for Dynamically Created Real Servers.)

     DNS Query Interval

     Dynamic Server Prefix

     Min TTL Ratio

     Max Dynamic Server

g.     Click Create.

2.     Create the real servers:

a.     Select ADC > SLB.

b.     On the menu bar, select the Servers tab.

c.     Click Create.

d.     In the Name field, enter a name for the real server.

e.     Select the address Type radio button: IPv4, IPv6, or FQDN.

f.       Enter the IP Address or FQDN hostname that is known to DNS.

g.     Expand the Advanced Fields, and select the template from the Template Server drop-down menu.

h.     Configure additional options for the real server and add ports, as applicable to your deployment.

i.       When finished, click Create.

3.     Configure a template for the server port:

a.     In the Port section of the page, click Create.

b.     Enter number in the Port Number field.

c.     Click Advanced Fields to expand and configure the advanced options for this server port.

d.     To the far-right of Template Port, click the Add+ link. The Create Port Template appears.

e.     Enter a name for the port template in the Name field.

f.       Configure the following options. (See Template Options for Dynamically Created Real Servers.)

     Dynamic Member Priority

     Decrement Value

g.     Click Create.

4.     Configure the service group:

a.     Select ADC > SLB.

b.     On the menu bar, select the Service Groups tab.

c.     Click Create.

d.     Enter a name for the service group in the Name field.

e.     Click Advanced Fields to expand and configure the advanced options for this service group.

f.       Select the Port template from the Template Port drop-down menu.

g.     In the Member section, click Create.

h.     Select the Existing Server radio button, and then select the Server from the drop-down menu.

i.       Enter the number in the Port field.

j.       Click Create.

k.      Click Update to complete the service group configuration.

Using the CLI

The following commands configure hostname server parameters in a server port template and a server template:

ACOS(config)#slb template port temp-port

ACOS(config-rport)#dynamic-member-priority 12

ACOS(config-rport)#exit

ACOS(config)#slb template server temp-server

ACOS(config-rserver)#dns-query-interval 5

ACOS(config-rserver)#min-ttl-ratio 3

ACOS(config-rserver)#max-dynamic-server 16

ACOS(config-rserver)#exit

 

The following commands configure a hostname server, add a port to it, and bind the server template to it:

ACOS(config)#slb server s-test1 s1.test.com

ACOS(config-real server)#template server temp-server

ACOS(config-real server)#port 80 tcp

ACOS(config-real server-node port)#exit

ACOS(config-real server)#exit

 

The following commands configure a static real server:

ACOS(config)#slb server s-test2 10.4.2.1

ACOS(config-real server)#port 80 tcp

ACOS(config-real server-node port)#exit

ACOS(config-real server)#exit

 

The following commands configure a service group and add the hostname server and static server to it. The port template is bound to the member for the hostname server and port. 

ACOS(config)#slb service-group sg-test tcp

ACOS(config-slb svc group)#member s-test1 80 

ACOS(config-slb svc group-member:80)#template temp-port

ACOS(config-slb svc group-member:80)#member s-test2 80

ACOS(config-slb svc group-member:80)#exit

ACOS(config-slb svc group)#exit

 

The following commands adds the DNS server to use for resolving the real server hostname into server IP addresses:

ACOS(config)#ip dns primary 10.10.10.10

 

The following command displays detailed information for the hostname server. The configuration details are shown first, fol­lowed by details for the dynamically created servers.

ACOS#show slb server s-test1 detail

Server name:            s-test1

Hostname:            s1.test.com

Last DNS reply:            Tue Nov 17 03:41:59 2009

State:            Up

Server template:            temp-server

  DNS query interval:            5

  Minimum TTL ratio:            3

  maximum dynamic server:            16

  Health check:            none

Current connection:            0

Current request:            0

Total connection:            1919

Total request:            1919

Total request success:            1877

Total forward bytes:            546650

Total forward packets:            5715

Total reverse bytes:            919730

Total reverse packets:            5631

Peak connection:            24411

Dynamic server name:            DRS-10.4.2.5-s1.test.com

Last DNS reply:            Tue Nov 17 03:41:59 2009

TTL:            4500

State:            Up

Server template:            test

  DNS query interval:            5

  Minimum TTL ratio:            15

  maximum dynamic server:            1023

  Health check:            none

Current connection:            0

Current request:            0

Total connection:            1919

Total request:            1919

Total request success:            1877

Total forward bytes:            546650

Total forward packets:            5715

Total reverse bytes:            919730

Total reverse packets:            5631

Peak connection:            2811

 

The following command displays service-group information. A separate row of information appears for each dynamically created member.

ACOS#show slb service-group

Total Number of Service Groups configured: 40

                  Current = Current Connections, Total = Total Connections

                   Fwd-p = Forward packets, Rev-p = Reverse packets

                   Peak-c = Peak connections

Service Group Name

Service                         Current Total      Fwd-p     Rev-p     Peak-c  

------------------------------------------------------------------------------

*sg-test              State: All Up

DRS-10.4.2.6-s2.test.com:80     0          0          0         0      0

DRS-10.4.2.5-s1.test.com:80     36         1919       5714      5631   55

s-test2:80                      0          53         265       212    311

The following command displays detailed statistics for the dynamically created service-group members:

ACOS#show slb service-group sg-test

Service group name: sg-test              State: All Up

Service selection fail drop:     0

Service selection fail reset:    0

Service peak connection:         0

Service: DRS-10.4.2.6-s2.test.com:80     UP

Forward packets:       0     Reverse packets:        0

Forward bytes:         0     Reverse bytes:          0

Current connections:   0     Persistent connections:  0

Current requests:      0     Total requests:     0

Total connections:     0     Response time: 0.00  msec

Total requests succ:   0

Peak conn:             0

Service: DRS-10.4.2.5-s1.test.com:80     UP

Forward packets:    5715     Reverse packets:     5631

Forward bytes:    546650     Reverse bytes:     919730

Current connections:  10     Persistent connections:  0

Current requests:     10     Total requests:  1919

Total connections:  1919     Response time: 0.00  msec

Total requests succ:  1877

Peak conn:             0

Service: s-test1:80                      UP

Forward packets:     450     Reverse packets:      360

Forward bytes:     31500     Reverse bytes:      44820

Current connections:   0     Persistent connections:  0

Current requests:      0     Total requests:     0

Total connections:    90     Response time: 0.00  msec

Total requests succ:  1877

Peak conn:             0

 

The following command displays configuration information for the service group. In this example, the service group has dynamic members and a static member.

ACOS#show slb service-group sg-test config

Service group name: sg-test

Type: tcp                       Distribution: Round Robin

Health Check: None

Member Count:4

Member4: DRS-10.4.2.6-s2.test.com:80    Priority: 1

Member3: DRS-10.4.2.5-s1.test.com:80    Priority: 16

Member1: DRS-10.4.2.5-s-test2:80        Priority: 1

Member2: s-test1:80                     Priority: 1

CLI Example – Using Round Robin with a Mix of Dynamic and Static Real Servers

By default, dynamically created servers have the highest priority.

The following configuration contains a dynamically created server (s1) and a statically created server (s2). The default load-balancing method (round robin) is used, but s1 is used more than s2.

To configure equal use of s1 and s2, the priority values for each server are explicitly set to the same value:

slb template port porttemp

  dynamic-member-priority 5

!

slb server s1 s1.com

  port 22  tcp

!

slb server s2 2.2.2.2

  port 22  tcp

!

slb service-group sg1 tcp

  member s1 22

   priority 5

   template porttemp

  member s2 22 

!

slb virtual-server vs1 1.1.1.1

  port 22  tcp

     service-group sg1

 

NOTE:                               Priority settings for dynamically created servers can be set only using a port template, as shown in this example.

Table of Contents

Index

Glossary

-Search-

Back