Activate radar for a private data center

Today’s business environment demands the ability to run an application that is both globally connected and consistently high performing. To achieve this, you need a tool that measures real-time internet performance across all major clouds and CDNs, and across a global network.

Radar uses a JavaScript script embedded within an application provider’s pages to collect information about the performance and availability of a multi-site application. Radar takes measurements from about 900 million users across 50,000 ISP networks, resulting in 10 billion data points every day, which enables you to ensure that the content and applications are always available, and the users receive the best experience.

Real user measurements (RUMs) on such a significant scale are achieved through Radar. RUMs can be achieved through radar tags and objects. A radar tag is a JavaScript tag integrated with the application provider’s pages you want to measure. The radar object can be deployed on the site using a responder policy and action. Responder action and policy serve a 43 bytes single pixel image whenever a URL with the extension r20.gif is requested by the user’s browser.

When users access an application provider’s page, the radar tag runs and instructs the browser to retrieve radar objects, collect the metrics and send the telemetry to Radar.

The public cloud site locations have radar configured by default. If you are using a private data center, you must manually configure the Radar. The CADS service provides its application providers the ability to deploy the radar objects and measure the performance of their private data centers. Radar collects the following metrics:

  • Availability: Specifies whether the radar object loads or not.
  • Response Time: Specifies how long it takes for the server to respond to a subsequent request, once all of the noise of establishing a connection is completed. This is a relatively close approximation of TCP round-trip time (RTT) from the browser to the provider.
  • Throughput: Throughput is the data rate of the connection, in kilobits per second, as measured from the retrieval of a 100 KB object.

These metrics allow the customer to effectively evaluate an existing content delivery strategy and take advantage of the Optimal RTT GSLB algorithm for hybrid multi-cloud applications. The information collected remains available only to the application provider. After configuring radar, the application provider can choose to become a radar member. Radar members are the application providers who have radar configured on their sites and also share their metrics with the radar community. Contact Citrix support to understand the benefits of collecting community measurements.

Note:

You do not get to see metrics collected from radar configuration in the CADS service UI. You can only view the healthiness of sites under Analytics > Multi-site applications.

To summarize, the radar RTT measurement process follows these steps:

  1. Users visit the application (webpage) with a radar tag and when they download a webpage, they receive the radar tag.
  2. When the page has finished loading, the radar tag initiates a request to each site.
  3. The radar tag retrieves the small radar objects to determine the HTTP response time.
  4. The data is collated and sent to the radar community. Based on the data, perform an optimal RTT and route the traffic to the site with the lowest RTT.

Activating radar for a private data center is a two-step process:

  1. Integrate radar tag in application webpages.
  2. Deploy radar objects on a site in a private data center.

Integrate radar tag in customer webpages

Prerequisite: To integrate the radar tag, you must know your customer id. Contact Citrix support to know your customer id. For more information on contacting Citrix support, see https://support.citrix.com/article/CTX128597.

Based on your need, you can choose one of the following methods to integrate the radar tag:

Note:

Do not change the JavaScript snippet. The code includes important information which if changed can create unexpected or unreliable behavior.

  • Default tag: The default tag is the recommended version of the radar tag. The default radar tag waits until the load event is complete before downloading and running the radar client, ensuring that the load event is uninterrupted.

     <script>
     if (typeof window.addEventListener === "function") {
     window.addEventListener("load", function() {
         if (window.cedexis === undefined) {
             var radar = document.createElement("script");
             radar.src = "//radar.cedexis.com/1/<cid>/radar.js"; // replace with user specific value
             document.body.appendChild(radar);
         }
         });
     }
     </script>
     <!--NeedCopy-->
    

    Replace <cid> with your customer id in the radar tag and place it in the HTML of the webpages just before the closing BODY tag.

  • Pre-loading Radar Tag: If you are using Content Security Policy settings preventing the use of inline JavaScript, user pre-loading radar tag. This radar tag keeps the download of the radar client from blocking further parsing of the page, but runs it before the load event has fired.

     <script async src="//radar.cedexis.com/1/<cid>/radar.js"></script>
     <!--NeedCopy-->
    

    Replace <cid> with your customer id in the radar tag and place it in the HTML of the webpages you want to measure.

  • Radar Native SDKs: The Radar SDKs include client libraries that you can easily incorporate into any iOS or Android mobile app. The SDKs allow you to embed the Radar tag functionality, to take periodic measurements from the native application, without having to manually load and manage a web view.

Deploy radar objects

You can deploy radar objects in one of the following ways:

  • Deploy Radar Objects on a host in a private DC.
  • Integrate with Citrix ADC.

Deploy radar objects on a site in a private data center

Prerequisite: To serve the radar objects using TLS, ensure that the following certificates are available in the corresponding paths:

Certificate Path
Public TLS certificate /etc/ssl/public.crt
Private TLS key /etc/ssl/private.key
Certificate chain /etc/ssl/ca-certs.pem

Radar objects can be served by any modern operating system and webserver. The following instructions are tested against Ubuntu20 in Apache.

  1. Install Apache2 and git packages.

    sudo apt-get install apache2 git
    <!--NeedCopy-->
    
  2. Create and populate the Apache2 directory.

    sudo mkdir -p /var/www/radar-objects
    sudo git clone https://github.com/cedexis/testobjects /var/www/radar-objects/
    <!--NeedCopy-->
    
  3. Disable the default Apache2 virtual host.

    sudo rm /etc/apache2/sites-enabled/000-default.conf
    <!--NeedCopy-->
    
  4. Enable the Apache2 mods as follows:

    sudo a2enmod headers
    sudo a2enmod rewrite
    sudo a2enmod ssl
    sudo systemctl restart apache2
    <!--NeedCopy-->
    
  5. Add the Apache2 site configuration.

    cat > /etc/apache2/sites-available/radar-objects.conf << 'EOF'
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    DocumentRoot /var/www/radar-objects
    Header add "Timing-Allow-Origin" "*"
    
    RewriteEngine on
    RedirectMatch 404 /\.git
    
    <VirtualHost *:80>
        RewriteRule ^/img/(.*)/(.*)$ /img/$2 [L]
        RewriteRule ^/sm/(.*)/(.*)$ /sm/$2 [L]
    </VirtualHost>
    
    SSLStaplingCache shmcb:${APACHE_RUN_DIR}/logs/stapling_cache(128000)
    SSLSessionCache shmcb:${APACHE_RUN_DIR}/logs/ssl_scache(512000)
    
    <VirtualHost *:443>
        SSLEngine On
        SSLCertificateFile /etc/ssl/public.crt
        SSLCertificateKeyFile /etc/ssl/private.key
        SSLCACertificateFile /etc/ssl/ca-certs.pem
        SSLProtocol -all +TLSv1.3 +TLSv1.2
        SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"
        SSLUseStapling On
        SSLSessionCacheTimeout 300
    
        RewriteRule ^/img/(.*)/(.*)$ /img/$2 [L]
        RewriteRule ^/sm/(.*)/(.*)$ /sm/$2 [L]
    </VirtualHost>
    EOF
    <!--NeedCopy-->
    
  6. Enable the new Apache site and restart Apache2.

    sudo ln -s /etc/apache2/sites-available/radar-objects.conf /etc/apache2/sites-enabled/radar-objects.conf
    sudo systemctl restart apache2
    <!--NeedCopy-->
    
  7. Verify if the radar objects are being served.

    curl https://<FQDN>/img/r20.gif
    <!--NeedCopy-->
    

Integrate with Citrix ADC

You can deploy the radar object using Citrix ADC. You can either use the command line or the Citrix ADC Configuration Utility. For more information, see https://docs.citrix.com/en-us/citrix-intelligent-traffic-management/radar.html#integration-with-citrix-adc.

Activate radar for a private data center