Using DNS Lookups

Document created by Chris Sommerstad Employee on Jul 21, 2017Last modified by Trishala Kalal on Aug 14, 2017
Version 2Show Document
  • View in full screen mode

CloudTest has the ability to perform DNS lookups from within the Maestros used in a test via settings found in the Target Editor > DNS Options section. Clip-level overrides can also be set (see DNS Options in the Clip Editor below). These lookups are performed once, and then cached across all Virtual users (Parallel Repeats).

Using this feature each Maestro can be made to appear as a different ISP as a means of load distribution. This feature should be put into use in the following cases:

  • When a global website is using a load balancer that is based on the originating DNS server.
  • When a test composition will be retrieving a lot of CDN resources.
  • When an existing test is producing a lot of DNS based errors.

DNS Lookup Considerations

Testers should consider the following when using DNS lookups at either the target- or clip-level:

  • With Clip Repeat on - There willbe one DNS lookup per Clip performed by Maestro, after which, Maestro will then use the clip's DNS cache period (thus simulating browser caching) fo 30 minutes before going back to Maestro. For more about cache settings, refer to Cache Dynamic Resources (Clip, Track, or Composition).
  • With Parallel Repeats on – DNS lookup per Clip by Maestro occurs each time (but see below)
  • Maestro refreshes its DNS entries every 20 seconds. For example, when the first request comes in for a first lookup (a.foo.com) a new user requesting a.foo.com will only result in a DNS looup if the lapsed time is > 20 seconds from the last lookup. 

In CloudTest, DNS lookups are performed for each name server untill all have been tried. If a DNS timeout error is encountered, this means that each name server was tried (e.g., presuming there actually were multiple).

Note: When testing behind the firewall (e.g. using CloudTest Lite or a SOASTA Appliance), this setting should usually be disabled, since IP addresses do not usually change during the course of a Composition.  Also, by default it requires access to one or more public root name servers.

 

Setting DNS Lookups in the Target Editor

  1. To override DNS lookup at the target-level, first open the target in the Target Editor. If you're not sure of the target to modify, inspect your clip(s) in the Clip Editor lower panel, Message/Actions tab, Included Targets list (you can double-click an included target to open it in the editor).
  2. In the open target, locate the DNS Options section. The Target Editor > DNS Options section includes the ability to set a DNS server per target, and also to specify the lookup's Minimum and Maximum Time to Live (TTL), in the Target Editor.
  3. To use DNS lookups, check the "This Target performs its own DNS Lookups" box. Once enabled, CloudTest's Maestro DNS Caching layer will perform the lookup traversing from the top level domain and "down" until it can resolve the target's host name to the IP address it should communicate with. Note that this is not a must, just nice to have, and will work with all of the input boxes below left empty.

Note: In most cases, it is not necessary to fill in the remaining DNS Server fields (unless the test case specifically requires one). See the DNS Lookup Considerations section above to determine if your test needs the additional settings specified.

  1. Optionally, specify the following settings.

TIP: DNS lookups can be used in conjunction with HttpHostOverride settings for environments where load balancing architectures are in place. Refer to How do I override the value of the HTTP Host header in requests? for more about host overrides.

  • DNS Server

Specify the host name or IP address of the DNS name server to use. If none is specified, then a public root name server will be used. Usually, you do not need to set this.

  • DNS Maximum TTL

Specify the integer, in seconds, for the maximum time to live.

  • DNSMinTTL

This sets the minimum amount of time that any DNS result will be cached. This setting can increase the amount of time that a result would normally be cached, if it is more than the TTL specified in an actual DNS result. If 0, then result caching will be disabled completely. If -1, then results will be cached up to the amount of time specified in the DNS result, with no minimum. This setting can be used to mimic the behavior of browsers such as Internet Explorer, which cache longer than the DNS result says to cache.

  1. Save the target after making any changes.

Setting DNS Lookups in the Clip Editor

  1. To override DNS lookup at the clip-level, first open the composition in the Composition Editor.
  2. Open Properties for the selected clip and navigate to the target
  3. Select the Property Sets tab
  4. For a new override, click the green Plus icon (+) to add a row for the override (or you can modify an existing setting).

  1. Click the Etc (...) button in the row to modify it. When you do so, the Property Chooser box will appear.
  2. In the Property Chooser box, expand the clip to once again reveal its underlying target, and then select the first DNS setting to override. In most cases, you'll need to override the DNS Server, the DNS Max TTL, and the DNS Min TTL—the same settings that are found in the Target Editor > DNS Options section.

  1. Click OK to complete adding the override and return to the clip.
  2. Specify a value for the given clip-level system property override .
  • DNS Server

Specify the host name or IP address of the DNS name server to use. If none is specified, then a public root name server will be used. Usually, you do not need to set this.

  • DNS Maximum TTL

Specify the integer, in seconds, for the maximum time to live.

  • DNSMinTTL

This sets the minimum amount of time that any DNS result will be cached. This setting can increase the amount of time that a result would normally be cached, if it is more than the TTL specified in an actual DNS result. If 0, then result cachi

  1. Save the test clip before continuing.

Attachments

    Outcomes