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.
Set up and create your GCE instance
- 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.
Create or select a project to hold your origin's data.
Click Create instance to set up your virtual machine. You can set up your instance using either Windows or Linux.
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.
Make note of the following informatin 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.
Create a new origin in your Fastly service for your GCE account
Link your GCE account to a Fastly service following the steps below.
- Log in to the Fastly application.
- Create a new service if you don't already have one set up.
- Select the appropriate service from the Service menu.
- Click the blue Configure button to the right of the service name.
- Click the Hosts pane from the list on the left.
In the Backends area click the New button to create a new backend. The New Backend window appears.
Fill out the New Backend window as follows:
- In the Address field, type the IP address of your server.
- In the Port field, type
443. This should match the port that you selected in the GCE interface.
- In the Name field, type the name of your server (for example,
Google Compute Engine).
- Leave the Health Check, Auto Load Balance, and Weight controls set to their default values.
- 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.
Click the Create button. The server appears in the Backends area.
In this example no cache control headers are set so default TTL will be applied.
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:
- Dallas-Forth Worth
- Los Angeles
- New York City
- San Jose
- Washington DC
Interconnects outside of North America exist in:
- Hong Kong
Review our caveats of shielding and select an interconnect accordingly.
Create new domains for GCE to respond to
Click Domains from the list on the left. The Domains controls appear.
Click the New button in the Domains area. The New Domain window appears.
In the Domain Name field, type the name that users will type in their browsers to access your site.
Click the Create button to create the new domain.
Deploy the new origins by activating the new version of your service.
Test your results and create a CNAME record
You can now test your results. In the example above, it would be
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