Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tutorial: multi-cloud API gateway #1161

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

joelhans
Copy link
Contributor

@joelhans joelhans commented Jan 29, 2025

This PR adds a new tutorial for wiring up ngrok as a multi-cloud API gateway.

Reviews and improvements aside, this is ready to fly once we're OK with endpoint pools.

A few things to note:

  • I'm breaking up certain tasks, like adding more nuanced Traffic Policy, into a separate doc so that we're not repeating so much information everywhere and this content is more composable (ha).
  • I added a new Tutorials section to the sidebar and added just this API gateway content, as it's the most mature and up to date with the product. To make that work, I had to remove the automated sidebar for the guides and replace it with manual ones, but I replicated the previous behavior.
  • I'm going to follow this PR up shortly with another that brings the Get started with an API gateway tutorial into the same path/style as this one.

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ngrok-docs ✅ Ready (Inspect) Visit Preview Feb 13, 2025 0:05am

Copy link
Collaborator

@S3Prototype S3Prototype left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stopping the review early so you can go back over things a bit per this convo:

docs/guides/api-gateway/kubernetes.mdx Outdated Show resolved Hide resolved
docs/guides/api-gateway/get-started.mdx Outdated Show resolved Hide resolved
docs/guides/api-gateway/multi-cloud.mdx Outdated Show resolved Hide resolved
docs/guides/api-gateway/add-traffic-policy.mdx Outdated Show resolved Hide resolved
docs/guides/api-gateway/multi-cloud.mdx Outdated Show resolved Hide resolved
docs/guides/api-gateway/multi-cloud.mdx Outdated Show resolved Hide resolved
docs/guides/api-gateway/multi-cloud.mdx Outdated Show resolved Hide resolved
docs/guides/api-gateway/multi-cloud.mdx Outdated Show resolved Hide resolved
Comment on lines 58 to 73
## Deploy a demo API service (optional)

If you don't yet have API services you'd like to bring online with a multi-cloud
API gateway, or just want to quickly wire up a POC using ngrok, we recommend
running multiple "replicas" of [httpbin](https://httpbin.org/), which is simple
HTTP request and response service.

Assuming you have Docker installed on the systems where your API services run,
you can deploy an httpbin container listening on port `8080`.

```shell
docker run -p 8080:80 -d kennethreitz/httpbin
```

Repeat this process on your other cloud providers where you want to run replicas
of your API service.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should move this section to the bottom of the page since it's optional, and (I assume?) users are probably already going to have an API service they're interested in using with this tutorial

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it might be a distraction for those who already have an API service, but I don't know about moving it to the end. Maybe it could be a collapsible section that's hidden by default?

These "choose your own adventure" moments are part of why I asked about whether we could implement a component that asks a few questions of the user, then conditionally renders the tutorial based on their answers.

In this case, we would ask upfront whether they want a demo service or are bringing their own. If they're bringing their own, we'd hide this and any other mention of said demo service. But—that's not in scope for this one.

Repeat this process on your other cloud providers where you want to run replicas
of your API service.

## Bring your multi-cloud API gateway online
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Bring your multi-cloud API gateway online

I know they're all over the docs, but I'm kind of against these empty headings. I understand that they give a theme to the content under them. But they also make the TOC look cluttered by forcing everything under them to go down a heading level, and tend to be redundant. For example, the page is already called "Deploy a multi-cloud API gateway" so it's not 100% necessary to have a whole heading telling readers they're going to "Bring your multi-cloud API gateway online"

What do you think?

Making this change would require putting all the sub headings up a level

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bad idea! I tested this out in the changes I'm pushing momentarily. The TOC has more H2-level items, but maybe that's overall clearer.

@joelhans
Copy link
Contributor Author

joelhans commented Feb 5, 2025

@S3Prototype Thanks for the comments so far! I've just focused on your comments at this point, and will plan on doing the more stylistic pass later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants