Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #776 from apollographql/jack-custom-domains
Browse files Browse the repository at this point in the history
Add Custom Domains to Dedicated docs
  • Loading branch information
jackonawalk authored Feb 20, 2024
2 parents 091eac9 + 25eb8c0 commit d942b2d
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/content/graphos/cloud-routing/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
[
"preview"
]],
"Custom domains":[ "/dedicated/custom-domains",
[
"preview"
]],
"AWS Lattice configuration":[ "/dedicated/lattice",
[
"preview"
Expand Down
66 changes: 66 additions & 0 deletions src/content/graphos/cloud-routing/dedicated/custom-domains.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Custom domains
subtitle: Use a custom subdomain for your cloud router endpoint
description: Use a custom domain for your cloud router endpoint to minimize client-side changes, use existing security policies, and shield against DDoS attacks.
---

<DedicatedPreview />

The **custom domains** feature lets you replace the default `apollographos.net` [router endpoint URL](./quickstart#router-endpoint-url) with your own subdomain, for example `api.apollographql.com`.

Custom domains can help to:

- Minimize client-side changes
- Use your existing CORS policies and security controls
- Protect your cloud routers from DDoS attacks

## How custom domains works

Custom domains run on [Cloudflare's](https://www.cloudflare.com/) global network.
Using a custom domain provides DDoS protections and TLS termination to your cloud routers.
Custom domains support CNAME records which are assigned at the variant level.

## Custom domains setup

Setup includes two steps:

1. Setting up a new CNAME record in your DNS provider.
2. Verifying your CNAME with Apollo.
<Note>

Later in 2024, custom domains will be available self service through GraphOS Studio. In the meantime, you need to open a support request to verify your CNAME with Apollo.

</Note>

### Setup a CNAME

To get started with custom domains, create a [CNAME record](https://www.cloudflare.com/learning/dns/dns-records/dns-cname-record/) in your DNS provider that points at your Dedicated variant's [existing subdomain](./quickstart#router-endpoint-url). For example, create a CNAME for `api.mydomain.com` that points to `current--docs-example.apollographos.net`.

<img
className="screenshot"
alt="A cloud router's endpoint displayed on the Cloud Router page in GraphOS Studio"
src="../../img/cloud-dedicated/router-endpoint.png"
/>

### Verify CNAME

Next, open a support ticket requesting Apollo to enable your new CNAME.
You can open a ticket by clicking the **?** icon in the top right of [GraphOS Studio](https://studio.apollographql.com?referrer=docs-content) and selecting **Contact Support**.

<img
className="screenshot"
alt="Requesting a new CNAME in GraphOS Studio"
src="../../img/cloud-dedicated/support-ticket.png"
/>

Apollo will reply with a new TXT record you need to add to your DNS to verify your CNAME.
Once you've created your TXT record, let Apollo know.
Upon verification, your new CNAME will be live.

## Limitations

Custom domains doesn't support:

- [Apex records](https://learn.microsoft.com/en-us/azure/dns/dns-zones-records#record-names) or [A records](https://learn.microsoft.com/en-us/azure/dns/dns-zones-records#record-types)
- Multiple custom domains per variant
- Load balancing traffic across multiple variants
4 changes: 3 additions & 1 deletion src/content/graphos/cloud-routing/dedicated/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ Similarly, any new client applications should use your router's URL.

</Note>

#### Router endpoint URL

You can find your endpoint URL on the **Cloud router** page in GraphOS Studio.

<img
Expand All @@ -143,7 +145,7 @@ You can find your endpoint URL on the **Cloud router** page in GraphOS Studio.

<Note>

Every router URL is on a subdomain of `apollographos.net`. Custom domains support will become available in 2024 for Dedicated cloud routers.
By default, cloud router URLs are on a subdomain of `apollographos.net`. You can setup a [custom domain](./custom-domains) to minimize client-side changes.

</Note>

Expand Down
54 changes: 49 additions & 5 deletions src/content/graphos/cloud-routing/dedicated/throughput.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ description: Learn how to calculate and scale the throughput capacity of your cl
<DedicatedPreview />

This guide covers:
- An [overview of **Graph Compute Units** (GCUs)](#overview) and their performance expectations
- How to [calculate the number of GCUs](#gcu-calculation) your supergraph needs
- How to [manage your supergraph's throughput capacity](#manage-capacity) as needs change
- An overview of **Graph Compute Units** (GCUs) and their performance expectations
- How to calculate the number of GCUs your supergraph needs
- How to manage your supergraph's throughput capacity as needs change

## Overview

Expand Down Expand Up @@ -100,9 +100,23 @@ Dedicated trials are available to help you run a load test for free. <TrackableL

## Manage capacity

Cloud Dedicated supports mission-critical production workloads, and you can scale performance to meet the needs of your GraphQL APIs. Dedicated supports up to 40 GCUs per GraphOS variant.
Cloud Dedicated supports mission-critical production workloads, and you can scale performance to meet the needs of your GraphQL APIs.
Dedicated supports up to 10 GCUs per GraphOS variant.

Dedicated starts with 1 GCU per variant. You can add GCUs from the **Cloud Router** page in Studio. Click **Manage Capacity** to the right of **Router Capacity**.
Dedicated starts with 1 GCU per variant. You can change a variant's GCUs via either:
* [GraphOS Studio](#edit-gcus-in-studio)
* [The Platform API](#edit-gcus-via-api)

<Note>

GCU updates takes about one minute to provision.

</Note>

### Edit GCUs in Studio

You can change a graph variant's GCUs from the **Cloud Router** page in Studio.
Click **Manage Capacity** to the right of **Router Capacity**.

<img
className="screenshot"
Expand All @@ -117,3 +131,33 @@ Then, select the number of GCUs required and click **Save changes**.
alt="GraphOS Studio edit GCUs"
src="../../img/cloud-dedicated/gcus-scale.png"
/>

### Edit GCUs via API

You can change a graph variant's GCUs with the following mutation from the [GraphOS Platform API](/graphos/platform-api/).

```graphql
mutation Graph($graphId: ID!, $name: String!, $gcus: Int!) {
graph(id: $graphId) {
variant(name: $name) {
router {
setGcus(gcus: $gcus) {
... on RouterGcusSuccess {
order {
id
}
}
}
}
}
}
}
```

This mutation requires setting the following variables:

- `graphId`: a graph's ID is the first part of the graph's graph ref
- You can a graph's ID in GraphOS Studio under **Settings** > **This Graph**
- `name`: the variant name
- If you haven't set a variant name, the default is `current`
- `gcus`: the number of GCUs to provision for the variant
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions styles/Apollo/Headings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exceptions:
- CI(/CD)?
- CLI
- Cloud Dedicated
- CNAME
- "Configur(e|ation|ing)"
- Connect APIs
- Contribute to Apollo
Expand Down
4 changes: 4 additions & 0 deletions styles/Google/Acronyms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ exceptions:
- ASP
- AWS
- CLI
- CNAME
- CORS
- CPU
- CSS
- CSV
- DEBUG
- DNS
- DOM
- DPI
- FAQ
Expand Down Expand Up @@ -56,7 +58,9 @@ exceptions:
- SVG
- TBD
- TCP
- TLS
- TODO
- TXT
- URI
- URL
- USB
Expand Down

0 comments on commit d942b2d

Please sign in to comment.