LOG IN SIGN UP
Documentation

Google Compute Engine

Google Compute Engine (GCE) lets you create and run a virtual machine (VM) on the Google infrastructure. The VM can be used as an origin server with your Fastly service once you set up and configure your VM instance and link your instance to a Fastly service.

Creating and setting up your GCE instance

  1. Sign up for Google Compute Engine and start the basic set up. If you are already signed up and at your dashboard, click the Get started link in the Try Compute Engine area.
  2. Create or select a project to hold your origin's data.

    Google Compute Engine create project

  3. Click Create instance to set up your VM. You can set up your instance using either Windows or Linux.

    Google Compute Engine create new instance

  4. Fill in the necessary fields and click Create. When making your firewall selection, select either Allow HTTPS traffic (port 443) or Allow HTTP traffic (port 80); you will use one of those ports when you create your new origin in your Fastly service. If you select HTTPS traffic, you need to configure the VM to respond on port 443 with a valid TLS certificate.

    Google Compute Engine VM instance

  5. Make note of the following information for when you create your new origin in your Fastly service:

    • The instance's IP address (located in the External IP column at the bottom of the page). You'll use this in the Address field when you create your new origin.
    • The zone you are using (located in the Zone column at the bottom of the page). You'll use this to guide your selection of an appropriate shielding location for your origin.

Creating a new origin in your Fastly service for your GCE account

Link your GCE account to a Fastly service following the steps below.

  1. Log in to the Fastly web interface and click the Configure link.
  2. Create a new service if you don't already have one set up.
  3. From the service menu, select the appropriate service.
  4. Click the Edit configuration button and then select Clone active. The service version page appears.
  5. Click the Origins tab. The Origins page appears.
  6. Click the Create host button. The Create a new host page appears.

    Google Compute Engine new host

  7. Fill out the Create a new host fields as follows:

    • In the Address field, type the IP address of your server, and in the port field, type 80 or 443. This should match the port that you selected in the GCE interface.
    • From the Shielding menu, select an available interconnect location from the list of shielding locations. See our information on interconnect locations below for more details.
    • Leave the Health check and Auto load balance menus set to their default values.
    • In the Description field, type the name of your server (for example, Google Compute Engine).
  8. Click the Create button. A new host appears on the Origins page.

In this example, no cache control headers are set so the default TTL will be applied.

Interconnect locations

The following interconnects allow you to establish direct links with Google's edge network when you choose your shielding location. By selecting one of the locations listed below, you will be eligible to receive discounted pricing from Google CDN Interconnect for traffic traveling from Google Cloud Platform to Fastly's network. Most customers select interconnects closest to their origin.

Interconnects exist in the following locations within North America:

Interconnects outside of North America exist in:

Review our caveats of shielding and select an interconnect accordingly.

Creating new domains for GCE to respond to

  1. Log in to the Fastly web interface and click the Configure link.
  2. From the service menu, select the appropriate service.
  3. Click the Edit configuration button and then select Clone active. The service version page appears.
  4. Click the Domains tab The Domains page appears.

    the Domains page, without any domains created

  5. Click the Create domain button. The Create a new domain page appears.

    new domain

  6. In the Domain Name field, type the name that users will type in their browsers to access your site.

  7. Click the Create button. The new domain appears on the Domains page.

  8. Click the Activate button to deploy your configuration changes.

Creating a CNAME record

You can now test your configuration. In the example above, your domain would appear as www.example.com.global-nossl.fastly.net. After you test and you're satisfied with the results, create a CNAME record for your domain (e.g., www.example.com) pointing to global-nossl.fastly.net.


Back to Top