Thursday, 11 July 2024

Microsoft Connected Cache for Internet Service Providers (early preview)

 

Microsoft Connected Cache for Internet Service Providers (early preview)

Overview

Microsoft Connected Cache (MCC) preview is a software-only caching solution that delivers Microsoft content within operator networks. MCC can be deployed to as many physical servers or VMs as needed and is managed from a cloud portal. Microsoft cloud services handle routing of consumer devices to the cache server for content downloads.

Microsoft Connected Cache is a hybrid application, in that it's a mix of on-premises and cloud resources. It's composed of a Docker-compatible Linux container deployed to your server and a cloud management portal. Microsoft chose Azure IoT Edge as a secure and reliable control plane. For more information on IoT Edge, see the Appendix. Even though your scenario isn't related to IoT, Azure IoT Edge is our secure Linux container deployment and management infrastructure.

How MCC works

Data flow diagram of how Microsoft Connected Cache works.

The following steps describe how MCC is provisioned and used:

  1. The Azure Management Portal is used to create and manage MCC nodes.

  2. A shell script is used to provision the server and deploy the MCC application.

  3. A combination of the Azure Management Portal and shell script is used to configure Microsoft Delivery Optimization Services to route traffic to the MCC server.

    • The publicly accessible IPv4 address of the server is configured on the portal.

    • Manual Routing: Providing the CIDR blocks that represent the client IP address space, which should be routed to the MCC node.

    • BGP Routing: A shell script is used to initiate a peering session with a router in the operator network, and the operator initiates a session with the MCC node.

       Note

      Only IPv4 addresses are supported at this time. Entering IPv6 addresses will result in an error.

  4. Microsoft end-user devices (clients) periodically connect with Microsoft Delivery Optimization Services, and the services match the IP address of the client with the IP address of the corresponding MCC node.

  5. Microsoft clients make the range requests for content from the MCC node.

  6. An MCC node gets content from the CDN, seeds its local cache stored on disk, and delivers the content to the client.

  7. Subsequent requests from end-user devices for content will be served from cache.

  8. If the MCC node is unavailable, the client gets content from the CDN to ensure uninterrupted service for your subscribers.

ISP requirements for MCC

Microsoft Connected Cache for Internet Service Providers is now in Public Preview! To get started, visit Azure portal to sign up for Microsoft Connected Cache for Internet Service Providers. Please see Operator sign up and service onboarding for Microsoft Connected Cache for more information on the requirements for sign up and onboarding.

Verify properly functioning MCC server

Verify client side

Sign in to the Connected Cache server or use SSH. Run the following command from a terminal to see the running modules (containers):

Bash
sudo iotedge list

Screenshot of the terminal output of iotedge list command, showing the running containers.

If it lists the edgeAgent and edgeHub containers, but doesn't include MCC, view the status of the IoT Edge security manager using the command:

Bash
sudo journalctl -u iotedge -f

For example, this command provides the current status of the starting and stopping of a container, or the container pull and start:

Terminal output of journalctl command for iotedge.

Verify server side

It can take a few minutes for the container to deploy.

To validate a properly functioning MCC, run the following command in the terminal of the cache server or any device in the network. Replace <CacheServerIP> with the IP address of the cache server.

Bash
wget http://<CacheServerIP>/mscomtest/wuidt.gif?cacheHostOrigin=au.download.windowsupdate.com

The following screenshot shows a successful test result:

Screenshot of the terminal output of successful test result with wget command to validate a Microsoft Connected Cache.

Similarly, enter the following URL into a web browser on any device on the network:

HTTP
http://<CacheServerIP>/mscomtest/wuidt.gif?cacheHostOrigin=au.download.windowsupdate.com

If the test fails, for more information, see the common issues section.

Common Issues

Microsoft Connected Cache is no longer serving traffic

If you did not migrate your cache node then your cache node may still be on early preview version. Microsoft Connected Cache for Internet Service Providers is now in Public Preview! To get started, visit Azure portal to sign up for Microsoft Connected Cache for Internet Service Providers. Please see Operator sign up and service onboarding for Microsoft Connected Cache for more information on the requirements for sign up and onboarding.



Use the following command to check the IoT Edge journal:


DNS needs to be configured

Run the following IoT Edge install state check:


If you see issues with ports 5671, 443, and 8883, your IoT Edge device needs to update the DNS for Docker.

To configure the device to work with your DNS, use the following steps:

  1. Use ifconfig to find the appropriate NIC adapter name.

    Bash
    ifconfig
    
  2. Run nmcli device show <network adapter name> to show the DNS name for the ethernet adapter. For example, to show DNS information for eno1:

    Bash
    nmcli device show eno1 
    

    Screenshot of a sample output of nmcli command to show network adapter information.

  3. Open or create the Docker configuration file used to configure the DNS server.

    Bash
    sudo nano /etc/docker/daemon.json
    
  4. Paste the following string into the daemon.json file, and include the appropriate DNS server address. For example, in the previous screenshot, IP4.DNS[1] is 10.50.10.50.

    Bash
    { "dns": ["x.x.x.x"]}
    
  5. Save the changes to daemon.json. If you need to change permissions on this file, use the following command:

    Bash
    sudo chmod 555 /etc/docker/daemon.json
    
  6. Restart Docker to pick up the new DNS setting. Then restart IoT Edge.

    Bash
    sudo systemctl restart docker
    sudo systemctl daemon-reload
    sudo restart IoTEdge
    

Uninstalling MCC

In the installer zip file, you'll find the file uninstallmcc.sh. This script uninstalls MCC and all the related components. Before you run this script, contact the MCC team. Only run it if you're facing issues with MCC installation.

The uninstallmcc.sh script removes the following components:

  • IoT Edge
  • Edge Agent
  • Edge Hub
  • MCC
  • Moby CLI
  • Moby engine

To run the script, use the following commands:


Appendix

Steps to obtain an Azure subscription ID

  1. Sign in to the Azure portal.
  2. Select Subscriptions. If you don't see Subscriptions, type Subscriptions in the search bar. As you begin typing, the list filters based on your input.
  3. If you already have an Azure Subscription, skip to step 5. If you don't have an Azure Subscription, select + Add on the top left.
  4. Select the Pay-As-You-Go subscription. You'll be asked to enter credit card information, but you'll not be charged for using the MCC service.
  5. On the Subscriptions page, you'll find details about your current subscription. Select the subscription name.
  6. After you select the subscription name, you'll find the subscription ID in the Overview tab. Select the Copy to clipboard icon next to your Subscription ID to copy the value.

Performance of MCC in virtual environments

In virtual environments, the cache server egress peaks at around 1.1 Gbps. If you want to maximize the egress in virtual environments, it's critical to change the following two settings:

  1. Enable SR-IOV in the following three locations:

    • The BIOS of the MCC VM
    • The MCC VM's network card properties
    • The hypervisor for the MCC VM

    Microsoft has found these settings to double egress when using a Microsoft Hyper-V deployment.

  2. Enable "high performance" in the BIOS instead of energy savings. Microsoft has found this setting nearly doubled egress in a Microsoft Hyper-V deployment.

Grant other users access to manage your MCC

More users can be given access to manage Microsoft Connected Cache, even if they don't have an Azure account. Once you've created the first cache node in the portal, you can add other users as Owners of the Microsoft Connected Cache resource group and the Microsoft Connected Cache resource.

For more information on how to add other users as an owner, see Grant a user access to Azure resources using the Azure portal. Make sure to do this action for both the MCC resource and MCC resource group.

Setting up a VM on Windows Server

You can use hardware that will natively run Ubuntu 20.04 LTS, or you can run an Ubuntu VM. The following steps describe how to set up a VM on Hyper-V.

  1. Download the ISO. You can use either Ubuntu Desktop or Ubuntu Server.

  2. Start the New Virtual Machine Wizard in Hyper-V.

    Screenshot of the Before You Begin page of the Hyper-V New Virtual Machine Wizard.

  3. Specify a name and choose a location.

    Screenshot of the Specify Name and Location page in the Hyper-V New Virtual Machine Wizard.

  4. Select Generation 2. You can't change this setting later.

    Screenshot of the Specify Generation page in the Hyper-V New Virtual Machine Wizard.

  5. Specify the startup memory.

    Screenshot of the Assign Memory page of the Hyper-V New Virtual Machine Wizard.

  6. Choose the network adapter connection.

    Screenshot of the Configure Networking page of the Hyper-V New Virtual Machine Wizard.

  7. Set the virtual hard disk parameters. You should specify enough space for the OS and the content that will be cached. For example, 1024 GB is 1 terabyte.

    Screenshot of the Connect Virtual Hard Disk page of the Hyper-V New Virtual Machine Wizard.

  8. Select Install an OS from a bootable image file and browse to the ISO for Ubuntu 20.04 LTS that you previously downloaded.

    Screenshot of the Installation Options page of the Hyper-V New Virtual Machine Wizard.

  9. Review the settings and select Finish to create the Ubuntu VM.

    Screenshot of completing the New Virtual Machine Wizard on Hyper-V.

  10. Before you start the Ubuntu VM, disable Secure Boot and allocate multiple cores to the VM.

    1. In Hyper-V Manager, open the Settings for the VM.

      Screenshot of the settings for a VM in Hyper-V Manager.

    2. Select Security. Disable the option to Enable Secure Boot.

      Screenshot of the security page from VM settings in Hyper-V Manager.

    3. Select Processor. Increase the number of virtual processors. This example shows 12, but your configuration may vary.

      Screenshot of the processor page from VM settings in Hyper-V Manager.

  11. Start the VM and select Install Ubuntu.

    Screenshot of the GNU GRUB screen, with Install Ubuntu selected.

  12. Choose your default language.

    Screenshot of the Ubuntu install's language selection page.

  13. Choose the options for installing updates and third party hardware. For example, download updates and install third party software drivers.

  14. Select Erase disk and install Ubuntu. If you had a previous version of Ubuntu installed, we recommend erasing and installing Ubuntu 16.04.

    Screenshot of the Ubuntu install Installation type page with the Erase disk and install Ubuntu option selected.

    Review the warning about writing changes to disk, and select Continue.

    Screenshot of the Ubuntu install's 'Write the changes to disks' warning.

  15. Choose the time zone.

    Screenshot of the Ubuntu install's 'Where are you page' to specify time zone.

  16. Choose the keyboard layout.

    Screenshot of the Ubuntu install's Keyboard layout page.

  17. Specify your name, a name for the computer, a username, and a strong password. Select the option to Require my password to log in.

     Tip

    Everything is case sensitive in Linux.

    Screenshot of the Ubuntu install's, 'Who are you' screen.

  18. To complete the installation, select Restart now.

    Screenshot of the Ubuntu install's installation complete, restart now screen.

  19. After the computer restarts, sign in with the username and password.

     Important

    If it shows that an upgrade is available, select Don't upgrade.

    Screenshot of the Ubuntu install's Upgrade Available prompt with Don't Upgrade selected.

Your Ubuntu VM is now ready to install MCC.

Monitor Azure resources with Azure Monitor

 

Monitor Azure resources with Azure Monitor

When you have critical applications and business processes that rely on Azure resources, you want to monitor those resources for their availability, performance, and operation. Azure Monitor is a full-stack monitoring service that provides a complete set of features to monitor your Azure resources. You can also use Azure Monitor to monitor resources in other clouds and on-premises.

  • Azure Monitor and how it's integrated into the portal for other Azure services.
  • The types of data collected by Azure Monitor for Azure resources.
  • Azure Monitor tools that are used to collect and analyze data.

Monitoring data

This section discusses collecting and monitoring data.

Azure Monitor data collection

As soon as you create an Azure resource, Azure Monitor is enabled and starts collecting metrics and activity logs. With some configuration, you can gather more monitoring data and enable other features. The Azure Monitor data platform is made up of Metrics and Logs. Each feature collects different kinds of data and enables different Azure Monitor features.

  • Azure Monitor Metrics stores numeric data from monitored resources into a time-series database. The metric database is automatically created for each Azure subscription. Use Metrics Explorer to analyze data from Azure Monitor Metrics.
  • Azure Monitor Logs collects logs and performance data where they can be retrieved and analyzed in different ways by using log queries. You must create a Log Analytics workspace to collect log data. Use Log Analytics to analyze data from Azure Monitor Logs.

Monitoring data from Azure resources

While resources from different Azure services have different monitoring requirements, they generate monitoring data in the same formats so that you can use the same Azure Monitor tools to analyze all Azure resources.

Diagnostic settings define where resource logs and metrics for a particular resource should be sent. Possible destinations are:

  • Activity log: Subscription-level events that track operations for each Azure resource, for example, creating a new resource or starting a virtual machine. Activity log events are automatically generated and collected for viewing in the Azure portal. You can create a diagnostic setting to send the activity log to Azure Monitor Logs.
  • Platform metrics: Numerical values that are automatically collected at regular intervals and describe some aspect of a resource at a particular time. Platform metrics are automatically generated and collected in Azure Monitor Metrics.
  • Resource logs: Provide insight into operations that were performed by an Azure resource. Operation examples might be getting a secret from a key vault or making a request to a database. Resource logs are generated automatically, but you must create a diagnostic setting to send them to Azure Monitor Logs.
  • Virtual machine guest metrics and logs: Performance and log data from the guest operating system of Azure virtual machines. You must install an agent on the virtual machine to collect this data and send it to Azure Monitor Metrics and Azure Monitor Logs.

You can access Azure Monitor features from the Monitor menu in the Azure portal. You can also access Azure Monitor features directly from the menu for different Azure services. Different Azure services might have slightly different experiences, but they share a common set of monitoring options in the Azure portal. These menu items include Overview and Activity log and multiple options in the Monitoring section of the menu.

Screenshot that shows the Overview and Activity log menu items.

Screenshot that shows the Monitoring menu.

Overview page

The Overview page includes details about the resource and often its current state. For example, a virtual machine shows its current running state. Many Azure services have a Monitoring tab that includes charts for a set of key metrics. Charts are a quick way to view the operation of the resource. You can select any of the charts to open them in Metrics Explorer for more detailed analysis.

To learn how to use Metrics Explorer, see Analyze metrics for an Azure resource.

Screenshot that shows the Overview page.

Activity log

The Activity log menu item lets you view entries in the activity log for the current resource.

Screenshot that shows an activity log.

Alerts

The Alerts page shows you any recent alerts that were fired for the resource. Alerts proactively notify you when important conditions are found in your monitoring data and can use data from either Metrics or Logs.

To learn how to create alert rules and view alerts, see Create a metric alert for an Azure resource or Create a log search alert for an Azure resource.

Screenshot that shows the Alerts page.

Metrics

The Metrics menu item opens Metrics Explorer. You can use it to work with individual metrics or combine multiple metrics to identify correlations and trends. This is the same Metrics Explorer that opens when you select one of the charts on the Overview page.

To learn how to use Metrics Explorer, see Analyze metrics for an Azure resource.

Screenshot that shows Metrics Explorer.

Diagnostic settings

The Diagnostic settings page lets you create a diagnostic setting to collect the resource logs for your resource. You can send them to multiple locations, but the most common use is to send them to a Log Analytics workspace so you can analyze them with Log Analytics.

To learn how to create a diagnostic setting, see Collect and analyze resource logs from an Azure resource.

Screenshot that shows the Diagnostic settings page.

Insights

The Insights menu item opens the insight for the resource if the Azure service has one. Insights provide a customized monitoring experience built on the Azure Monitor data platform and standard features.

For a list of insights that are available and links to their documentation, see Insights and core solutions.

Screenshot that shows the Insights page.